Authored by dongjunjie

店铺装修

@@ -47,7 +47,7 @@ var g = new common.grid({ @@ -47,7 +47,7 @@ var g = new common.grid({
47 display: "包含品牌", 47 display: "包含品牌",
48 name: "brands", 48 name: "brands",
49 render: function(item) { 49 render: function(item) {
50 - //console.log(item); 50 + console.log(item);
51 if (item.brands instanceof Array && item.brands.length > 0) { 51 if (item.brands instanceof Array && item.brands.length > 0) {
52 var html = ''; 52 var html = '';
53 $.each(item.brands, function(i, value) { 53 $.each(item.brands, function(i, value) {
@@ -86,7 +86,7 @@ var g = new common.grid({ @@ -86,7 +86,7 @@ var g = new common.grid({
86 if (item.checkStatus) { 86 if (item.checkStatus) {
87 return ENUM.checkStatus[item.checkStatus] 87 return ENUM.checkStatus[item.checkStatus]
88 } else { 88 } else {
89 - return '装修'; 89 + return '装修';
90 } 90 }
91 } 91 }
92 }, { 92 }, {
@@ -94,12 +94,22 @@ var g = new common.grid({ @@ -94,12 +94,22 @@ var g = new common.grid({
94 render: function(item) { 94 render: function(item) {
95 var HtmArr = []; 95 var HtmArr = [];
96 96
97 - if(item.checkStatus == 200){ 97 + if(+item.checkStatus == 200){
98 HtmArr.push('<a href="/supplier/store/decorationDetail/'+item.shopsId+'/'+item.shopsType+'/view/'+item.id+'/" class="btn btn-info btn-xs">装修查看</a>'); 98 HtmArr.push('<a href="/supplier/store/decorationDetail/'+item.shopsId+'/'+item.shopsType+'/view/'+item.id+'/" class="btn btn-info btn-xs">装修查看</a>');
99 }else { 99 }else {
100 HtmArr.push('<a href="/supplier/store/decorationDetail/'+item.shopsId+'/'+item.shopsType+'/editor/'+item.id+'/" class="btn btn-success btn-xs">装修编辑</a>'); 100 HtmArr.push('<a href="/supplier/store/decorationDetail/'+item.shopsId+'/'+item.shopsType+'/editor/'+item.id+'/" class="btn btn-success btn-xs">装修编辑</a>');
101 } 101 }
102 - if (item.checkStatus == 900) { 102 +
  103 + if(item.passStatus && +item.passStatus == 1){
  104 + if(+item.shopStatus == 1){
  105 + // 1开启 0 关闭
  106 + HtmArr.push('<a data-index="'+item.__index+'" href="javascript:void(0);" class="closeshops btn btn-danger btn-xs">关店</a>');
  107 + }else{
  108 + HtmArr.push('<a data-index="'+item.__index+'" href="javascript:void(0);" class=" openshops btn btn-success btn-xs">开店</a>');
  109 + }
  110 + }
  111 +
  112 + if (+item.checkStatus == 900) {
103 HtmArr.push('<a href="javascript:void(0)" class="btn btn-warning btn-xs commentBtn" data-comment="'+item.comment+'">驳回理由</a>'); 113 HtmArr.push('<a href="javascript:void(0)" class="btn btn-warning btn-xs commentBtn" data-comment="'+item.comment+'">驳回理由</a>');
104 } 114 }
105 115
@@ -124,4 +134,29 @@ $(document).on('click', ".commentBtn", function() { @@ -124,4 +134,29 @@ $(document).on('click', ".commentBtn", function() {
124 function(){}, 134 function(){},
125 function(){} 135 function(){}
126 ); 136 );
  137 +});
  138 +
  139 +var Bll={
  140 + toast:function(content,url,id){
  141 + common.dialog.confirm("温馨提示",content,function(){
  142 + common.util.__ajax({
  143 + url:url,
  144 + data:{shopsId:id}
  145 + },function(){
  146 + g.reload();
  147 + });
  148 + });
  149 + }
  150 +}
  151 +
  152 +//关闭店铺
  153 +$('#basicTable').on('click', '.closeshops', function() {
  154 + var item=g.rows[$(this).data("index")];
  155 + Bll.toast("确定要关闭此店铺吗?","/supplier/store/closeShops",item.shopsId);
  156 +});
  157 +
  158 +//开启店铺
  159 +$('#basicTable').on('click', '.openshops', function() {
  160 + var item=g.rows[$(this).data("index")];
  161 + Bll.toast("确定要开启此店铺吗?","/supplier/store/openShops",item.shopsId);
127 }); 162 });
@@ -9,22 +9,24 @@ var curPlatform = "shopWeb-pc"; //当前渲染页面用的模板名称 @@ -9,22 +9,24 @@ var curPlatform = "shopWeb-pc"; //当前渲染页面用的模板名称
9 var curTemplateType = "2"; //当前模板类型 1:基础模板,2:经典模板 9 var curTemplateType = "2"; //当前模板类型 1:基础模板,2:经典模板
10 var shopType = 1; //店铺类型 1:单品牌,2:多品牌 10 var shopType = 1; //店铺类型 1:单品牌,2:多品牌
11 var shopOperate = 'view'; //操作 editor:可编辑, view:查看不可编辑 11 var shopOperate = 'view'; //操作 editor:可编辑, view:查看不可编辑
  12 +var defaultSrc = "http://cdn.yoho.cn/yohobuy-portal/assets/images/shop.png"; //初始化默认图片路径
12 var ENUM = { 13 var ENUM = {
13 - "editor-largePic":{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0},  
14 - "editor-smallPic":{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}, 14 + "editor-largePic":{"src": defaultSrc, "url": "", "startTime": "", "endTime": "", "publishStatus": 0},
  15 + "editor-largePic2":{"position":"", "data":[{"src": defaultSrc, "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
  16 + "editor-smallPic":{"src": defaultSrc, "url": "", "startTime": "", "endTime": "", "publishStatus": 0},
15 "editor-brand":{"position":"", "name":"", "url":""}, 17 "editor-brand":{"position":"", "name":"", "url":""},
16 - "editor-recommend": {"position":"", "name":"", "enName":"", "src":"", "url":"","isShowInApp":"Y"},  
17 - "editor-hotRecommend":{"position":"", "src":"", "url":""},  
18 - "editor-signboard":{"position":"", "src":"", "url":"","startTime": "","endTime": "","publishStatus": 0}, 18 + "editor-recommend": {"position":"", "name":"", "enName":"", "src":defaultSrc, "url":"","isShowInApp":"Y"},
  19 + "editor-hotRecommend":{"position":"", "src":defaultSrc, "url":""},
  20 + "editor-signboard":{"position":"", "src":defaultSrc, "url":"","startTime": "","endTime": "","publishStatus": 0},
19 "editor-newGoodTab":{"position":"", "name":"", "url":""}, 21 "editor-newGoodTab":{"position":"", "name":"", "url":""},
20 "editor-hotGoodTab":{"position":"", "name":"", "url":""}, 22 "editor-hotGoodTab":{"position":"", "name":"", "url":""},
21 - "editor-newProduct":{"productId":"", "position":"", "productName":"", "productPrice":"", "src":"", "url":""},  
22 - "editor-hotProduct":{"productId":"", "position":"", "productName":"", "productPrice":"", "src":"", "url":""} 23 + "editor-newProduct":{"productId":"", "position":"", "productName":"", "productSkn":"", "salesPrice":"", "src":"", "url":""},
  24 + "editor-hotProduct":{"productId":"", "position":"", "productName":"", "productSkn":"", "salesPrice":"", "src":"", "url":""}
23 }; //添加一条不同弹层使用的初始化模板 25 }; //添加一条不同弹层使用的初始化模板
24 var resourcesNew = { 26 var resourcesNew = {
25 "shopTopBanner":{ 27 "shopTopBanner":{
26 "id":"", 28 "id":"",
27 - "data": [{"shopSrc": "", "detailSrc": "", "isShowShopName": "Y"}] 29 + "data": [{"shopSrc": defaultSrc, "detailSrc": defaultSrc, "isShowShopName": "N"}]
28 }, 30 },
29 "navigationBar":{ 31 "navigationBar":{
30 "id":"", 32 "id":"",
@@ -32,19 +34,13 @@ var resourcesNew = { @@ -32,19 +34,13 @@ var resourcesNew = {
32 }, 34 },
33 "largeSlideImg":{ 35 "largeSlideImg":{
34 "id":"", 36 "id":"",
35 - "data": [  
36 - {"position": 5, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},  
37 - {"position": 4, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},  
38 - {"position": 3, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},  
39 - {"position": 2, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},  
40 - {"position": 1, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]}  
41 - ] 37 + "data": [{"position": 1, "data":[{"src": defaultSrc, "url": "", "startTime": "", "endTime": ""}]}]
42 }, 38 },
43 "oneRowTwoColImages":{ 39 "oneRowTwoColImages":{
44 "id":"", 40 "id":"",
45 "data": [ 41 "data": [
46 - {"position": 2, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},  
47 - {"position": 1, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]} 42 + {"position": 2, "data":[{"src": defaultSrc, "url": "", "startTime": "", "endTime": ""}]},
  43 + {"position": 1, "data":[{"src": defaultSrc, "url": "", "startTime": "", "endTime": ""}]}
48 ] 44 ]
49 }, 45 },
50 "brandBrowse":{ 46 "brandBrowse":{
@@ -54,16 +50,16 @@ var resourcesNew = { @@ -54,16 +50,16 @@ var resourcesNew = {
54 "recommend":{ 50 "recommend":{
55 "id":"", 51 "id":"",
56 "title":"经典推荐", 52 "title":"经典推荐",
57 - "data": [{"position":1, "name":"", "enName":"", "src":"", "url":"","isShowInApp":"Y"}] 53 + "data": [{"position":1, "name":"默认商品", "enName":"", "src":defaultSrc, "url":"","isShowInApp":"Y"}]
58 }, 54 },
59 "hotRecommend":{ 55 "hotRecommend":{
60 "id":"", 56 "id":"",
61 - "title":"热销推荐",  
62 - "data": [{"position":1, "src":"", "url":""}] 57 + "title":"",
  58 + "data": [{"position":1, "src":defaultSrc, "url":""}]
63 }, 59 },
64 "signboard":{ 60 "signboard":{
65 "id":"", 61 "id":"",
66 - "data": [{"position":1, "src":"", "url":"", "startTime": "", "endTime": "", "publishStatus": 0}] 62 + "data": [{"position": 1, "data":[{"src": defaultSrc, "url": "", "startTime": "", "endTime": ""}]}]
67 }, 63 },
68 "goodsTabBar":{ 64 "goodsTabBar":{
69 "id":"", 65 "id":"",
@@ -74,14 +70,44 @@ var resourcesNew = { @@ -74,14 +70,44 @@ var resourcesNew = {
74 }, 70 },
75 "newProducts":{ 71 "newProducts":{
76 "id":"", 72 "id":"",
77 - "data": [{"productId":"0", "position":1, "productName":"默认商品", "productPrice":"默认价格", "src":"", "url":""}] 73 + "data": []
78 }, 74 },
79 "hotProducts":{ 75 "hotProducts":{
80 "id":"", 76 "id":"",
81 - "data": [{"productId":"0", "position":1, "productName":"默认商品", "productPrice":"默认价格", "src":"", "url":""}] 77 + "data": []
  78 + },
  79 + "allNewProducts":{
  80 + "id":"",
  81 + "data":[]
  82 + },
  83 + "allHotProducts":{
  84 + "id":"",
  85 + "data":[]
  86 + },
  87 + "shopTopBanner_APP":{
  88 + "id":"",
  89 + "isUsed":"N",
  90 + "data": [{"shopSrc": defaultSrc, "detailSrc": defaultSrc, "isShowShopName": "N"}]
  91 + },
  92 + "oneRowTwoColImages_APP":{
  93 + "id":"",
  94 + "isUsed":"N",
  95 + "data": [
  96 + {"position": 2, "data":[{"src": defaultSrc, "url": "", "startTime": "", "endTime": ""}]},
  97 + {"position": 1, "data":[{"src": defaultSrc, "url": "", "startTime": "", "endTime": ""}]}
  98 + ]
  99 + },
  100 + "hotProducts_APP":{
  101 + "id":"",
  102 + "isUsed":"N",
  103 + "data": []
  104 + },
  105 + "allHotProducts_APP":{
  106 + "id":"",
  107 + "data":[]
82 } 108 }
83 } //初始化装修信息json 109 } //初始化装修信息json
84 -var shopsId, _id, jsonMain, jsonClone, topNewProducts, topHotProducts; 110 +var shopsId, _id, jsonMain, jsonClone;
85 111
86 getParams(); 112 getParams();
87 findDecoration(); 113 findDecoration();
@@ -113,10 +139,11 @@ function getParams(){ @@ -113,10 +139,11 @@ function getParams(){
113 } 139 }
114 //json渲染模板 140 //json渲染模板
115 function showMain(){ 141 function showMain(){
116 - $('#templateSelect').val(curTemplateType); 142 + $('#templateSelect').val(jsonMain.templateType);
117 $("input[name='brandLevel'][value='"+curTemplateType+"']").attr('checked',"checked"); 143 $("input[name='brandLevel'][value='"+curTemplateType+"']").attr('checked',"checked");
118 144
119 if(curPlatform == "shopWeb-pc"){ 145 if(curPlatform == "shopWeb-pc"){
  146 + //console.log(jsonMain);
120 $('#main').empty().html(common.util.__template2($("#"+curPlatform+"-"+curTemplateType).html(),jsonMain)); 147 $('#main').empty().html(common.util.__template2($("#"+curPlatform+"-"+curTemplateType).html(),jsonMain));
121 } else if(curPlatform == "shopWeb-app"){ 148 } else if(curPlatform == "shopWeb-app"){
122 $('#main').empty().html(common.util.__template2($("#"+curPlatform).html(),jsonMain)); 149 $('#main').empty().html(common.util.__template2($("#"+curPlatform).html(),jsonMain));
@@ -127,6 +154,12 @@ function showMain(){ @@ -127,6 +154,12 @@ function showMain(){
127 }else if(shopType == 1){ 154 }else if(shopType == 1){
128 $(".model-brand").hide(); 155 $(".model-brand").hide();
129 } 156 }
  157 + //标签长度样式自适应
  158 + $.each($(".contentpanel-pc .model-showTitle .showTab"),function(){
  159 + if($(this).width() > 280){
  160 + $(this).css("right",(280-($(this).width()))+"px");
  161 + }
  162 + })
130 showEditorIconEvent(); 163 showEditorIconEvent();
131 } 164 }
132 //弹窗编辑主流程 165 //弹窗编辑主流程
@@ -170,27 +203,40 @@ function findDecoration(){ @@ -170,27 +203,40 @@ function findDecoration(){
170 } 203 }
171 }, 204 },
172 function(rs) { 205 function(rs) {
173 - //console.log(rs.data); 206 + console.log(rs.data);
174 if(rs.data){ 207 if(rs.data){
175 jsonMain = rs.data; 208 jsonMain = rs.data;
176 } 209 }
177 - if(jsonMain.templateName){  
178 - curTemplateType = jsonMain.templateName;  
179 - }  
180 //没有装修信息,初始化装修信息 210 //没有装修信息,初始化装修信息
181 if($.isEmptyObject(jsonMain.resources)){ 211 if($.isEmptyObject(jsonMain.resources)){
182 jsonMain.resources = $.extend(true,{},resourcesNew); 212 jsonMain.resources = $.extend(true,{},resourcesNew);
183 } 213 }
184 //装修信息中品牌内容为空,初始化品牌 214 //装修信息中品牌内容为空,初始化品牌
185 - if(jsonMain.resources.brandBrowse.data.length < 1 && jsonMain.brandList){  
186 - cloneArr(jsonMain.brandList,jsonMain.resources.brandBrowse.data); 215 + if(jsonMain.brandList){
  216 + if(jsonMain.resources.brandBrowse.data.length < 1){
  217 + cloneArr(jsonMain.brandList,jsonMain.resources.brandBrowse.data);
  218 + }
  219 + }else{
  220 + common.util.__tip("店铺没有品牌,无法装修,请返回添加品牌!");
  221 + return;
  222 + }
  223 + if(jsonMain.templateType && jsonMain.templateType != "0"){
  224 + curTemplateType = jsonMain.templateType;
187 } 225 }
188 //装修json克隆 226 //装修json克隆
189 jsonClone = $.extend(true,{},jsonMain); 227 jsonClone = $.extend(true,{},jsonMain);
  228 +
190 //最新上架,最热商品接口 229 //最新上架,最热商品接口
191 if(shopOperate == 'editor'){ 230 if(shopOperate == 'editor'){
192 - findTopNewProducts();  
193 - findTopHotProducts(); 231 + if(!jsonMain.resources.allNewProducts.data || jsonMain.resources.allNewProducts.data.length < 1){
  232 + findTopNewProducts();
  233 + }
  234 + if(!jsonMain.resources.allHotProducts.data || jsonMain.resources.allHotProducts.data.length < 1){
  235 + findTopHotProducts();
  236 + }
  237 + if(!jsonMain.resources.allHotProducts_APP.data || jsonMain.resources.allHotProducts_APP.data.length < 1){
  238 + findTopHotProducts_APP();
  239 + }
194 } 240 }
195 showMain(); 241 showMain();
196 },true); 242 },true);
@@ -204,7 +250,9 @@ function findTopNewProducts(){ @@ -204,7 +250,9 @@ function findTopNewProducts(){
204 "size": 20 250 "size": 20
205 } 251 }
206 },function(rs){ 252 },function(rs){
207 - topNewProducts = rs.data; 253 + if(rs.data.product_list){
  254 + jsonMain.resources.allNewProducts.data = rs.data.product_list;
  255 + }
208 },true); 256 },true);
209 } 257 }
210 //Ajax热销商品 258 //Ajax热销商品
@@ -216,23 +264,39 @@ function findTopHotProducts(){ @@ -216,23 +264,39 @@ function findTopHotProducts(){
216 "size": 20 264 "size": 20
217 } 265 }
218 },function(rs){ 266 },function(rs){
219 - topHotProducts = rs.data; 267 + if(rs.data.product_list){
  268 + jsonMain.resources.allHotProducts.data = rs.data.product_list;
  269 + }
  270 + },true);
  271 +}
  272 +//Ajax热销商品---APP
  273 +function findTopHotProducts_APP(){
  274 + common.util.__ajax({
  275 + url:'/store/shop-decoration-hotProducts',
  276 + data: {
  277 + "shopsId": jsonMain.shopsId,
  278 + "size": 20
  279 + }
  280 + },function(rs){
  281 + if(rs.data.product_list){
  282 + jsonMain.resources.allHotProducts_APP.data = rs.data.product_list;
  283 + }
220 },true); 284 },true);
221 } 285 }
222 //Ajax保存,暂存:100,提交审核:200 286 //Ajax保存,暂存:100,提交审核:200
223 function saveDecoration(submitStatus){ 287 function saveDecoration(submitStatus){
  288 + console.log(jsonMain);
224 common.util.__ajax({ 289 common.util.__ajax({
225 url:'/store/shop-decoration-save', 290 url:'/store/shop-decoration-save',
226 data: { 291 data: {
227 "submitStatus": submitStatus, 292 "submitStatus": submitStatus,
228 "shopsId": jsonMain.shopsId, 293 "shopsId": jsonMain.shopsId,
229 "platform": jsonMain.platform, 294 "platform": jsonMain.platform,
230 - "templateName": jsonMain.templateName, 295 + "templateType": jsonMain.templateType,
231 "resources": JSON.stringify(jsonMain.resources) 296 "resources": JSON.stringify(jsonMain.resources)
232 } 297 }
233 },function(rs){ 298 },function(rs){
234 if(rs.data){ 299 if(rs.data){
235 - //console.log(rs.data);  
236 if(submitStatus == 100){ 300 if(submitStatus == 100){
237 jsonMain = rs.data; 301 jsonMain = rs.data;
238 jsonClone = $.extend(true,{},jsonMain); 302 jsonClone = $.extend(true,{},jsonMain);
@@ -247,7 +311,7 @@ function saveDecoration(submitStatus){ @@ -247,7 +311,7 @@ function saveDecoration(submitStatus){
247 } 311 }
248 //Ajax审核,审核通过:300,驳回:900 312 //Ajax审核,审核通过:300,驳回:900
249 function checkDecoration(checkStatus,comment){ 313 function checkDecoration(checkStatus,comment){
250 - if(comment){ 314 + if(comment){ //驳回
251 common.util.__ajax({ 315 common.util.__ajax({
252 url:'/store/shop-decoration-check', 316 url:'/store/shop-decoration-check',
253 data: { 317 data: {
@@ -256,12 +320,12 @@ function checkDecoration(checkStatus,comment){ @@ -256,12 +320,12 @@ function checkDecoration(checkStatus,comment){
256 "comment": comment 320 "comment": comment
257 } 321 }
258 },function(rs){ 322 },function(rs){
259 - common.util.__tip("审核通过成功!","success"); 323 + common.util.__tip("审核驳回成功!","success");
260 setTimeout(function() { 324 setTimeout(function() {
261 location.href="/supplier/check/index"; 325 location.href="/supplier/check/index";
262 }, 1000); 326 }, 1000);
263 },true); 327 },true);
264 - }else{ 328 + }else{ //通过
265 common.util.__ajax({ 329 common.util.__ajax({
266 url:'/store/shop-decoration-check', 330 url:'/store/shop-decoration-check',
267 data: { 331 data: {
@@ -269,7 +333,7 @@ function checkDecoration(checkStatus,comment){ @@ -269,7 +333,7 @@ function checkDecoration(checkStatus,comment){
269 "checkStatus": checkStatus 333 "checkStatus": checkStatus
270 } 334 }
271 },function(rs){ 335 },function(rs){
272 - common.util.__tip("审核驳回成功!","success"); 336 + common.util.__tip("审核通过成功!","success");
273 setTimeout(function() { 337 setTimeout(function() {
274 location.href="/supplier/check/index"; 338 location.href="/supplier/check/index";
275 }, 1000); 339 }, 1000);
@@ -284,28 +348,51 @@ function gridInit(id){ @@ -284,28 +348,51 @@ function gridInit(id){
284 switch (id){ 348 switch (id){
285 //店铺顶部banner 349 //店铺顶部banner
286 case "editor-banner": 350 case "editor-banner":
287 - g = new common.grid({  
288 - hash: false,  
289 - el:"#"+id,  
290 - columns:[  
291 - {display:"店铺banner图片", render:function(item){  
292 - return "<input type=file name='shopBannerImage' id='shopBannerImage_"+item.__index+"' value='"+item.shopSrc+"' />";  
293 - }},  
294 - {display:"是否显示店铺名称", render:function(item){  
295 - if(item.isShowShopName == "Y"){  
296 - return "<lable><input type='radio' name='isShowShopName' value='Y' checked='checked'>显示店铺名称</lable><br>" +  
297 - "<lable><input type='radio' name='isShowShopName' value='N'>不显示店铺名称</lable>";  
298 - }else{  
299 - return "<lable><input type='radio' name='isShowShopName' value='Y'>显示店铺名称</lable><br>" +  
300 - "<lable><input type='radio' name='isShowShopName' value='N' checked='checked'>不显示店铺名称</lable>";  
301 - }  
302 - }},  
303 - {display:"商品详情页banner图片", render:function(item){  
304 - return "<input type=file name='DetailbannerImage' id='DetailbannerImage_"+item.__index+"' value='"+item.detailSrc+"' />";  
305 - }}  
306 - ]  
307 - });  
308 - g.__rows=""||jsonClone.resources.shopTopBanner.data; 351 + if(curPlatform == "shopWeb-pc"){
  352 + g = new common.grid({
  353 + hash: false,
  354 + el:"#"+id,
  355 + columns:[
  356 + {display:"店铺banner图片", render:function(item){
  357 + return "<input type=file name='shopBannerImage' id='shopBannerImage_"+item.__index+"' value='"+item.shopSrc+"' />";
  358 + }},
  359 + {display:"是否显示店铺名称", render:function(item){
  360 + if(item.isShowShopName == "Y"){
  361 + return "<lable><input type='radio' name='isShowShopName' value='Y' checked='checked'>显示店铺名称</lable><br>" +
  362 + "<lable><input type='radio' name='isShowShopName' value='N'>不显示店铺名称</lable>";
  363 + }else{
  364 + return "<lable><input type='radio' name='isShowShopName' value='Y'>显示店铺名称</lable><br>" +
  365 + "<lable><input type='radio' name='isShowShopName' value='N' checked='checked'>不显示店铺名称</lable>";
  366 + }
  367 + }},
  368 + {display:"商品详情页banner图片", render:function(item){
  369 + return "<input type=file name='DetailbannerImage' id='DetailbannerImage_"+item.__index+"' value='"+item.detailSrc+"' />";
  370 + }}
  371 + ]
  372 + });
  373 + g.__rows=""||jsonClone.resources.shopTopBanner.data;
  374 + }
  375 + if(curPlatform == "shopWeb-app"){
  376 + g = new common.grid({
  377 + hash: false,
  378 + el:"#"+id,
  379 + columns:[
  380 + {display:"店铺banner图片", render:function(item){
  381 + return "<input type=file name='shopBannerImage' id='shopBannerImage_"+item.__index+"' value='"+item.shopSrc+"' />";
  382 + }},
  383 + {display:"是否显示店铺名称", render:function(item){
  384 + if(item.isShowShopName == "Y"){
  385 + return "<lable><input type='radio' name='isShowShopName' value='Y' checked='checked'>显示店铺名称</lable><br>" +
  386 + "<lable><input type='radio' name='isShowShopName' value='N'>不显示店铺名称</lable>";
  387 + }else{
  388 + return "<lable><input type='radio' name='isShowShopName' value='Y'>显示店铺名称</lable><br>" +
  389 + "<lable><input type='radio' name='isShowShopName' value='N' checked='checked'>不显示店铺名称</lable>";
  390 + }
  391 + }}
  392 + ]
  393 + });
  394 + g.__rows=""||jsonClone.resources.shopTopBanner_APP.data;
  395 + }
309 g.init(g.__rows); 396 g.init(g.__rows);
310 break; 397 break;
311 398
@@ -316,7 +403,7 @@ function gridInit(id){ @@ -316,7 +403,7 @@ function gridInit(id){
316 el:"#"+id, 403 el:"#"+id,
317 columns:[ 404 columns:[
318 {display:"编号", render:function(item){ 405 {display:"编号", render:function(item){
319 - return item.__index+1; 406 + return item.__index+1;
320 }}, 407 }},
321 {display:"名称", render:function(item){ 408 {display:"名称", render:function(item){
322 return "<input class='form-control inputChange' type=text name='name' value='"+item.name+"' data-index='"+item.__index+"' maxlength='5' />"; 409 return "<input class='form-control inputChange' type=text name='name' value='"+item.name+"' data-index='"+item.__index+"' maxlength='5' />";
@@ -332,20 +419,26 @@ function gridInit(id){ @@ -332,20 +419,26 @@ function gridInit(id){
332 419
333 //店铺大图资源位 420 //店铺大图资源位
334 case "editor-largePic": 421 case "editor-largePic":
  422 + $('.editorTitle').html("<a href='javascript:' class='btn btn-success addBtn2' style='margin-right: 20px'><i class='fa fa-plus'></i> 添加资源大图</a><span class='largePicAddTip'></span>").css("margin-bottom","10px");
335 g = new common.grid({ 423 g = new common.grid({
336 hash: false, 424 hash: false,
337 el:"#"+id, 425 el:"#"+id,
338 columns:[ 426 columns:[
339 {display:"排序", render:function(item){ 427 {display:"排序", render:function(item){
  428 + item.position=item.position || (item.__index+1);
340 return "<input class='form-control numInput inputChange' type=text name='position' value='"+item.position+"' data-index='"+item.__index+"' />"; 429 return "<input class='form-control numInput inputChange' type=text name='position' value='"+item.position+"' data-index='"+item.__index+"' />";
341 }}, 430 }},
342 - {  
343 - display:"<div class='row'><div class='col-sm-2'>图片</div><div class='col-sm-3'>链接</div><div class='col-sm-2'>开始时间</div><div class='col-sm-2'>结束时间</div> " +  
344 - "<div class='col-sm-1'>状态</div><div class='col-sm-2'>操作</div></div>", 431 + {display:"<div class='row'><div class='col-sm-2'>图片</div><div class='col-sm-3'>链接</div><div class='col-sm-2'>开始时间</div><div class='col-sm-2'>结束时间</div> " +
  432 + "<div class='col-sm-1'>状态</div><div class='col-sm-2'>操作</div></div>",
345 render: function (item) { 433 render: function (item) {
346 return resourcesHtmlInit(item,"largePic"); 434 return resourcesHtmlInit(item,"largePic");
347 } 435 }
348 - } 436 + },
  437 + {display:"操作", render:function(item){
  438 + if(g.__rows.length > 1){
  439 + return "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' />";
  440 + }
  441 + }}
349 ] 442 ]
350 }); 443 });
351 g.__rows=""||jsonClone.resources.largeSlideImg.data; 444 g.__rows=""||jsonClone.resources.largeSlideImg.data;
@@ -370,7 +463,12 @@ function gridInit(id){ @@ -370,7 +463,12 @@ function gridInit(id){
370 } 463 }
371 ] 464 ]
372 }); 465 });
373 - g.__rows=""||jsonClone.resources.oneRowTwoColImages.data; 466 + if(curPlatform == "shopWeb-pc"){
  467 + g.__rows=""||jsonClone.resources.oneRowTwoColImages.data;
  468 + }
  469 + if(curPlatform == "shopWeb-app"){
  470 + g.__rows=""||jsonClone.resources.oneRowTwoColImages_APP.data;
  471 + }
374 g.init(g.__rows); 472 g.init(g.__rows);
375 break; 473 break;
376 474
@@ -460,7 +558,7 @@ function gridInit(id){ @@ -460,7 +558,7 @@ function gridInit(id){
460 return "<input class='form-control numInput inputChange' type=text name='position' value='"+item.position+"' data-index='"+item.__index+"' />"; 558 return "<input class='form-control numInput inputChange' type=text name='position' value='"+item.position+"' data-index='"+item.__index+"' />";
461 }}, 559 }},
462 {display:"图片", render:function(item){ 560 {display:"图片", render:function(item){
463 - return "<input type=file name='signboardImage' id='signboardImage_"+item.__index+"' value='"+item.src+"' />"; 561 + return "<input type=file name='signboardImage' id='hotRecommendImage_"+item.__index+"' value='"+item.src+"' />";
464 }}, 562 }},
465 {display:"链接", render:function(item){ 563 {display:"链接", render:function(item){
466 return "<input class='form-control inputChange' type=text name='url' value='"+item.url+"' data-index='"+item.__index+"' />"; 564 return "<input class='form-control inputChange' type=text name='url' value='"+item.url+"' data-index='"+item.__index+"' />";
@@ -492,6 +590,7 @@ function gridInit(id){ @@ -492,6 +590,7 @@ function gridInit(id){
492 590
493 //水牌signboard 591 //水牌signboard
494 case "editor-signboard": 592 case "editor-signboard":
  593 + $('.editorTitle').html("<a href='javascript:' class='btn btn-success addBtn2' style='margin-right: 20px'><i class='fa fa-plus'></i> 添加水牌</a><span class='largePicAddTip'></span>").css("margin-bottom","10px");
495 g = new common.grid({ 594 g = new common.grid({
496 hash: false, 595 hash: false,
497 el:"#"+id, 596 el:"#"+id,
@@ -500,34 +599,16 @@ function gridInit(id){ @@ -500,34 +599,16 @@ function gridInit(id){
500 item.position=item.position || (item.__index+1); 599 item.position=item.position || (item.__index+1);
501 return "<input class='form-control numInput inputChange' type=text name='position' value='"+item.position+"' data-index='"+item.__index+"' />"; 600 return "<input class='form-control numInput inputChange' type=text name='position' value='"+item.position+"' data-index='"+item.__index+"' />";
502 }}, 601 }},
503 - {display:"图片", render:function(item){  
504 - return "<input type=file name='signboardImage' id='signboardImage_"+item.__index+"' value='"+item.src+"' />";  
505 - }},  
506 - {display:"链接", render:function(item){  
507 - return "<input class='form-control inputChange' type=text name='url' value='"+item.url+"' data-index='"+item.__index+"' />";  
508 - }},  
509 - {display:"开始时间", render:function(item){  
510 - return "<input type=text class='form-control inputChange' readOnly='true' jsaction='time:end:endTime_"+item.__index+"' id='startTime_"+item.__index+"' name='startTime' value='"+item.startTime+"' data-index='"+item.__index+"' />";  
511 - }},  
512 - {display:"结束时间", render:function(item){  
513 - return "<input type=text class='form-control inputChange' readOnly='true' jsaction='time:start:startTime_"+item.__index+"' id='endTime_"+item.__index+"' name='endTime' value='"+item.endTime+"' data-index='"+item.__index+"' />";  
514 - }},  
515 - {display:"状态", render:function(item){  
516 - return "<span style='white-space: nowrap'>" + (item.publishStatus==0?"未发布":"已发布") + "</span>";  
517 - }},  
518 - {display:"操作", render:function(item){  
519 - var htmlPic = "",i=item.__index;  
520 - if(i == (g.__rows.length-1) && g.__rows.length > 1){  
521 - htmlPic += "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' /><br>";  
522 - htmlPic += "<input type=button class='btn btn-info btn-xs addBtn' style='margin-top: 10px' value='添加一条' data-index='"+item.__index+"' />";  
523 - }  
524 - if(i < (g.__rows.length-1) && g.__rows.length > 1){  
525 - htmlPic += "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' />"; 602 + {display:"<div class='row'><div class='col-sm-2'>图片</div><div class='col-sm-3'>链接</div><div class='col-sm-2'>开始时间</div><div class='col-sm-2'>结束时间</div> " +
  603 + "<div class='col-sm-1'>状态</div><div class='col-sm-2'>操作</div></div>",
  604 + render: function (item) {
  605 + return resourcesHtmlInit(item,"signboard");
526 } 606 }
527 - if(i == (g.__rows.length-1) && g.__rows.length == 1){  
528 - htmlPic += "<input type=button class='btn btn-info btn-xs addBtn' value='添加一条' data-index='"+item.__index+"' />"; 607 + },
  608 + {display:"操作", render:function(item){
  609 + if(g.__rows.length > 1){
  610 + return "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' />";
529 } 611 }
530 - return htmlPic;  
531 }} 612 }}
532 ] 613 ]
533 }); 614 });
@@ -634,12 +715,7 @@ function gridInit(id){ @@ -634,12 +715,7 @@ function gridInit(id){
634 //新品上架 715 //新品上架
635 case "editor-newProduct": 716 case "editor-newProduct":
636 $("#"+id).html("<div id='editor-newProduct-grid' style='width: 500px; float: left'></div><div class='top20List' style='float: left;margin-left: 40px'></div> "); 717 $("#"+id).html("<div id='editor-newProduct-grid' style='width: 500px; float: left'></div><div class='top20List' style='float: left;margin-left: 40px'></div> ");
637 - if(topNewProducts){  
638 - $("#"+id+" .top20List").html(common.util.__template2($("#top20Products").html(),topNewProducts));  
639 - }else{  
640 - $("#"+id+" .top20List").html("最新上架20条加载失败,请重新加载!");  
641 - }  
642 - 718 + //左侧已选商品
643 g = new common.grid({ 719 g = new common.grid({
644 hash: false, 720 hash: false,
645 el:"#editor-newProduct-grid", 721 el:"#editor-newProduct-grid",
@@ -659,18 +735,19 @@ function gridInit(id){ @@ -659,18 +735,19 @@ function gridInit(id){
659 }); 735 });
660 g.__rows=""||jsonClone.resources.newProducts.data; 736 g.__rows=""||jsonClone.resources.newProducts.data;
661 g.init(g.__rows); 737 g.init(g.__rows);
662 - productTopDataLink(g.__rows); 738 + //右侧热销排名前20商品
  739 + if(jsonMain.resources.allNewProducts.data.length > 0){
  740 + $("#"+id+" .top20List").html(common.util.__template2($("#top20Products").html(),jsonMain.resources.allNewProducts));
  741 + productTopDataLink(g.__rows);
  742 + }else{
  743 + $("#"+id+" .top20List").html("<font color='red'>*&nbsp;&nbsp;最新上架20条加载失败,请重新加载页面!</font>");
  744 + }
663 break; 745 break;
664 746
665 //人气单品 747 //人气单品
666 case "editor-hotProduct": 748 case "editor-hotProduct":
667 $("#"+id).html("<div id='editor-hotProduct-grid' style='width: 500px; float: left'></div><div class='top20List' style='float: left;margin-left: 40px'></div> "); 749 $("#"+id).html("<div id='editor-hotProduct-grid' style='width: 500px; float: left'></div><div class='top20List' style='float: left;margin-left: 40px'></div> ");
668 - if(topHotProducts){  
669 - $("#"+id+" .top20List").html(common.util.__template2($("#top20Products").html(),topHotProducts));  
670 - }else{  
671 - $("#"+id+" .top20List").html("最新上架20条加载失败,请重新加载!");  
672 - }  
673 - 750 + //左侧已选商品
674 g = new common.grid({ 751 g = new common.grid({
675 hash: false, 752 hash: false,
676 el:"#editor-hotProduct-grid", 753 el:"#editor-hotProduct-grid",
@@ -688,9 +765,27 @@ function gridInit(id){ @@ -688,9 +765,27 @@ function gridInit(id){
688 }} 765 }}
689 ] 766 ]
690 }); 767 });
691 - g.__rows=""||jsonClone.resources.hotProducts.data; 768 + if(curPlatform == "shopWeb-pc"){
  769 + g.__rows=""||jsonClone.resources.hotProducts.data;
  770 + //右侧热销排名前20商品
  771 + if(jsonMain.resources.allHotProducts.data.length > 0){
  772 + $("#"+id+" .top20List").html(common.util.__template2($("#top20Products").html(),jsonMain.resources.allHotProducts));
  773 + productTopDataLink(g.__rows);
  774 + }else{
  775 + $("#"+id+" .top20List").html("<font color='red'>*&nbsp;&nbsp;最新上架20条加载失败,请重新加载页面!</font>");
  776 + }
  777 + }
  778 + if(curPlatform == "shopWeb-app"){
  779 + g.__rows=""||jsonClone.resources.hotProducts_APP.data;
  780 + //右侧热销排名前20商品
  781 + if(jsonMain.resources.allHotProducts_APP.data.length > 0){
  782 + $("#"+id+" .top20List").html(common.util.__template2($("#top20Products").html(),jsonMain.resources.allHotProducts_APP));
  783 + productTopDataLink(g.__rows);
  784 + }else{
  785 + $("#"+id+" .top20List").html("<font color='red'>*&nbsp;&nbsp;最新上架20条加载失败,请重新加载页面!</font>");
  786 + }
  787 + }
692 g.init(g.__rows); 788 g.init(g.__rows);
693 - productTopDataLink(g.__rows);  
694 break; 789 break;
695 790
696 default : 791 default :
@@ -703,9 +798,24 @@ function freshJson(id,data,status){ @@ -703,9 +798,24 @@ function freshJson(id,data,status){
703 case "editor-banner": 798 case "editor-banner":
704 if(status == 1){ 799 if(status == 1){
705 data[0].isShowShopName = $("input[name='isShowShopName']:checked").val(); 800 data[0].isShowShopName = $("input[name='isShowShopName']:checked").val();
706 - cloneArr(data,jsonMain.resources.shopTopBanner.data); 801 + if(curPlatform == "shopWeb-app"){
  802 + jsonMain.resources.shopTopBanner_APP.isUsed = "Y";
  803 + cloneArr(data,jsonMain.resources.shopTopBanner_APP.data);
  804 + }
  805 + if(curPlatform == "shopWeb-pc"){
  806 + cloneArr(data,jsonMain.resources.shopTopBanner.data);
  807 + if(jsonMain.resources.shopTopBanner_APP.isUsed == "N"){
  808 + cloneArr(data,jsonMain.resources.shopTopBanner_APP.data);
  809 + cloneArr(data,jsonClone.resources.shopTopBanner_APP.data);
  810 + }
  811 + }
707 }else if(status == 0){ 812 }else if(status == 0){
708 - cloneArr(jsonMain.resources.shopTopBanner.data,data); 813 + if(curPlatform == "shopWeb-app"){
  814 + cloneArr(jsonMain.resources.shopTopBanner_APP.data,data);
  815 + }
  816 + if(curPlatform == "shopWeb-pc"){
  817 + cloneArr(jsonMain.resources.shopTopBanner.data,data);
  818 + }
709 } 819 }
710 break; 820 break;
711 821
@@ -727,9 +837,24 @@ function freshJson(id,data,status){ @@ -727,9 +837,24 @@ function freshJson(id,data,status){
727 837
728 case "editor-smallPic": 838 case "editor-smallPic":
729 if(status == 1){ 839 if(status == 1){
730 - cloneArr(sortJson(data,1),jsonMain.resources.oneRowTwoColImages.data); 840 + if(curPlatform == "shopWeb-app"){
  841 + jsonMain.resources.oneRowTwoColImages_APP.isUsed = "Y";
  842 + cloneArr(sortJson(data,1),jsonMain.resources.oneRowTwoColImages_APP.data);
  843 + }
  844 + if(curPlatform == "shopWeb-pc"){
  845 + cloneArr(sortJson(data,1),jsonMain.resources.oneRowTwoColImages.data);
  846 + if(jsonMain.resources.oneRowTwoColImages_APP.isUsed == "N"){
  847 + cloneArr(sortJson(data,1),jsonMain.resources.oneRowTwoColImages_APP.data);
  848 + cloneArr(sortJson(data,1),jsonClone.resources.oneRowTwoColImages_APP.data);
  849 + }
  850 + }
731 }else if(status == 0){ 851 }else if(status == 0){
732 - cloneArr(jsonMain.resources.oneRowTwoColImages.data,data); 852 + if(curPlatform == "shopWeb-app"){
  853 + cloneArr(jsonMain.resources.oneRowTwoColImages_APP.data,data);
  854 + }
  855 + if(curPlatform == "shopWeb-pc"){
  856 + cloneArr(jsonMain.resources.oneRowTwoColImages.data,data);
  857 + }
733 } 858 }
734 break; 859 break;
735 860
@@ -793,9 +918,24 @@ function freshJson(id,data,status){ @@ -793,9 +918,24 @@ function freshJson(id,data,status){
793 918
794 case "editor-hotProduct": 919 case "editor-hotProduct":
795 if(status == 1){ 920 if(status == 1){
796 - cloneArr(sortJson(data,1),jsonMain.resources.hotProducts.data); 921 + if(curPlatform == "shopWeb-app"){
  922 + jsonMain.resources.hotProducts_APP.isUsed = "Y";
  923 + cloneArr(sortJson(data,1),jsonMain.resources.hotProducts_APP.data);
  924 + }
  925 + if(curPlatform == "shopWeb-pc"){
  926 + cloneArr(sortJson(data,1),jsonMain.resources.hotProducts.data);
  927 + if(jsonMain.resources.hotProducts_APP.isUsed == "N"){
  928 + cloneArr(sortJson(data,1),jsonMain.resources.hotProducts_APP.data);
  929 + cloneArr(sortJson(data,1),jsonClone.resources.hotProducts_APP.data);
  930 + }
  931 + }
797 }else if(status == 0){ 932 }else if(status == 0){
798 - cloneArr(jsonMain.resources.hotProducts.data,data); 933 + if(curPlatform == "shopWeb-app"){
  934 + cloneArr(jsonMain.resources.hotProducts_APP.data,data);
  935 + }
  936 + if(curPlatform == "shopWeb-pc"){
  937 + cloneArr(jsonMain.resources.hotProducts.data,data);
  938 + }
799 } 939 }
800 break; 940 break;
801 941
@@ -965,9 +1105,13 @@ function showEditorIconEvent(){ @@ -965,9 +1105,13 @@ function showEditorIconEvent(){
965 var _this = $(this); 1105 var _this = $(this);
966 var editorModelId = $(this).attr("data-toggle"); 1106 var editorModelId = $(this).attr("data-toggle");
967 var editorModelTitle = $(this).attr("data-title"); 1107 var editorModelTitle = $(this).attr("data-title");
968 -  
969 - var editorIcon = "<div class='editorBorder'></div>" +  
970 - "<a class='editorIcon' href='javascrip:'>编辑</a>" 1108 + var editorIcon = "";
  1109 + if(editorModelId == "editor-brand-app" || editorModelId == "editor-largePic-app" || editorModelId == "editor-recommend-app"){
  1110 + editorIcon += "<div class='editorBorder' style='border: 5px solid #ff69b4'></div>"
  1111 + }else{
  1112 + editorIcon += "<div class='editorBorder'></div>"
  1113 + }
  1114 + editorIcon += "<a class='editorIcon' href='javascript:'>编辑</a>"
971 _this.append(editorIcon); 1115 _this.append(editorIcon);
972 //编辑事件 1116 //编辑事件
973 editorIconEvent(editorModelTitle,editorModelId); 1117 editorIconEvent(editorModelTitle,editorModelId);
@@ -1006,14 +1150,18 @@ function untilEditorEvent(id){ @@ -1006,14 +1150,18 @@ function untilEditorEvent(id){
1006 var _index = obj.key.replace(/^file_onComplete_recommendImage_/,''); 1150 var _index = obj.key.replace(/^file_onComplete_recommendImage_/,'');
1007 g.__rows[_index].src = obj.data; 1151 g.__rows[_index].src = obj.data;
1008 } 1152 }
  1153 + if(/^file_onComplete_hotRecommendImage_/.test(obj.key)){
  1154 + var _index = obj.key.replace(/^file_onComplete_hotRecommendImage_/,'');
  1155 + g.__rows[_index].src = obj.data;
  1156 + }
1009 if(/^file_onComplete_signboardImage_/.test(obj.key)){ 1157 if(/^file_onComplete_signboardImage_/.test(obj.key)){
1010 var _index = obj.key.replace(/^file_onComplete_signboardImage_/,''); 1158 var _index = obj.key.replace(/^file_onComplete_signboardImage_/,'');
1011 - g.__rows[_index].src = obj.data; 1159 + var _indexList = _index.split("_");
  1160 + g.__rows[_indexList[0]].data[_indexList[1]].src = obj.data;
1012 } 1161 }
1013 }); 1162 });
1014 $("#"+id+" nav").hide(); 1163 $("#"+id+" nav").hide();
1015 - $(".modal-dialog").css("width","900px");  
1016 - $(".modal-dialog .modal-body .editor-dialog").css("max-height","650px"); 1164 + $(".modal-dialog").css("width","960px");
1017 $(".modal-dialog .modal-body .editor-dialog").css("overflow-y","auto"); 1165 $(".modal-dialog .modal-body .editor-dialog").css("overflow-y","auto");
1018 $(".modal-dialog .modal-body .editor-dialog").css("overflow-x","hidden"); 1166 $(".modal-dialog .modal-body .editor-dialog").css("overflow-x","hidden");
1019 } 1167 }
@@ -1025,11 +1173,16 @@ function resourcesHtmlInit(item,resName){ @@ -1025,11 +1173,16 @@ function resourcesHtmlInit(item,resName){
1025 htmlPic += "<div class='row'>" + 1173 htmlPic += "<div class='row'>" +
1026 "<div class='col-sm-2'><input type=file name='"+ resName +"Image' id='"+ resName +"Image_"+item.__index+"_"+i+"' value='"+picList[i].src+"' /></div>" + 1174 "<div class='col-sm-2'><input type=file name='"+ resName +"Image' id='"+ resName +"Image_"+item.__index+"_"+i+"' value='"+picList[i].src+"' /></div>" +
1027 "<div class='col-sm-3'><input type=text class='form-control inputChange' name='url' value='"+ picList[i].url +"' data-index='"+ item.__index +"_"+ i +"' /></div>" + 1175 "<div class='col-sm-3'><input type=text class='form-control inputChange' name='url' value='"+ picList[i].url +"' data-index='"+ item.__index +"_"+ i +"' /></div>" +
1028 - "<div class='col-sm-2'>" +  
1029 - "<input type=text class='form-control inputChange' readOnly='true' jsaction='time:end:endTime_"+item.__index+"_"+ i +"' id='startTime_"+item.__index+"_"+ i +"' name='startTime' value='"+ picList[i].startTime +"' data-index='"+ item.__index +"_"+ i +"' /></div>" +  
1030 - "<div class='col-sm-2'>" +  
1031 - "<input type=text class='form-control inputChange' readOnly='true' jsaction='time:start:startTime_"+item.__index+"_"+ i +"' id='endTime_"+item.__index+"_"+ i +"' name='endTime' value='"+ picList[i].endTime +"' data-index='"+ item.__index +"_"+ i +"' /></div>" +  
1032 - "<div class='col-sm-1'><span style='white-space: nowrap;'>"+ (picList[i].publishStatus==0?"未发布":"已发布") +"</span></div>" + 1176 + "<div class='col-sm-2'>";
  1177 + if(i>0){
  1178 + htmlPic += "<input type=text class='form-control' disabled jsaction='time:end:endTime_"+item.__index+"_"+ i +"' id='startTime_"+item.__index+"_"+ i +"' name='startTime' value='"+ picList[i].startTime +"' />" +
  1179 + "<span style='color: #999; font-size: 12px'>*上一条结束时间</span>";
  1180 + }else{
  1181 + htmlPic += "<input type=text class='form-control inputChange' style='background-color:#fff' readOnly='true' jsaction='time:end:endTime_"+item.__index+"_"+ i +"' id='startTime_"+item.__index+"_"+ i +"' name='startTime' value='"+ picList[i].startTime +"' data-index='"+ item.__index +"_"+ i +"' />";
  1182 + }
  1183 + htmlPic += "</div><div class='col-sm-2'>" +
  1184 + "<input type=text class='form-control inputChange' style='background-color:#fff' readOnly='true' jsaction='time:start:startTime_"+item.__index+"_"+ i +"' id='endTime_"+item.__index+"_"+ i +"' name='endTime' value='"+ picList[i].endTime +"' data-index='"+ item.__index +"_"+ i +"' /></div>" +
  1185 + "<div class='col-sm-1'><span class='publishStatus' style='white-space: nowrap; line-height: 40px'>"+ checkdate(picList[i].startTime,picList[i].endTime) +"</span></div>" +
1033 "<div class='col-sm-2'>"; 1186 "<div class='col-sm-2'>";
1034 if(i == (picList.length-1) && picList.length > 1){ 1187 if(i == (picList.length-1) && picList.length > 1){
1035 htmlPic += "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+ item.__index +"_"+ i +"' /><br>"; 1188 htmlPic += "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+ item.__index +"_"+ i +"' /><br>";
@@ -1088,6 +1241,41 @@ function cloneArr(arr1,arr2){ @@ -1088,6 +1241,41 @@ function cloneArr(arr1,arr2){
1088 } 1241 }
1089 return arr2; 1242 return arr2;
1090 } 1243 }
  1244 +//时间校验
  1245 +function checkdate(startDate,endDate){
  1246 + if (endDate) {
  1247 + var endDateTemp = endDate.split(" ");
  1248 + var arrEndDate = endDateTemp[0].split("-");
  1249 + var arrEndTime = endDateTemp[1].split(":");
  1250 + var allEndDate = new Date(arrEndDate[0], parseInt(arrEndDate[1])-1, arrEndDate[2], arrEndTime[0], arrEndTime[1], arrEndTime[2]);
  1251 + }
  1252 + if(startDate){
  1253 + var startDateTemp = startDate.split(" ");
  1254 + var arrStartDate = startDateTemp[0].split("-");
  1255 + var arrStartTime = startDateTemp[1].split(":");
  1256 + var allStartDate = new Date(arrStartDate[0], parseInt(arrStartDate[1])-1, arrStartDate[2], arrStartTime[0], arrStartTime[1], arrStartTime[2]);
  1257 + }
  1258 + var nowDate = new Date();
  1259 +
  1260 + if(startDate && endDate){
  1261 + if(nowDate > allEndDate) {
  1262 + return "<b style='color: #ec971f'>已过期</b>";
  1263 + }else if(allStartDate > nowDate){
  1264 + return "<b style='color: #428bca'>未发布</b>";
  1265 + }else{
  1266 + return "<b style='color: #5cb85c'>发布中</b>";
  1267 + }
  1268 + }else if(!startDate && endDate){
  1269 + if(nowDate > allEndDate) {
  1270 + return "<b style='color: #ec971f'>已过期</b>";
  1271 + }else{
  1272 + return "<b style='color: #5cb85c'>发布中</b>";
  1273 + }
  1274 + }else{
  1275 + return "<b style='color: #428bca'>未发布</b>";
  1276 + }
  1277 + return true;
  1278 +}
1091 1279
1092 /********************事件绑定*********************/ 1280 /********************事件绑定*********************/
1093 1281
@@ -1109,20 +1297,18 @@ $(document).on("click","input[name=brandLevel]",function(){ @@ -1109,20 +1297,18 @@ $(document).on("click","input[name=brandLevel]",function(){
1109 }) 1297 })
1110 //选择使用模板 1298 //选择使用模板
1111 $(document).on("change","#templateSelect",function(){ 1299 $(document).on("change","#templateSelect",function(){
1112 - jsonMain.templateName = $(this).val(); 1300 + jsonMain.templateType = $(this).val();
  1301 + $(this).removeClass("error");
1113 }) 1302 })
1114 //暂存模板 1303 //暂存模板
1115 $(document).on("click","#saveModule",function(){ 1304 $(document).on("click","#saveModule",function(){
1116 - if(jsonMain.templateName == "0"){  
1117 - common.util.__tip("请选择展示使用模板!");  
1118 - return;  
1119 - }  
1120 saveDecoration(100); 1305 saveDecoration(100);
1121 }) 1306 })
1122 //提交审核 1307 //提交审核
1123 $(document).on("click","#submitModule",function(){ 1308 $(document).on("click","#submitModule",function(){
1124 - if(jsonMain.templateName == "0"){ 1309 + if(jsonMain.templateType == "0"){
1125 common.util.__tip("请选择展示使用模板!"); 1310 common.util.__tip("请选择展示使用模板!");
  1311 + $("#templateSelect").focus().addClass("error");
1126 return; 1312 return;
1127 } 1313 }
1128 saveDecoration(200); 1314 saveDecoration(200);
@@ -1181,12 +1367,27 @@ $(document).on("click",".addBtn",function(){ @@ -1181,12 +1367,27 @@ $(document).on("click",".addBtn",function(){
1181 1367
1182 if(indexList.length > 1){ 1368 if(indexList.length > 1){
1183 g.__rows[indexList[0]].data.push($.extend({},ENUM[curDialogId])); 1369 g.__rows[indexList[0]].data.push($.extend({},ENUM[curDialogId]));
  1370 + if(curDialogId == "editor-largePic" || curDialogId == "editor-smallPic" || curDialogId == "editor-signboard"){
  1371 + (g.__rows[indexList[0]].data)[(parseInt(indexList[1]) + 1)].startTime = (g.__rows[indexList[0]].data)[indexList[1]].endTime;
  1372 + }
1184 }else{ 1373 }else{
1185 g.__rows.push($.extend({},ENUM[curDialogId])); 1374 g.__rows.push($.extend({},ENUM[curDialogId]));
1186 } 1375 }
1187 g.init(g.__rows); 1376 g.init(g.__rows);
1188 untilEditorEvent(curDialogId); 1377 untilEditorEvent(curDialogId);
1189 }); 1378 });
  1379 +//资源位大图,水牌添加一条资源位
  1380 +$(document).on("click",".addBtn2",function(){
  1381 + if( curDialogId == "editor-largePic" && g.__rows.length > 4){
  1382 + $(".largePicAddTip").text("* 最多只能添加5个资源位大图!").css("color","#ff0000");
  1383 + return;
  1384 + }else{
  1385 + $(".largePicAddTip").empty();
  1386 + g.__rows.push($.extend(true,{},ENUM["editor-largePic2"]));
  1387 + g.init(g.__rows);
  1388 + untilEditorEvent(curDialogId);
  1389 + }
  1390 +});
1190 //input change同时更新json 1391 //input change同时更新json
1191 $(document).on("change",".inputChange",function(){ 1392 $(document).on("change",".inputChange",function(){
1192 var _index = $(this).attr("data-index"); 1393 var _index = $(this).attr("data-index");
@@ -1198,6 +1399,23 @@ $(document).on("change",".inputChange",function(){ @@ -1198,6 +1399,23 @@ $(document).on("change",".inputChange",function(){
1198 }else{ 1399 }else{
1199 g.__rows[indexList[0]][_name] = $(this).val(); 1400 g.__rows[indexList[0]][_name] = $(this).val();
1200 } 1401 }
  1402 + if(curDialogId == "editor-largePic" || curDialogId == "editor-smallPic" || curDialogId == "editor-signboard"){
  1403 + if($(this).attr("name") == "endTime"){
  1404 + if(g.__rows[indexList[0]].data.length - 1 > indexList[1]){
  1405 + (g.__rows[indexList[0]].data)[(parseInt(indexList[1]) + 1)].startTime = $(this).val();
  1406 + $(this).parents(".row").next().children().find("input[name='startTime']").val($(this).val());
  1407 +
  1408 + var endDate = $(this).parents(".row").next().children().find("input[name='endTime']").val();
  1409 + $(this).parents(".row").next().children().find(".publishStatus").html(checkdate($(this).val(),endDate));
  1410 + }
  1411 + var startDate = $(this).parents(".row").find("input[name='startTime']").val();
  1412 + $(this).parents(".row").find(".publishStatus").html(checkdate(startDate,$(this).val()));
  1413 + }
  1414 + if($(this).attr("name") == "startTime"){
  1415 + var endDate = $(this).parents(".row").find("input[name='endTime']").val();
  1416 + $(this).parents(".row").find(".publishStatus").html(checkdate($(this).val(),endDate));
  1417 + }
  1418 + }
1201 $(this).removeClass("error"); 1419 $(this).removeClass("error");
1202 }); 1420 });
1203 //checkBox change同时更新json 1421 //checkBox change同时更新json
@@ -1219,12 +1437,13 @@ $(document).on("click",".topAdd",function(){ @@ -1219,12 +1437,13 @@ $(document).on("click",".topAdd",function(){
1219 item.src = $(this).find('img').attr("src"); 1437 item.src = $(this).find('img').attr("src");
1220 item.productId = $(this).attr("data-productId"); 1438 item.productId = $(this).attr("data-productId");
1221 item.productName = $(this).attr("data-productName"); 1439 item.productName = $(this).attr("data-productName");
1222 - item.productPrice = $(this).attr("data-productPrice"); 1440 + item.salesPrice = $(this).attr("data-productPrice");
  1441 + item.productSkn = $(this).attr("data-productSkn");
1223 1442
1224 g.__rows.push(item); 1443 g.__rows.push(item);
1225 g.init(g.__rows); 1444 g.init(g.__rows);
1226 untilEditorEvent(curDialogId); 1445 untilEditorEvent(curDialogId);
1227 - 1446 + productTopDataLink(g.__rows);
1228 $(".topTip span").text("已经勾选"+ g.__rows.length +"件,最多勾选8件商品!"); 1447 $(".topTip span").text("已经勾选"+ g.__rows.length +"件,最多勾选8件商品!");
1229 } 1448 }
1230 }else{ 1449 }else{
@@ -22,12 +22,13 @@ app端店铺模板css @@ -22,12 +22,13 @@ app端店铺模板css
22 /*------------------------banner--------------------------*/ 22 /*------------------------banner--------------------------*/
23 .contentpanel-app .model-banner{ 23 .contentpanel-app .model-banner{
24 width: 100%; 24 width: 100%;
25 - height: 100px; 25 + height: 150px;
26 position: relative; 26 position: relative;
  27 + overflow: hidden;
27 } 28 }
28 .contentpanel-app .model-banner img{ 29 .contentpanel-app .model-banner img{
29 - width: 100%;  
30 - height: 100px; 30 + position: absolute;
  31 + clip: rect(0,640px,150px,0);
31 } 32 }
32 .contentpanel-app .model-banner h1{ 33 .contentpanel-app .model-banner h1{
33 position: absolute; 34 position: absolute;
@@ -43,14 +44,15 @@ app端店铺模板css @@ -43,14 +44,15 @@ app端店铺模板css
43 .contentpanel-app .model-nav ul li{ 44 .contentpanel-app .model-nav ul li{
44 float: left; 45 float: left;
45 width: 25%; 46 width: 25%;
46 - line-height: 20px;  
47 - padding: 0 10px;  
48 - font-size: 14px; 47 + height: 30px;
  48 + line-height: 28px;
  49 + padding: 1px 10px;
  50 + font-size: 28px;
49 border-right: 2px solid #ccc; 51 border-right: 2px solid #ccc;
50 - margin: 10px 0; 52 + margin: 30px 0;
51 text-align: center; 53 text-align: center;
52 } 54 }
53 -.contentpanel-app .model-nav ul li a{color: #ccc; font-weight: bold} 55 +.contentpanel-app .model-nav ul li a{color: #ccc}
54 .contentpanel-app .model-nav ul li.active a{color: #585858} 56 .contentpanel-app .model-nav ul li.active a{color: #585858}
55 57
56 /*------------------------main--------------------------*/ 58 /*------------------------main--------------------------*/
@@ -58,66 +60,65 @@ app端店铺模板css @@ -58,66 +60,65 @@ app端店铺模板css
58 clear: both; 60 clear: both;
59 width: 100%; 61 width: 100%;
60 background: #f5f7f6; 62 background: #f5f7f6;
61 - padding-bottom: 10px;  
62 } 63 }
63 64
64 /*------------------------品牌一览(多品牌商铺专有)--------------------------*/ 65 /*------------------------品牌一览(多品牌商铺专有)--------------------------*/
65 .contentpanel-app .brand-list{ 66 .contentpanel-app .brand-list{
66 text-align: center; 67 text-align: center;
67 - margin-bottom: 5px;  
68 } 68 }
69 .contentpanel-app .brand-list span{ 69 .contentpanel-app .brand-list span{
70 display: block; 70 display: block;
71 - padding: 10px 0;  
72 - font-size: 16px;  
73 - font-weight: bold; 71 + line-height: 60px;
  72 + height: 60px;
  73 + font-size: 28px;
74 } 74 }
75 .contentpanel-app .brand-list ul{ 75 .contentpanel-app .brand-list ul{
76 border: solid #ccc; 76 border: solid #ccc;
77 border-width:1px 0 0px 0 ; 77 border-width:1px 0 0px 0 ;
  78 + padding: 0 4px;
78 } 79 }
79 .contentpanel-app .brand-list ul li{ 80 .contentpanel-app .brand-list ul li{
80 float: left; 81 float: left;
81 width: 25%; 82 width: 25%;
82 - padding: 5px; 83 + padding: 20px 4px;
83 } 84 }
84 .contentpanel-app .brand-list ul li a{ 85 .contentpanel-app .brand-list ul li a{
85 display: block; 86 display: block;
86 width: 100%; 87 width: 100%;
87 - height: 60px; 88 + height: 100px;
88 } 89 }
89 .contentpanel-app .brand-list ul li img{ 90 .contentpanel-app .brand-list ul li img{
90 width: 100%; 91 width: 100%;
91 - height: 60px; 92 + height: 100px;
92 } 93 }
93 94
94 /*------------------------大图--------------------------*/ 95 /*------------------------大图--------------------------*/
95 .contentpanel-app .largePic img{ 96 .contentpanel-app .largePic img{
96 width: 100%; 97 width: 100%;
97 - height: 100px; 98 + height: 180px;
98 } 99 }
99 100
100 /*------------------------小图--------------------------*/ 101 /*------------------------小图--------------------------*/
101 .contentpanel-app .model-smallPic{ 102 .contentpanel-app .model-smallPic{
102 - width: 90%;  
103 - height: 80px;  
104 - margin: 10px auto; 103 + width: 580px;
  104 + height: 150px;
  105 + margin: 20px auto;
105 background: #fff; 106 background: #fff;
106 } 107 }
107 .contentpanel-app .model-smallPic ul li{ 108 .contentpanel-app .model-smallPic ul li{
108 float: left; 109 float: left;
109 width: 50%; 110 width: 50%;
110 - height: 80px; 111 + height: 150px;
111 } 112 }
112 .contentpanel-app .model-smallPic ul li:first-of-type{ 113 .contentpanel-app .model-smallPic ul li:first-of-type{
113 - padding-right: 5px; 114 + padding-right: 15px;
114 } 115 }
115 .contentpanel-app .model-smallPic ul li:last-of-type{ 116 .contentpanel-app .model-smallPic ul li:last-of-type{
116 - padding-left: 5px; 117 + padding-left: 15px;
117 } 118 }
118 .contentpanel-app .model-smallPic img{ 119 .contentpanel-app .model-smallPic img{
119 - width: 100%;  
120 - height: 100%; 120 + width: 275px;
  121 + height: 150px;
121 border:0px solid #000; 122 border:0px solid #000;
122 } 123 }
123 124
@@ -128,19 +129,19 @@ app端店铺模板css @@ -128,19 +129,19 @@ app端店铺模板css
128 .contentpanel-app .sortList span{ 129 .contentpanel-app .sortList span{
129 display: block; 130 display: block;
130 text-align: center; 131 text-align: center;
131 - padding: 10px;  
132 - width: 90%; 132 + height: 60px;
  133 + line-height: 60px;
  134 + width: 580px;
133 background: #fff; 135 background: #fff;
134 margin: 0 auto; 136 margin: 0 auto;
135 - font-size: 16px; 137 + font-size: 28px;
136 color: #999; 138 color: #999;
137 - font-weight: bold;  
138 } 139 }
139 .contentpanel-app .sortList .sortListDetail{ 140 .contentpanel-app .sortList .sortListDetail{
140 border-top: 1px solid #ccc; 141 border-top: 1px solid #ccc;
141 border-bottom: 1px solid #ccc; 142 border-bottom: 1px solid #ccc;
142 position: relative; 143 position: relative;
143 - padding: 10px 10px 0; 144 + padding: 20px 4px 10px;
144 } 145 }
145 .contentpanel-app .sortList .sortListDetail ul li{ 146 .contentpanel-app .sortList .sortListDetail ul li{
146 float: left; 147 float: left;
@@ -148,18 +149,19 @@ app端店铺模板css @@ -148,18 +149,19 @@ app端店铺模板css
148 } 149 }
149 .contentpanel-app .sortList .sortListDetail ul li img{ 150 .contentpanel-app .sortList .sortListDetail ul li img{
150 display: block; 151 display: block;
151 - width: 100%;  
152 - height: 100px;  
153 - padding: 0 5px; 152 + width: 150px;
  153 + height: 120px;
  154 + margin: 0 4px;
154 } 155 }
155 .contentpanel-app .sortList .sortListDetail ul li a{ 156 .contentpanel-app .sortList .sortListDetail ul li a{
156 display: block; 157 display: block;
157 width: 100%; 158 width: 100%;
158 text-align: center; 159 text-align: center;
159 - padding: 5px 0; 160 + padding: 10px 0;
160 overflow: hidden; 161 overflow: hidden;
161 white-space: nowrap; 162 white-space: nowrap;
162 text-overflow: ellipsis; 163 text-overflow: ellipsis;
  164 + font-size: 16px;
163 } 165 }
164 166
165 /*------------------------人气单品--------------------------*/ 167 /*------------------------人气单品--------------------------*/
@@ -170,16 +172,15 @@ app端店铺模板css @@ -170,16 +172,15 @@ app端店铺模板css
170 172
171 .contentpanel-app .showTitle{ 173 .contentpanel-app .showTitle{
172 width: 100%; 174 width: 100%;
173 - height: 50px;  
174 - line-height: 50px; 175 + height: 98px;
  176 + line-height: 98px;
175 text-align: center; 177 text-align: center;
176 position: relative; 178 position: relative;
177 box-sizing: content-box; 179 box-sizing: content-box;
178 border-bottom: 1px solid #ccc; 180 border-bottom: 1px solid #ccc;
179 } 181 }
180 .contentpanel-app .showTitle span{ 182 .contentpanel-app .showTitle span{
181 - font-size: 16px;  
182 - font-weight: bold; 183 + font-size: 28px;
183 color: #585858; 184 color: #585858;
184 } 185 }
185 .contentpanel-app .showTitle a{ 186 .contentpanel-app .showTitle a{
@@ -191,35 +192,37 @@ app端店铺模板css @@ -191,35 +192,37 @@ app端店铺模板css
191 192
192 /*------------------------人气单品详情--------------------------*/ 193 /*------------------------人气单品详情--------------------------*/
193 .contentpanel-app .model-showDetail{ 194 .contentpanel-app .model-showDetail{
194 - padding: 10px 5px; 195 + padding: 50px 25px;
195 } 196 }
196 .contentpanel-app .model-showDetail ul li{ 197 .contentpanel-app .model-showDetail ul li{
197 float: left; 198 float: left;
198 width: 50%; 199 width: 50%;
199 - padding: 0 5px;  
200 position: relative; 200 position: relative;
201 - margin-bottom: 5px; 201 + margin-bottom:10px;
  202 + padding: 0 5px;
202 } 203 }
203 .contentpanel-app .model-showDetail ul li img{ 204 .contentpanel-app .model-showDetail ul li img{
204 width: 100%; 205 width: 100%;
205 - height: 150px; 206 + height: 300px;
206 display: block; 207 display: block;
207 } 208 }
208 .contentpanel-app .shadow{ 209 .contentpanel-app .shadow{
209 width: 100%; 210 width: 100%;
210 background: #666; 211 background: #666;
211 opacity: 0.5; 212 opacity: 0.5;
212 - padding: 0 5px; 213 + padding: 5px 10px;
213 } 214 }
214 .contentpanel-app .model-showDetail ul li a{ 215 .contentpanel-app .model-showDetail ul li a{
215 display: block; 216 display: block;
216 - font-size: 14px; 217 + font-size: 22px;
217 color: #fff; 218 color: #fff;
218 overflow: hidden; 219 overflow: hidden;
219 white-space: nowrap; 220 white-space: nowrap;
220 text-overflow: ellipsis; 221 text-overflow: ellipsis;
221 } 222 }
222 .contentpanel-app .model-showDetail ul li b{ 223 .contentpanel-app .model-showDetail ul li b{
  224 + font-size: 22px;
223 display: block; 225 display: block;
224 color: #fff; 226 color: #fff;
  227 + font-weight: normal;
225 } 228 }
@@ -4,6 +4,7 @@ pc端店铺模板css @@ -4,6 +4,7 @@ pc端店铺模板css
4 .editor-dialog ul.upload-image-list{padding: 0 10px} 4 .editor-dialog ul.upload-image-list{padding: 0 10px}
5 .editor-dialog input.numInput{ width: 40px} 5 .editor-dialog input.numInput{ width: 40px}
6 .editorTitle input.error,.editor-dialog input.error{ border: 2px solid #ff0000} 6 .editorTitle input.error,.editor-dialog input.error{ border: 2px solid #ff0000}
  7 +.moduleTypeSelect .error{ border: 2px solid #ff0000}
7 .editorTip{ color: #ff0000} 8 .editorTip{ color: #ff0000}
8 9
9 .contentpanel-pc {color: #585858; font-size: 12px; font-family:'Microsoft YaHei'} 10 .contentpanel-pc {color: #585858; font-size: 12px; font-family:'Microsoft YaHei'}
@@ -74,8 +75,8 @@ pc端店铺模板css @@ -74,8 +75,8 @@ pc端店铺模板css
74 /*------------------------商品分类列表--------------------------*/ 75 /*------------------------商品分类列表--------------------------*/
75 .contentpanel-pc .sortList{ 76 .contentpanel-pc .sortList{
76 width: 100%; 77 width: 100%;
77 - height: 300px;  
78 - background: #f5f7f6; 78 + height: 200px;
  79 + background: url("../assets/images/shop1.png");
79 } 80 }
80 .contentpanel-pc .sortList a{ color: #585858} 81 .contentpanel-pc .sortList a{ color: #585858}
81 82
@@ -106,22 +107,37 @@ pc端店铺模板css @@ -106,22 +107,37 @@ pc端店铺模板css
106 } 107 }
107 108
108 /*------------------------经典推荐--------------------------*/ 109 /*------------------------经典推荐--------------------------*/
109 -.contentpanel-pc .typicRecommendDetail ul li a{  
110 - display: inline-block; 110 +.contentpanel-pc .typicRecommendDetail ul li .recommendNames{
  111 + display: block;
111 width: 60%; 112 width: 60%;
112 - height: 30px;  
113 - line-height: 30px; 113 + float: left;
  114 + height: 50px;
  115 +}
  116 +.contentpanel-pc .typicRecommendDetail ul li a,.contentpanel-pc .typicRecommendDetail ul li span{
  117 + display: block;
  118 + width: 100%;
114 color: #585858; 119 color: #585858;
115 font-size: 14px; 120 font-size: 14px;
116 overflow: hidden; 121 overflow: hidden;
117 white-space: nowrap; 122 white-space: nowrap;
118 text-overflow: ellipsis; 123 text-overflow: ellipsis;
  124 + padding-right: 10px;
  125 +}
  126 +.contentpanel-pc .typicRecommendDetail ul li a{
  127 + height: 30px;
  128 + line-height: 30px;
  129 +}
  130 +.contentpanel-pc .typicRecommendDetail ul li span{
  131 + height: 20px;
  132 + line-height: 20px;
  133 + color: #999999;
  134 + font-size: 12px;
119 } 135 }
120 .contentpanel-pc .typicRecommendDetail ul li img{ 136 .contentpanel-pc .typicRecommendDetail ul li img{
121 display: block; 137 display: block;
122 float: right; 138 float: right;
123 - height: 30px;  
124 - width: 40px; 139 + height: 50px;
  140 + width: 40%;
125 } 141 }
126 142
127 /*------------------------热销推荐--------------------------*/ 143 /*------------------------热销推荐--------------------------*/
@@ -148,6 +164,11 @@ pc端店铺模板css @@ -148,6 +164,11 @@ pc端店铺模板css
148 width: 80%; 164 width: 80%;
149 padding-left: 10px; 165 padding-left: 10px;
150 } 166 }
  167 +.contentpanel-pc .model-main-right-default{
  168 + width: 792px;
  169 + height: 920px;
  170 + background: url("../assets/images/shop2.png");
  171 +}
151 172
152 /*------------------------slide--------------------------*/ 173 /*------------------------slide--------------------------*/
153 .contentpanel-pc .model-slide{ 174 .contentpanel-pc .model-slide{
@@ -384,6 +405,4 @@ pc端店铺模板css @@ -384,6 +405,4 @@ pc端店铺模板css
384 .topList .topTip{ 405 .topList .topTip{
385 color: #ff0000; 406 color: #ff0000;
386 margin-top: 20px; 407 margin-top: 20px;
387 -}  
388 -  
389 - 408 +}
1 exports.domain = require('../config/common.js').domain; 1 exports.domain = require('../config/common.js').domain;
2 //exports.domain = 'http://localhost:30012'; 2 //exports.domain = 'http://localhost:30012';
3 -//exports.domain = 'http://172.16.6.115:8080/platform';  
4 3
5 exports.res = [ 4 exports.res = [
6 { 5 {
@@ -9,7 +8,7 @@ exports.res = [ @@ -9,7 +8,7 @@ exports.res = [
9 view: 'pages/store/shop2', 8 view: 'pages/store/shop2',
10 src:'/store/shop' 9 src:'/store/shop'
11 }, 10 },
12 - {//查询装修模板内容 11 + {//保存装修模板,提交审核模板
13 route:"/store/shop-decoration-save", 12 route:"/store/shop-decoration-save",
14 method:"POST", 13 method:"POST",
15 url:"/ShopsDecoratorRest/saveShopsDecorator", 14 url:"/ShopsDecoratorRest/saveShopsDecorator",
@@ -17,11 +16,11 @@ exports.res = [ @@ -17,11 +16,11 @@ exports.res = [
17 {name: 'shopsId', type: 'Number'}, 16 {name: 'shopsId', type: 'Number'},
18 {name: 'submitStatus', type: 'Number'}, 17 {name: 'submitStatus', type: 'Number'},
19 {name: 'platform', type: 'String'}, 18 {name: 'platform', type: 'String'},
20 - {name: 'templateName', type: 'String'}, 19 + {name: 'templateType', type: 'String'},
21 {name: 'resources', type: 'String'} 20 {name: 'resources', type: 'String'}
22 ] 21 ]
23 }, 22 },
24 - {//保存装修模板,提交审核模板 23 + {//查询装修模板内容
25 route:"/store/shop-decoration-find", 24 route:"/store/shop-decoration-find",
26 method:"POST", 25 method:"POST",
27 url:"/ShopsDecoratorRest/findShopsDecoratorDetail", 26 url:"/ShopsDecoratorRest/findShopsDecoratorDetail",
  1 +exports.domain = require('../config/common.js').domain;
  2 + // exports.domain ="http://172.16.6.239:8080/";
  3 +//路由配置
  4 +exports.res = [
  5 +{
  6 + // 店铺创建列表页面
  7 + route: '/supplier/store/index',
  8 + method: 'GET',
  9 + view: 'pages/store/index',
  10 + data: {
  11 + gridurl:'/supplier/store/indexPage',
  12 + authority:'{"btn":false,"info":"info","create":true,"operationStatus":1,"checkStatusArr":"100,200,900"}',
  13 + add:true,
  14 + pagetitle:{
  15 + level1title:"店铺管理",
  16 + level2title:"创建店铺管理",
  17 + level3title:"创建店铺列表"
  18 + },
  19 + searchStatus:[
  20 + {value:"100",name:"暂存"},
  21 + {value:"200",name:"待审核"},
  22 + {value:"900",name:"驳回"}
  23 + ]
  24 + },
  25 + src:'/store/index'
  26 + },{
  27 + // 店铺信息管理页面
  28 + route: '/supplier/store/examine',
  29 + method: 'GET',
  30 + view: 'pages/store/index',
  31 + data: {
  32 + gridurl:'/supplier/store/indexPage',
  33 + authority:'{"btn":true,"info":"info3","operationStatus":2,"checkStatusArr":"200,300,900"}', //300,200,900
  34 + pagetitle:{
  35 + level1title:"店铺管理",
  36 + level2title:"店铺信息管理",
  37 + level3title:"店铺信息列表"
  38 + },
  39 + searchStatus:[
  40 + {value:"200",name:"审核中"},
  41 + {value:"300",name:"通过"},
  42 + {value:"900",name:"驳回"}
  43 + ]
  44 + },
  45 + src:'/store/index',
  46 + },{
  47 + // 店铺审核管理页面
  48 + route: '/supplier/check/index',
  49 + method: 'GET',
  50 + view: 'pages/store/index',
  51 + data: {
  52 + basicTab:true,
  53 + gridurl:'/supplier/store/indexPage',
  54 + authority:'{"btn":false,"info":"info2","operationStatus":0,"checkStatusArr":"200"}',
  55 + pagetitle:{
  56 + level1title:"店铺管理",
  57 + level2title:"店铺审核管理",
  58 + level3title:"店铺审核列表"
  59 + }
  60 + },
  61 + src:'/store/index',
  62 + },{
  63 + //获取列表数据
  64 + route: '/supplier/store/indexPage',
  65 + method: 'POST',
  66 + url:"/ShopsRest/getShopList",
  67 + params:[
  68 + {name: 'supplierId', type: 'Number'},
  69 + {name: 'brandId', type: 'Number'},
  70 + {name: 'operationStatus', type: 'Number'},
  71 + {name: 'checkStatus', type: 'Number'},
  72 + {name: 'checkStatusArr', type: 'String'},
  73 + {name: 'size', type: 'Number'},
  74 + {name: 'page', type: 'Number'}
  75 + ]
  76 + },{
  77 + // 关店
  78 + route: '/supplier/store/closeShops',
  79 + method: 'POST',
  80 + url:"/ShopsRest/closeShops",
  81 + params:[
  82 + {name:"shopsId",type:"Number"}
  83 + ]
  84 + },{
  85 + // 开店
  86 + route: '/supplier/store/openShops',
  87 + method: 'POST',
  88 + url:"/ShopsRest/openShops",
  89 + params:[
  90 + {name:"shopsId",type:"Number"}
  91 + ]
  92 + }
  93 + ,{
  94 + // 店铺详细信息页面渲染
  95 + //创建店铺的列表中,点击详情和编辑的url:/ShopsRest/getShopDetailById
  96 + route: '/supplier/store/info/:shopsId',
  97 + method: 'GET',
  98 + view: 'pages/store/info',
  99 + url:"/ShopsRest/getShopDetailById",
  100 + params:[{
  101 + name:'shopsId',
  102 + type:'String'
  103 + }],
  104 + src:'/store/info'
  105 + }
  106 + ,{
  107 + // 店铺详细信息页面渲染
  108 + route: '/supplier/store/info2/:shopsId',
  109 + method: 'GET',
  110 + view: 'pages/store/info',
  111 + url:"/ShopsRest/getShopDetailById",
  112 + params:[{
  113 + name:'shopsId',
  114 + type:'String'
  115 + }],
  116 + data:{
  117 + data:{
  118 + btn:true
  119 + }
  120 + },
  121 + src:'/store/info'
  122 + }
  123 + ,{
  124 + // 店铺详细信息页面渲染
  125 + route: '/supplier/store/info3/:shopsId',
  126 + method: 'GET',
  127 + view: 'pages/store/info',
  128 + url:"/ShopsCheckRest/getLastCheckShopInfoById",
  129 + params:[{
  130 + name:'shopsId',
  131 + type:'String'
  132 + }],
  133 + src:'/store/info'
  134 + },
  135 + {//审核通过
  136 + route: '/Shops/ShopsRest/checkShopPass',
  137 + method:"POST",
  138 + url:"/ShopsRest/checkShopPass",
  139 + params:[
  140 + {name:"shopsId",type:"Number"}
  141 + ]
  142 + },
  143 + {//驳回
  144 + route: '/Shops/ShopsRest/checkReject',
  145 + method:"POST",
  146 + url:"/ShopsRest/checkReject",
  147 + params:[
  148 + {name:"shopsId",type:"Number"}
  149 + ]
  150 + }
  151 +
  152 +//*******************************
  153 + ,{
  154 + // 修改店铺页面渲染
  155 + //创建店铺的列表中,点击详情和编辑的url:/ShopsRest/getShopDetailById
  156 +
  157 + route: '/supplier/store/update/:shopsId',
  158 + method: 'GET',
  159 + view: 'pages/store/edit',
  160 + url:"/ShopsRest/getShopDetailById",
  161 + params:[{
  162 + name:'shopsId',
  163 + type:'String'
  164 + }],
  165 + data:{
  166 + pageTitel:"修改店铺",
  167 + action:'/store/update'
  168 + },
  169 + src:'/store/edit'
  170 + },{
  171 + // 修改店铺页面提交
  172 + route: '/store/update',
  173 + method: 'POST',
  174 + url: '/ShopsRest/updateShops',
  175 + params:[
  176 + {name:"shopsId",type:"Number"},
  177 + {name:"shopName",type:"String"},
  178 + {name:"shopDomain",type:"String"},
  179 + {name:"shopNature",type:"Number"},
  180 +
  181 + {name:"websiteUrl",type:"String"},
  182 + {name:"otherUrl",type:"String"},
  183 + {name:"shopAddress",type:"String"},
  184 +
  185 + {name:"createPid",type:"Number"},
  186 +
  187 + {name:"shopsType",type:"Number"},
  188 + {name:"shopLogo",type:"String"},
  189 + {name:"shopIntro",type:"String"},
  190 +
  191 +
  192 + {name:"onCheck",type:"Number"},
  193 + {name:"shopRelation",type:"String"}
  194 + ]
  195 + },{
  196 + // 新增店铺页面渲染
  197 + route: '/supplier/store/add',
  198 + method: 'GET',
  199 + view: 'pages/store/edit',
  200 + src:'/store/edit',
  201 + data:{
  202 + pageTitel:"创建店铺",
  203 + action:'/store/add',
  204 + data:{
  205 + shopId:0
  206 + }
  207 + }
  208 + }, {// 新增店铺数据
  209 + route: '/store/add',
  210 + method: 'POST',
  211 + url: '/ShopsRest/addShops',
  212 + params:[
  213 + {name:"shopId",type:"Number",def:0},
  214 + {name:"shopName",type:"String"},
  215 + {name:"shopDomain",type:"String"},
  216 + {name:"shopNature",type:"Number"},
  217 + {name:"createPid",type:"Number"},
  218 + {name:"shopsType",type:"Number"},
  219 + {name:"shopLogo",type:"String"},
  220 + {name:"shopIntro",type:"String"},
  221 + {name:"websiteUrl",type:"String"},
  222 + {name:"otherUrl",type:"String"},
  223 + {name:"shopAddress",type:"String"},
  224 + {name:"onCheck",type:"Number"},
  225 + {name:"shopRelation",type:"String"}
  226 + ]
  227 + }
  228 +
  229 +
  230 +
  231 +
  232 +//***********************************
  233 + ,{
  234 + // 店铺管理员关系列表
  235 + route: '/supplier/storeadmin/index',
  236 + method: 'GET',
  237 + view: 'pages/store/adminindex',
  238 + data: {
  239 + gridurl:'/supplier/storeadmin/indexPage'
  240 + },
  241 + src:'/store/adminindex'
  242 + },{
  243 + // 店铺管理员关系列表
  244 + route: '/supplier/storeadmin/indexPage',
  245 + method: 'POST',
  246 + url:"/ShopsAdminRest/getShopsAdminList",
  247 + params:[
  248 + {name: 'page', type: 'Number'},
  249 + {name: 'size', type: 'Number'}
  250 + ]
  251 + },{
  252 + // 移除店铺管理员关系列表
  253 + route: '/supplier/storeadmin/delete',
  254 + method: 'POST',
  255 + url:"/ShopsAdminRest/delAdminRelation",
  256 + params:[
  257 + {name:"id",type:"Number"}
  258 + ]
  259 + }
  260 + ,{
  261 + // 店铺管理员关系新增
  262 + route: '/supplier/storeadmin/adminAdd',
  263 + method: 'GET',
  264 + view: 'pages/store/adminedit',
  265 + src:'/store/adminedit'
  266 + },{
  267 + // 店铺管理员关系新增
  268 + route: '/supplier/storeadmin/addguanxi',
  269 + method: 'POST',
  270 + url:"/ShopsAdminRest/addAdminRelation",
  271 + params:[
  272 + {name:"shopsId",type:"Number"},
  273 + {name:"adminPid",type:"Number"},
  274 + {name:"identity",type:"Number"}
  275 + ]
  276 + },{
  277 + // 修改店铺页面渲染
  278 + route: '/supplier/store/adminupdate/:id',
  279 + method: 'GET',
  280 + view: 'pages/store/adminedit',
  281 + url:"/ShopsAdminRest/getAdminRelationDetailById",
  282 + params:[{
  283 + name:'id',
  284 + type:'String'
  285 + }],
  286 + src:'/store/adminedit'
  287 + },{
  288 + // 修改店铺管理员关系
  289 + route: '/supplier/storeadmin/updateguanxi',
  290 + method: 'POST',
  291 + url:"/ShopsAdminRest/updateAdminRalation",
  292 + params:[
  293 + {name:"id",type:"Number"},
  294 + {name:"shopsId",type:"Number"},
  295 + {name:"adminPid",type:"Number"},
  296 + {name:"identity",type:"Number"}
  297 + ]
  298 + },{
  299 + // 根据品牌选择供应商
  300 + route: '/supplier/storeadmin/supplierlist',
  301 + method: 'POST',
  302 + url:"/supplier/supplier/selectSupplierByBrandId",
  303 + params:[
  304 + {name:"brandId",type:"Number"}
  305 + ]
  306 + }
  307 +]
  308 +
  309 +
1 <div class="tabheader"> 1 <div class="tabheader">
2 <ul class="nav nav-tabs"> 2 <ul class="nav nav-tabs">
3 - <li data-toggle="shopWeb-pc" class="active"><a href="javascript:">店铺装修(PC端)</a></li>  
4 - <li data-toggle="shopWeb-app"><a href="javascript:">店铺装修(移动端)</a></li> 3 + <li data-toggle="shopWeb-pc" class="active"><a href="javascript:">店铺装修(PC端)</a></li>
  4 + <li data-toggle="shopWeb-app"><a href="javascript:">店铺装修(移动端)</a></li>
5 </ul> 5 </ul>
6 </div> 6 </div>
7 7
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 <div class="pageicon pull-left"> 10 <div class="pageicon pull-left">
11 <i class="fa fa-th-list"></i> 11 <i class="fa fa-th-list"></i>
12 </div> 12 </div>
13 - <div class="media-body" style="display: block;"> 13 + <div class="media-body">
14 <ul class="breadcrumb"> 14 <ul class="breadcrumb">
15 <li><a href=""><i class="glyphicon glyphicon-home"></i></a></li> 15 <li><a href=""><i class="glyphicon glyphicon-home"></i></a></li>
16 <li><a href="">店铺管理</a></li> 16 <li><a href="">店铺管理</a></li>
@@ -75,20 +75,20 @@ @@ -75,20 +75,20 @@
75 <!--左侧main--> 75 <!--左侧main-->
76 <div class="model-main-left"> 76 <div class="model-main-left">
77 <!--商品列表--> 77 <!--商品列表-->
78 - <div class="sortList">(固定内容!)</div> 78 + <div class="sortList"></div>
79 <!--水牌--> 79 <!--水牌-->
80 <div class="model-recommend model-signboard model-editor" data-toggle="editor-signboard" data-title="水牌位编辑"> 80 <div class="model-recommend model-signboard model-editor" data-toggle="editor-signboard" data-title="水牌位编辑">
81 <div class="recommendDetail signboardDetail"> 81 <div class="recommendDetail signboardDetail">
82 <ul> 82 <ul>
83 [[each resources.signboard.data as item _index]] 83 [[each resources.signboard.data as item _index]]
84 - <li><a href="[[item.url]]"><img src="[[item.src]]"></a></li> 84 + <li><a href="[[item.data[0].url]]"><img src="[[item.data[0].src]]"></a></li>
85 [[/each]] 85 [[/each]]
86 </ul> 86 </ul>
87 </div> 87 </div>
88 </div> 88 </div>
89 </div> 89 </div>
90 <!--右侧main--> 90 <!--右侧main-->
91 - <div class="model-main-right">(固定内容!)</div> 91 + <div class="model-main-right model-main-right-default"></div>
92 <div class="clear"></div> 92 <div class="clear"></div>
93 </div> 93 </div>
94 </div> 94 </div>
@@ -123,7 +123,7 @@ @@ -123,7 +123,7 @@
123 <!--左侧main--> 123 <!--左侧main-->
124 <div class="model-main-left"> 124 <div class="model-main-left">
125 <!--商品列表--> 125 <!--商品列表-->
126 - <div class="sortList">(固定内容!)</div> 126 + <div class="sortList"></div>
127 <!--品牌集合--> 127 <!--品牌集合-->
128 <div class="model-recommend model-brand model-editor" style="display: none" data-toggle="editor-brand" data-title="品牌集合编辑"> 128 <div class="model-recommend model-brand model-editor" style="display: none" data-toggle="editor-brand" data-title="品牌集合编辑">
129 <div class="recommendTitle">品牌集合</div> 129 <div class="recommendTitle">品牌集合</div>
@@ -141,7 +141,14 @@ @@ -141,7 +141,14 @@
141 <div class="recommendDetail typicRecommendDetail"> 141 <div class="recommendDetail typicRecommendDetail">
142 <ul> 142 <ul>
143 [[each resources.recommend.data as item _index]] 143 [[each resources.recommend.data as item _index]]
144 - <li><a href="[[item.url]]">[[item.name]]</a><img src="[[item.src]]"></li> 144 + <li>
  145 + <div class="recommendNames">
  146 + <a href="[[item.url]]">[[item.name]]</a>
  147 + <span>[[item.enName]]</span>
  148 + </div>
  149 + <img src="[[item.src]]">
  150 + <div class="clear"></div>
  151 + </li>
145 [[/each]] 152 [[/each]]
146 </ul> 153 </ul>
147 </div> 154 </div>
@@ -178,20 +185,16 @@ @@ -178,20 +185,16 @@
178 <!--新品上架--> 185 <!--新品上架-->
179 <div class="model-show"> 186 <div class="model-show">
180 <div class="model-showTitle"> 187 <div class="model-showTitle">
181 - [[if resources.newProducts.data.length > 0]]  
182 <div class="showName"><span>新品上架&nbsp;&nbsp;NEW</span></div> 188 <div class="showName"><span>新品上架&nbsp;&nbsp;NEW</span></div>
183 - [[else]]  
184 - <div class="showName model-editor" data-toggle="editor-newProduct" data-title="新品上架商品编辑"><span>新品上架&nbsp;&nbsp;NEW</span></div>  
185 - [[/if]]  
186 <div class="showTab model-editor" data-toggle="editor-newGoodTab" data-title="新品上架标签编辑"> 189 <div class="showTab model-editor" data-toggle="editor-newGoodTab" data-title="新品上架标签编辑">
187 <ul> 190 <ul>
188 [[each resources.goodsTabBar.data.new as item _index]] 191 [[each resources.goodsTabBar.data.new as item _index]]
189 [[if item.name]] 192 [[if item.name]]
190 - [[if _index == 0]]  
191 - <li style="border-right: 0"><a href="[[item.url]]">[[item.name]]</a></li>  
192 - [[else]]  
193 - <li><a href="[[item.url]]">[[item.name]]</a></li>  
194 - [[/if]] 193 + [[if _index == 0]]
  194 + <li style="border-right: 0"><a href="[[item.url]]">[[item.name]]</a></li>
  195 + [[else]]
  196 + <li><a href="[[item.url]]">[[item.name]]</a></li>
  197 + [[/if]]
195 [[/if]] 198 [[/if]]
196 [[/each]] 199 [[/each]]
197 </ul> 200 </ul>
@@ -200,9 +203,13 @@ @@ -200,9 +203,13 @@
200 </div> 203 </div>
201 <div class="model-showDetail model-editor" data-toggle="editor-newProduct" data-title="新品上架商品编辑"> 204 <div class="model-showDetail model-editor" data-toggle="editor-newProduct" data-title="新品上架商品编辑">
202 <ul> 205 <ul>
  206 + [[if resources.newProducts.data.length > 0]]
203 [[each resources.newProducts.data as item _index]] 207 [[each resources.newProducts.data as item _index]]
204 - <li><img src="[[item.src]]"><div class="shadow"><a href="javascript:">[[item.productName]]</a><b>¥[[item.productPrice]]</b></div></li> 208 + <li><img src="[[item.src]]"><div class="shadow"><a href="javascript:">[[item.productName]]</a><b>¥[[item.salesPrice]]</b></div></li>
205 [[/each]] 209 [[/each]]
  210 + [[else]]
  211 + <li><img src="http://cdn.yoho.cn/yohobuy-portal/assets/images/shop.png"><div class="shadow"><a href="javascript:">商品展示样例</a><b>¥商品价格</b></div></li>
  212 + [[/if]]
206 </ul> 213 </ul>
207 <div class="clear"></div> 214 <div class="clear"></div>
208 </div> 215 </div>
@@ -211,20 +218,16 @@ @@ -211,20 +218,16 @@
211 <!--人气单品--> 218 <!--人气单品-->
212 <div class="model-show"> 219 <div class="model-show">
213 <div class="model-showTitle"> 220 <div class="model-showTitle">
214 - [[if resources.hotProducts.data.length > 0]]  
215 <div class="showName"><span>人气单品&nbsp;&nbsp;NEW</span></div> 221 <div class="showName"><span>人气单品&nbsp;&nbsp;NEW</span></div>
216 - [[else]]  
217 - <div class="showName model-editor" data-toggle="editor-hotProduct" data-title="人气单品商品编辑"><span>人气单品&nbsp;&nbsp;NEW</span></div>  
218 - [[/if]]  
219 <div class="showTab model-editor" data-toggle="editor-hotGoodTab" data-title="人气单品标签编辑"> 222 <div class="showTab model-editor" data-toggle="editor-hotGoodTab" data-title="人气单品标签编辑">
220 <ul> 223 <ul>
221 [[each resources.goodsTabBar.data.hot as item _index]] 224 [[each resources.goodsTabBar.data.hot as item _index]]
222 [[if item.name]] 225 [[if item.name]]
223 - [[if _index == 0]]  
224 - <li style="border-right: 0"><a href="[[item.url]]">[[item.name]]</a></li>  
225 - [[else]]  
226 - <li><a href="[[item.url]]">[[item.name]]</a></li>  
227 - [[/if]] 226 + [[if _index == 0]]
  227 + <li style="border-right: 0"><a href="[[item.url]]">[[item.name]]</a></li>
  228 + [[else]]
  229 + <li><a href="[[item.url]]">[[item.name]]</a></li>
  230 + [[/if]]
228 [[/if]] 231 [[/if]]
229 [[/each]] 232 [[/each]]
230 </ul> 233 </ul>
@@ -233,9 +236,13 @@ @@ -233,9 +236,13 @@
233 </div> 236 </div>
234 <div class="model-showDetail model-editor" data-toggle="editor-hotProduct" data-title="人气单品商品编辑"> 237 <div class="model-showDetail model-editor" data-toggle="editor-hotProduct" data-title="人气单品商品编辑">
235 <ul> 238 <ul>
  239 + [[if resources.hotProducts.data.length > 0]]
236 [[each resources.hotProducts.data as item _index]] 240 [[each resources.hotProducts.data as item _index]]
237 - <li><img src="[[item.src]]"><div class="shadow"><a href="javascript:">[[item.productName]]</a><b>¥[[item.productPrice]]</b></div></li> 241 + <li><img src="[[item.src]]"><div class="shadow"><a href="javascript:">[[item.productName]]</a><b>¥[[item.salesPrice]]</b></div></li>
238 [[/each]] 242 [[/each]]
  243 + [[else]]
  244 + <li><img src="http://cdn.yoho.cn/yohobuy-portal/assets/images/shop.png"><div class="shadow"><a href="javascript:">商品展示样例</a><b>¥商品价格</b></div></li>
  245 + [[/if]]
239 </ul> 246 </ul>
240 <div class="clear"></div> 247 <div class="clear"></div>
241 </div> 248 </div>
@@ -252,10 +259,17 @@ @@ -252,10 +259,17 @@
252 <div class="model-wrap contentpanel-app"> 259 <div class="model-wrap contentpanel-app">
253 <!--banner--> 260 <!--banner-->
254 <div class="model-banner model-editor" data-toggle="editor-banner" data-title="顶部图片编辑"> 261 <div class="model-banner model-editor" data-toggle="editor-banner" data-title="顶部图片编辑">
  262 + [[if resources.shopTopBanner_APP.isUsed == "Y"]]
  263 + <img src="[[resources.shopTopBanner_APP.data[0].shopSrc]]">
  264 + [[if resources.shopTopBanner_APP.data[0].isShowShopName == "Y"]]
  265 + <h1>[[shopName]]</h1>
  266 + [[/if]]
  267 + [[else]]
255 <img src="[[resources.shopTopBanner.data[0].shopSrc]]"> 268 <img src="[[resources.shopTopBanner.data[0].shopSrc]]">
256 [[if resources.shopTopBanner.data[0].isShowShopName == "Y"]] 269 [[if resources.shopTopBanner.data[0].isShowShopName == "Y"]]
257 <h1>[[shopName]]</h1> 270 <h1>[[shopName]]</h1>
258 [[/if]] 271 [[/if]]
  272 + [[/if]]
259 </div> 273 </div>
260 <!--nav--> 274 <!--nav-->
261 <div class="model-nav"> 275 <div class="model-nav">
@@ -281,9 +295,15 @@ @@ -281,9 +295,15 @@
281 <!--小图--> 295 <!--小图-->
282 <div class="model-smallPic model-editor" data-toggle="editor-smallPic" data-title="资源位小图编辑"> 296 <div class="model-smallPic model-editor" data-toggle="editor-smallPic" data-title="资源位小图编辑">
283 <ul> 297 <ul>
  298 + [[if resources.oneRowTwoColImages_APP.isUsed == "Y"]]
  299 + [[each resources.oneRowTwoColImages_APP.data as item _index]]
  300 + <li><img src="[[item.data[0].src]]"></li>
  301 + [[/each]]
  302 + [[else]]
284 [[each resources.oneRowTwoColImages.data as item _index]] 303 [[each resources.oneRowTwoColImages.data as item _index]]
285 <li><img src="[[item.data[0].src]]"></li> 304 <li><img src="[[item.data[0].src]]"></li>
286 [[/each]] 305 [[/each]]
  306 + [[/if]]
287 </ul> 307 </ul>
288 </div> 308 </div>
289 <div class="clear"></div> 309 <div class="clear"></div>
@@ -293,9 +313,9 @@ @@ -293,9 +313,9 @@
293 <div class="sortListDetail model-editor" data-toggle="editor-recommend-app" data-title="热门品类编辑"> 313 <div class="sortListDetail model-editor" data-toggle="editor-recommend-app" data-title="热门品类编辑">
294 <ul> 314 <ul>
295 [[each resources.recommend.data as item _index]] 315 [[each resources.recommend.data as item _index]]
296 - [[if item.isShowInApp == "Y"]]  
297 - <li><img src="[[item.src]]"><a href="[[item.url]]">[[item.name]]</a></li>  
298 - [[/if]] 316 + [[if item.isShowInApp == "Y"]]
  317 + <li><img src="[[item.src]]"><a href="[[item.url]]">[[item.name]]</a></li>
  318 + [[/if]]
299 [[/each]] 319 [[/each]]
300 </ul> 320 </ul>
301 <div class="clear"></div> 321 <div class="clear"></div>
@@ -310,9 +330,19 @@ @@ -310,9 +330,19 @@
310 </div> 330 </div>
311 <div class="model-showDetail model-editor" data-toggle="editor-hotProduct" data-title="人气单品商品编辑"> 331 <div class="model-showDetail model-editor" data-toggle="editor-hotProduct" data-title="人气单品商品编辑">
312 <ul> 332 <ul>
  333 + [[if resources.hotProducts_APP.isUsed == "Y"]]
  334 + [[each resources.hotProducts_APP.data as item _index]]
  335 + <li><img src="[[item.src]]"><div class="shadow"><a href="javascript:">[[item.productName]]</a><b>¥[[item.salesPrice]]</b></div></li>
  336 + [[/each]]
  337 + [[else]]
  338 + [[if resources.hotProducts.data.length > 0]]
313 [[each resources.hotProducts.data as item _index]] 339 [[each resources.hotProducts.data as item _index]]
314 - <li><img src="[[item.src]]"><div class="shadow"><a href="javascript:">[[item.productName]]</a><b>¥[[item.productPrice]]</b></div></li> 340 + <li><img src="[[item.src]]"><div class="shadow"><a href="javascript:">[[item.productName]]</a><b>¥[[item.salesPrice]]</b></div></li>
315 [[/each]] 341 [[/each]]
  342 + [[else]]
  343 + <li><img src="http://cdn.yoho.cn/yohobuy-portal/assets/images/shop.png"><div class="shadow"><a href="javascript:">商品展示样例</a><b>¥商品价格</b></div></li>
  344 + [[/if]]
  345 + [[/if]]
316 </ul> 346 </ul>
317 <div class="clear"></div> 347 <div class="clear"></div>
318 </div> 348 </div>
@@ -326,9 +356,9 @@ @@ -326,9 +356,9 @@
326 <div class="topListName">畅销排行Top20</div> 356 <div class="topListName">畅销排行Top20</div>
327 <div class="topListDetail"> 357 <div class="topListDetail">
328 <ul> 358 <ul>
329 - [[each product_list as item _index]]  
330 - <li class="topAdd" data-productId="[[item.product_id]]" data-productName="[[item.product_name]]" data-productPrice="[[item.sales_price]]">  
331 - <a href="javascript:"><img src="[[item.default_images]]"><b></b><span>top[[_index+1]]</span><i></i></a> 359 + [[each data as item _index]]
  360 + <li class="topAdd" data-productId="[[item.productId]]" data-productName="[[item.productName]]" data-productPrice="[[item.salesPrice]]" data-productSkn="[[item.productSkn]]">
  361 + <a href="javascript:"><img src="[[item.src]]"><b></b><span>top[[_index+1]]</span><i></i></a>
332 </li> 362 </li>
333 [[/each]] 363 [[/each]]
334 </ul> 364 </ul>