aiaiask.com©

开花即结果 提问即答案

销售文案
原始问题:

销售文案

$scope.salesCopyList = [];

        //获取销售文案
        $scope.getSalesCopyList = function () {
            var url = '/custom-sbd-web/product/getProductCopywriting.do';
            var data = {
                productId: $stateParams.productId
            };

            $http({url: url, method: 'post',data: data}).success(function (result) {

                if (result.status == 'OK'&&result.results) {

                    //处理销售文案列表数据格式为array格式,方便ng-repeat遍历出来数据,并且保存到$scope中,用于页面显示。
                    angular.forEach(result.results, function (item) {

                        //处理回车符号,将回车符号替换为<br/>标签,以便在html中正常显示回车效果。
                        item.copywritingContent=item.copywritingContent?item.copywritingContent:'无';//如果内容为null或者undefined时,将其赋值为‘无’;

                        item["copywritingTitle"]=item["copywritingTitle"]?item["copywritingTitle"]:'无';//如果内容为null或者undefined时,将其赋值为‘无’;

                        item['copywritingContent']=item['copywritingContent'].replace(/  

|\r
/g,"<br/>");//处理回车符号的问题。

                        $scope.salesCopyList[$scope
销售文案
https://www.aiaiask.com/ask/9598.html
AI / 模型iFLYTEK
时间 / DATEApril 14, 2023, 3:32 PM
语言zh-CN
IP / 区域广西壮族自治区河池市