Authored by dongjunjie

店铺装修4

@@ -21,11 +21,7 @@ var ENUM = { @@ -21,11 +21,7 @@ var ENUM = {
21 "editor-newProduct":{"productId":"", "position":"", "productName":"", "productPrice":"", "src":"", "url":""}, 21 "editor-newProduct":{"productId":"", "position":"", "productName":"", "productPrice":"", "src":"", "url":""},
22 "editor-hotProduct":{"productId":"", "position":"", "productName":"", "productPrice":"", "src":"", "url":""} 22 "editor-hotProduct":{"productId":"", "position":"", "productName":"", "productPrice":"", "src":"", "url":""}
23 }; //添加一条不同弹层使用的初始化模板 23 }; //添加一条不同弹层使用的初始化模板
24 -var jsonNew = {  
25 - "shopsId":0,  
26 - "platform": "PC",  
27 - "templateName": "2",  
28 - "resources":{ 24 +var resourcesNew = {
29 "shopTopBanner":{ 25 "shopTopBanner":{
30 "id":"", 26 "id":"",
31 "data": [{"shopSrc": "", "detailSrc": "", "isShowShopName": "Y"}] 27 "data": [{"shopSrc": "", "detailSrc": "", "isShowShopName": "Y"}]
@@ -84,8 +80,7 @@ var jsonNew = { @@ -84,8 +80,7 @@ var jsonNew = {
84 "id":"", 80 "id":"",
85 "data": [{"productId":"default", "position":1, "productName":"默认商品", "productPrice":"默认价格", "src":"", "url":""},] 81 "data": [{"productId":"default", "position":1, "productName":"默认商品", "productPrice":"默认价格", "src":"", "url":""},]
86 } 82 }
87 - }  
88 -}; //初始化json 83 +} //初始化装修信息json
89 var _id, templateId, jsonMain, jsonClone, topNewProducts, topHotProducts; 84 var _id, templateId, jsonMain, jsonClone, topNewProducts, topHotProducts;
90 85
91 getParams(); 86 getParams();
@@ -182,7 +177,7 @@ function findDecoration(){ @@ -182,7 +177,7 @@ function findDecoration(){
182 } 177 }
183 178
184 if($.isEmptyObject(jsonMain.resources)){ 179 if($.isEmptyObject(jsonMain.resources)){
185 - jsonMain.resources = $.extend(true,{},jsonNew.resources); 180 + jsonMain.resources = $.extend(true,{},resourcesNew);
186 } 181 }
187 jsonClone = $.extend(true,{},jsonMain); 182 jsonClone = $.extend(true,{},jsonMain);
188 183
@@ -364,25 +359,8 @@ function gridInit(id){ @@ -364,25 +359,8 @@ function gridInit(id){
364 return "<input class='form-control numInput inputChange' type=text name='position' value='"+item.position+"' data-index='"+item.__index+"' />"; 359 return "<input class='form-control numInput inputChange' type=text name='position' value='"+item.position+"' data-index='"+item.__index+"' />";
365 }}, 360 }},
366 {display:"名称", render:function(item){ 361 {display:"名称", render:function(item){
367 - return "<input class='form-control inputChange' type=text name='name' value='"+item.name+"' data-index='"+item.__index+"' />";  
368 - }},  
369 - {display:"链接", render:function(item){  
370 - return "<input class='form-control inputChange' type=text name='url' value='"+item.url+"' data-index='"+item.__index+"' />"; 362 + return item.name;
371 }}, 363 }},
372 - {display:"操作", render:function(item){  
373 - var htmlPic = "",i=item.__index;  
374 - if(i == (g.__rows.length-1) && g.__rows.length > 1){  
375 - htmlPic += "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' /><br>";  
376 - htmlPic += "<input type=button class='btn btn-info btn-xs addBtn' style='margin-top: 10px' value='添加一条' data-index='"+item.__index+"' />";  
377 - }  
378 - if(i < (g.__rows.length-1) && g.__rows.length > 1){  
379 - htmlPic += "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' />";  
380 - }  
381 - if(i == (g.__rows.length-1) && g.__rows.length == 1){  
382 - htmlPic += "<input type=button class='btn btn-info btn-xs addBtn' value='添加一条' data-index='"+item.__index+"' />";  
383 - }  
384 - return htmlPic;  
385 - }}  
386 ] 364 ]
387 }); 365 });
388 g.__rows=""||jsonClone.resources.brandBrowse.data; 366 g.__rows=""||jsonClone.resources.brandBrowse.data;
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'; 3 +//exports.domain = 'http://172.16.6.115:8080/platform';
4 4
5 exports.res = [ 5 exports.res = [
6 { 6 {