...
|
...
|
@@ -9,22 +9,24 @@ var curPlatform = "shopWeb-pc"; //当前渲染页面用的模板名称 |
|
|
var curTemplateType = "2"; //当前模板类型 1:基础模板,2:经典模板
|
|
|
var shopType = 1; //店铺类型 1:单品牌,2:多品牌
|
|
|
var shopOperate = 'view'; //操作 editor:可编辑, view:查看不可编辑
|
|
|
var defaultSrc = "http://cdn.yoho.cn/yohobuy-portal/assets/images/shop.png"; //初始化默认图片路径
|
|
|
var ENUM = {
|
|
|
"editor-largePic":{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0},
|
|
|
"editor-smallPic":{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0},
|
|
|
"editor-largePic":{"src": defaultSrc, "url": "", "startTime": "", "endTime": "", "publishStatus": 0},
|
|
|
"editor-largePic2":{"position":"", "data":[{"src": defaultSrc, "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
"editor-smallPic":{"src": defaultSrc, "url": "", "startTime": "", "endTime": "", "publishStatus": 0},
|
|
|
"editor-brand":{"position":"", "name":"", "url":""},
|
|
|
"editor-recommend": {"position":"", "name":"", "enName":"", "src":"", "url":"","isShowInApp":"Y"},
|
|
|
"editor-hotRecommend":{"position":"", "src":"", "url":""},
|
|
|
"editor-signboard":{"position":"", "src":"", "url":"","startTime": "","endTime": "","publishStatus": 0},
|
|
|
"editor-recommend": {"position":"", "name":"", "enName":"", "src":defaultSrc, "url":"","isShowInApp":"Y"},
|
|
|
"editor-hotRecommend":{"position":"", "src":defaultSrc, "url":""},
|
|
|
"editor-signboard":{"position":"", "src":defaultSrc, "url":"","startTime": "","endTime": "","publishStatus": 0},
|
|
|
"editor-newGoodTab":{"position":"", "name":"", "url":""},
|
|
|
"editor-hotGoodTab":{"position":"", "name":"", "url":""},
|
|
|
"editor-newProduct":{"productId":"", "position":"", "productName":"", "productPrice":"", "src":"", "url":""},
|
|
|
"editor-hotProduct":{"productId":"", "position":"", "productName":"", "productPrice":"", "src":"", "url":""}
|
|
|
"editor-newProduct":{"productId":"", "position":"", "productName":"", "productSkn":"", "salesPrice":"", "src":"", "url":""},
|
|
|
"editor-hotProduct":{"productId":"", "position":"", "productName":"", "productSkn":"", "salesPrice":"", "src":"", "url":""}
|
|
|
}; //添加一条不同弹层使用的初始化模板
|
|
|
var resourcesNew = {
|
|
|
"shopTopBanner":{
|
|
|
"id":"",
|
|
|
"data": [{"shopSrc": "", "detailSrc": "", "isShowShopName": "Y"}]
|
|
|
"data": [{"shopSrc": defaultSrc, "detailSrc": defaultSrc, "isShowShopName": "N"}]
|
|
|
},
|
|
|
"navigationBar":{
|
|
|
"id":"",
|
...
|
...
|
@@ -32,19 +34,13 @@ var resourcesNew = { |
|
|
},
|
|
|
"largeSlideImg":{
|
|
|
"id":"",
|
|
|
"data": [
|
|
|
{"position": 5, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
{"position": 4, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
{"position": 3, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
{"position": 2, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
{"position": 1, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]}
|
|
|
]
|
|
|
"data": [{"position": 1, "data":[{"src": defaultSrc, "url": "", "startTime": "", "endTime": ""}]}]
|
|
|
},
|
|
|
"oneRowTwoColImages":{
|
|
|
"id":"",
|
|
|
"data": [
|
|
|
{"position": 2, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
|
|
|
{"position": 1, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]}
|
|
|
{"position": 2, "data":[{"src": defaultSrc, "url": "", "startTime": "", "endTime": ""}]},
|
|
|
{"position": 1, "data":[{"src": defaultSrc, "url": "", "startTime": "", "endTime": ""}]}
|
|
|
]
|
|
|
},
|
|
|
"brandBrowse":{
|
...
|
...
|
@@ -54,16 +50,16 @@ var resourcesNew = { |
|
|
"recommend":{
|
|
|
"id":"",
|
|
|
"title":"经典推荐",
|
|
|
"data": [{"position":1, "name":"", "enName":"", "src":"", "url":"","isShowInApp":"Y"}]
|
|
|
"data": [{"position":1, "name":"默认商品", "enName":"", "src":defaultSrc, "url":"","isShowInApp":"Y"}]
|
|
|
},
|
|
|
"hotRecommend":{
|
|
|
"id":"",
|
|
|
"title":"热销推荐",
|
|
|
"data": [{"position":1, "src":"", "url":""}]
|
|
|
"title":"",
|
|
|
"data": [{"position":1, "src":defaultSrc, "url":""}]
|
|
|
},
|
|
|
"signboard":{
|
|
|
"id":"",
|
|
|
"data": [{"position":1, "src":"", "url":"", "startTime": "", "endTime": "", "publishStatus": 0}]
|
|
|
"data": [{"position": 1, "data":[{"src": defaultSrc, "url": "", "startTime": "", "endTime": ""}]}]
|
|
|
},
|
|
|
"goodsTabBar":{
|
|
|
"id":"",
|
...
|
...
|
@@ -74,14 +70,44 @@ var resourcesNew = { |
|
|
},
|
|
|
"newProducts":{
|
|
|
"id":"",
|
|
|
"data": [{"productId":"0", "position":1, "productName":"默认商品", "productPrice":"默认价格", "src":"", "url":""}]
|
|
|
"data": []
|
|
|
},
|
|
|
"hotProducts":{
|
|
|
"id":"",
|
|
|
"data": [{"productId":"0", "position":1, "productName":"默认商品", "productPrice":"默认价格", "src":"", "url":""}]
|
|
|
"data": []
|
|
|
},
|
|
|
"allNewProducts":{
|
|
|
"id":"",
|
|
|
"data":[]
|
|
|
},
|
|
|
"allHotProducts":{
|
|
|
"id":"",
|
|
|
"data":[]
|
|
|
},
|
|
|
"shopTopBanner_APP":{
|
|
|
"id":"",
|
|
|
"isUsed":"N",
|
|
|
"data": [{"shopSrc": defaultSrc, "detailSrc": defaultSrc, "isShowShopName": "N"}]
|
|
|
},
|
|
|
"oneRowTwoColImages_APP":{
|
|
|
"id":"",
|
|
|
"isUsed":"N",
|
|
|
"data": [
|
|
|
{"position": 2, "data":[{"src": defaultSrc, "url": "", "startTime": "", "endTime": ""}]},
|
|
|
{"position": 1, "data":[{"src": defaultSrc, "url": "", "startTime": "", "endTime": ""}]}
|
|
|
]
|
|
|
},
|
|
|
"hotProducts_APP":{
|
|
|
"id":"",
|
|
|
"isUsed":"N",
|
|
|
"data": []
|
|
|
},
|
|
|
"allHotProducts_APP":{
|
|
|
"id":"",
|
|
|
"data":[]
|
|
|
}
|
|
|
} //初始化装修信息json
|
|
|
var shopsId, _id, jsonMain, jsonClone, topNewProducts, topHotProducts;
|
|
|
var shopsId, _id, jsonMain, jsonClone;
|
|
|
|
|
|
getParams();
|
|
|
findDecoration();
|
...
|
...
|
@@ -113,10 +139,11 @@ function getParams(){ |
|
|
}
|
|
|
//json渲染模板
|
|
|
function showMain(){
|
|
|
$('#templateSelect').val(curTemplateType);
|
|
|
$('#templateSelect').val(jsonMain.templateType);
|
|
|
$("input[name='brandLevel'][value='"+curTemplateType+"']").attr('checked',"checked");
|
|
|
|
|
|
if(curPlatform == "shopWeb-pc"){
|
|
|
//console.log(jsonMain);
|
|
|
$('#main').empty().html(common.util.__template2($("#"+curPlatform+"-"+curTemplateType).html(),jsonMain));
|
|
|
} else if(curPlatform == "shopWeb-app"){
|
|
|
$('#main').empty().html(common.util.__template2($("#"+curPlatform).html(),jsonMain));
|
...
|
...
|
@@ -127,6 +154,12 @@ function showMain(){ |
|
|
}else if(shopType == 1){
|
|
|
$(".model-brand").hide();
|
|
|
}
|
|
|
//标签长度样式自适应
|
|
|
$.each($(".contentpanel-pc .model-showTitle .showTab"),function(){
|
|
|
if($(this).width() > 280){
|
|
|
$(this).css("right",(280-($(this).width()))+"px");
|
|
|
}
|
|
|
})
|
|
|
showEditorIconEvent();
|
|
|
}
|
|
|
//弹窗编辑主流程
|
...
|
...
|
@@ -170,27 +203,40 @@ function findDecoration(){ |
|
|
}
|
|
|
},
|
|
|
function(rs) {
|
|
|
//console.log(rs.data);
|
|
|
console.log(rs.data);
|
|
|
if(rs.data){
|
|
|
jsonMain = rs.data;
|
|
|
}
|
|
|
if(jsonMain.templateName){
|
|
|
curTemplateType = jsonMain.templateName;
|
|
|
}
|
|
|
//没有装修信息,初始化装修信息
|
|
|
if($.isEmptyObject(jsonMain.resources)){
|
|
|
jsonMain.resources = $.extend(true,{},resourcesNew);
|
|
|
}
|
|
|
//装修信息中品牌内容为空,初始化品牌
|
|
|
if(jsonMain.resources.brandBrowse.data.length < 1 && jsonMain.brandList){
|
|
|
cloneArr(jsonMain.brandList,jsonMain.resources.brandBrowse.data);
|
|
|
if(jsonMain.brandList){
|
|
|
if(jsonMain.resources.brandBrowse.data.length < 1){
|
|
|
cloneArr(jsonMain.brandList,jsonMain.resources.brandBrowse.data);
|
|
|
}
|
|
|
}else{
|
|
|
common.util.__tip("店铺没有品牌,无法装修,请返回添加品牌!");
|
|
|
return;
|
|
|
}
|
|
|
if(jsonMain.templateType && jsonMain.templateType != "0"){
|
|
|
curTemplateType = jsonMain.templateType;
|
|
|
}
|
|
|
//装修json克隆
|
|
|
jsonClone = $.extend(true,{},jsonMain);
|
|
|
|
|
|
//最新上架,最热商品接口
|
|
|
if(shopOperate == 'editor'){
|
|
|
findTopNewProducts();
|
|
|
findTopHotProducts();
|
|
|
if(!jsonMain.resources.allNewProducts.data || jsonMain.resources.allNewProducts.data.length < 1){
|
|
|
findTopNewProducts();
|
|
|
}
|
|
|
if(!jsonMain.resources.allHotProducts.data || jsonMain.resources.allHotProducts.data.length < 1){
|
|
|
findTopHotProducts();
|
|
|
}
|
|
|
if(!jsonMain.resources.allHotProducts_APP.data || jsonMain.resources.allHotProducts_APP.data.length < 1){
|
|
|
findTopHotProducts_APP();
|
|
|
}
|
|
|
}
|
|
|
showMain();
|
|
|
},true);
|
...
|
...
|
@@ -204,7 +250,9 @@ function findTopNewProducts(){ |
|
|
"size": 20
|
|
|
}
|
|
|
},function(rs){
|
|
|
topNewProducts = rs.data;
|
|
|
if(rs.data.product_list){
|
|
|
jsonMain.resources.allNewProducts.data = rs.data.product_list;
|
|
|
}
|
|
|
},true);
|
|
|
}
|
|
|
//Ajax热销商品
|
...
|
...
|
@@ -216,23 +264,39 @@ function findTopHotProducts(){ |
|
|
"size": 20
|
|
|
}
|
|
|
},function(rs){
|
|
|
topHotProducts = rs.data;
|
|
|
if(rs.data.product_list){
|
|
|
jsonMain.resources.allHotProducts.data = rs.data.product_list;
|
|
|
}
|
|
|
},true);
|
|
|
}
|
|
|
//Ajax热销商品---APP
|
|
|
function findTopHotProducts_APP(){
|
|
|
common.util.__ajax({
|
|
|
url:'/store/shop-decoration-hotProducts',
|
|
|
data: {
|
|
|
"shopsId": jsonMain.shopsId,
|
|
|
"size": 20
|
|
|
}
|
|
|
},function(rs){
|
|
|
if(rs.data.product_list){
|
|
|
jsonMain.resources.allHotProducts_APP.data = rs.data.product_list;
|
|
|
}
|
|
|
},true);
|
|
|
}
|
|
|
//Ajax保存,暂存:100,提交审核:200
|
|
|
function saveDecoration(submitStatus){
|
|
|
console.log(jsonMain);
|
|
|
common.util.__ajax({
|
|
|
url:'/store/shop-decoration-save',
|
|
|
data: {
|
|
|
"submitStatus": submitStatus,
|
|
|
"shopsId": jsonMain.shopsId,
|
|
|
"platform": jsonMain.platform,
|
|
|
"templateName": jsonMain.templateName,
|
|
|
"templateType": jsonMain.templateType,
|
|
|
"resources": JSON.stringify(jsonMain.resources)
|
|
|
}
|
|
|
},function(rs){
|
|
|
if(rs.data){
|
|
|
//console.log(rs.data);
|
|
|
if(submitStatus == 100){
|
|
|
jsonMain = rs.data;
|
|
|
jsonClone = $.extend(true,{},jsonMain);
|
...
|
...
|
@@ -247,7 +311,7 @@ function saveDecoration(submitStatus){ |
|
|
}
|
|
|
//Ajax审核,审核通过:300,驳回:900
|
|
|
function checkDecoration(checkStatus,comment){
|
|
|
if(comment){
|
|
|
if(comment){ //驳回
|
|
|
common.util.__ajax({
|
|
|
url:'/store/shop-decoration-check',
|
|
|
data: {
|
...
|
...
|
@@ -256,12 +320,12 @@ function checkDecoration(checkStatus,comment){ |
|
|
"comment": comment
|
|
|
}
|
|
|
},function(rs){
|
|
|
common.util.__tip("审核通过成功!","success");
|
|
|
common.util.__tip("审核驳回成功!","success");
|
|
|
setTimeout(function() {
|
|
|
location.href="/supplier/check/index";
|
|
|
}, 1000);
|
|
|
},true);
|
|
|
}else{
|
|
|
}else{ //通过
|
|
|
common.util.__ajax({
|
|
|
url:'/store/shop-decoration-check',
|
|
|
data: {
|
...
|
...
|
@@ -269,7 +333,7 @@ function checkDecoration(checkStatus,comment){ |
|
|
"checkStatus": checkStatus
|
|
|
}
|
|
|
},function(rs){
|
|
|
common.util.__tip("审核驳回成功!","success");
|
|
|
common.util.__tip("审核通过成功!","success");
|
|
|
setTimeout(function() {
|
|
|
location.href="/supplier/check/index";
|
|
|
}, 1000);
|
...
|
...
|
@@ -284,28 +348,51 @@ function gridInit(id){ |
|
|
switch (id){
|
|
|
//店铺顶部banner
|
|
|
case "editor-banner":
|
|
|
g = new common.grid({
|
|
|
hash: false,
|
|
|
el:"#"+id,
|
|
|
columns:[
|
|
|
{display:"店铺banner图片", render:function(item){
|
|
|
return "<input type=file name='shopBannerImage' id='shopBannerImage_"+item.__index+"' value='"+item.shopSrc+"' />";
|
|
|
}},
|
|
|
{display:"是否显示店铺名称", render:function(item){
|
|
|
if(item.isShowShopName == "Y"){
|
|
|
return "<lable><input type='radio' name='isShowShopName' value='Y' checked='checked'>显示店铺名称</lable><br>" +
|
|
|
"<lable><input type='radio' name='isShowShopName' value='N'>不显示店铺名称</lable>";
|
|
|
}else{
|
|
|
return "<lable><input type='radio' name='isShowShopName' value='Y'>显示店铺名称</lable><br>" +
|
|
|
"<lable><input type='radio' name='isShowShopName' value='N' checked='checked'>不显示店铺名称</lable>";
|
|
|
}
|
|
|
}},
|
|
|
{display:"商品详情页banner图片", render:function(item){
|
|
|
return "<input type=file name='DetailbannerImage' id='DetailbannerImage_"+item.__index+"' value='"+item.detailSrc+"' />";
|
|
|
}}
|
|
|
]
|
|
|
});
|
|
|
g.__rows=""||jsonClone.resources.shopTopBanner.data;
|
|
|
if(curPlatform == "shopWeb-pc"){
|
|
|
g = new common.grid({
|
|
|
hash: false,
|
|
|
el:"#"+id,
|
|
|
columns:[
|
|
|
{display:"店铺banner图片", render:function(item){
|
|
|
return "<input type=file name='shopBannerImage' id='shopBannerImage_"+item.__index+"' value='"+item.shopSrc+"' />";
|
|
|
}},
|
|
|
{display:"是否显示店铺名称", render:function(item){
|
|
|
if(item.isShowShopName == "Y"){
|
|
|
return "<lable><input type='radio' name='isShowShopName' value='Y' checked='checked'>显示店铺名称</lable><br>" +
|
|
|
"<lable><input type='radio' name='isShowShopName' value='N'>不显示店铺名称</lable>";
|
|
|
}else{
|
|
|
return "<lable><input type='radio' name='isShowShopName' value='Y'>显示店铺名称</lable><br>" +
|
|
|
"<lable><input type='radio' name='isShowShopName' value='N' checked='checked'>不显示店铺名称</lable>";
|
|
|
}
|
|
|
}},
|
|
|
{display:"商品详情页banner图片", render:function(item){
|
|
|
return "<input type=file name='DetailbannerImage' id='DetailbannerImage_"+item.__index+"' value='"+item.detailSrc+"' />";
|
|
|
}}
|
|
|
]
|
|
|
});
|
|
|
g.__rows=""||jsonClone.resources.shopTopBanner.data;
|
|
|
}
|
|
|
if(curPlatform == "shopWeb-app"){
|
|
|
g = new common.grid({
|
|
|
hash: false,
|
|
|
el:"#"+id,
|
|
|
columns:[
|
|
|
{display:"店铺banner图片", render:function(item){
|
|
|
return "<input type=file name='shopBannerImage' id='shopBannerImage_"+item.__index+"' value='"+item.shopSrc+"' />";
|
|
|
}},
|
|
|
{display:"是否显示店铺名称", render:function(item){
|
|
|
if(item.isShowShopName == "Y"){
|
|
|
return "<lable><input type='radio' name='isShowShopName' value='Y' checked='checked'>显示店铺名称</lable><br>" +
|
|
|
"<lable><input type='radio' name='isShowShopName' value='N'>不显示店铺名称</lable>";
|
|
|
}else{
|
|
|
return "<lable><input type='radio' name='isShowShopName' value='Y'>显示店铺名称</lable><br>" +
|
|
|
"<lable><input type='radio' name='isShowShopName' value='N' checked='checked'>不显示店铺名称</lable>";
|
|
|
}
|
|
|
}}
|
|
|
]
|
|
|
});
|
|
|
g.__rows=""||jsonClone.resources.shopTopBanner_APP.data;
|
|
|
}
|
|
|
g.init(g.__rows);
|
|
|
break;
|
|
|
|
...
|
...
|
@@ -316,7 +403,7 @@ function gridInit(id){ |
|
|
el:"#"+id,
|
|
|
columns:[
|
|
|
{display:"编号", render:function(item){
|
|
|
return item.__index+1;
|
|
|
return item.__index+1;
|
|
|
}},
|
|
|
{display:"名称", render:function(item){
|
|
|
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){ |
|
|
|
|
|
//店铺大图资源位
|
|
|
case "editor-largePic":
|
|
|
$('.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");
|
|
|
g = new common.grid({
|
|
|
hash: false,
|
|
|
el:"#"+id,
|
|
|
columns:[
|
|
|
{display:"排序", render:function(item){
|
|
|
item.position=item.position || (item.__index+1);
|
|
|
return "<input class='form-control numInput inputChange' type=text name='position' value='"+item.position+"' data-index='"+item.__index+"' />";
|
|
|
}},
|
|
|
{
|
|
|
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> " +
|
|
|
"<div class='col-sm-1'>状态</div><div class='col-sm-2'>操作</div></div>",
|
|
|
{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> " +
|
|
|
"<div class='col-sm-1'>状态</div><div class='col-sm-2'>操作</div></div>",
|
|
|
render: function (item) {
|
|
|
return resourcesHtmlInit(item,"largePic");
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
{display:"操作", render:function(item){
|
|
|
if(g.__rows.length > 1){
|
|
|
return "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' />";
|
|
|
}
|
|
|
}}
|
|
|
]
|
|
|
});
|
|
|
g.__rows=""||jsonClone.resources.largeSlideImg.data;
|
...
|
...
|
@@ -370,7 +463,12 @@ function gridInit(id){ |
|
|
}
|
|
|
]
|
|
|
});
|
|
|
g.__rows=""||jsonClone.resources.oneRowTwoColImages.data;
|
|
|
if(curPlatform == "shopWeb-pc"){
|
|
|
g.__rows=""||jsonClone.resources.oneRowTwoColImages.data;
|
|
|
}
|
|
|
if(curPlatform == "shopWeb-app"){
|
|
|
g.__rows=""||jsonClone.resources.oneRowTwoColImages_APP.data;
|
|
|
}
|
|
|
g.init(g.__rows);
|
|
|
break;
|
|
|
|
...
|
...
|
@@ -460,7 +558,7 @@ function gridInit(id){ |
|
|
return "<input class='form-control numInput inputChange' type=text name='position' value='"+item.position+"' data-index='"+item.__index+"' />";
|
|
|
}},
|
|
|
{display:"图片", render:function(item){
|
|
|
return "<input type=file name='signboardImage' id='signboardImage_"+item.__index+"' value='"+item.src+"' />";
|
|
|
return "<input type=file name='signboardImage' id='hotRecommendImage_"+item.__index+"' value='"+item.src+"' />";
|
|
|
}},
|
|
|
{display:"链接", render:function(item){
|
|
|
return "<input class='form-control inputChange' type=text name='url' value='"+item.url+"' data-index='"+item.__index+"' />";
|
...
|
...
|
@@ -492,6 +590,7 @@ function gridInit(id){ |
|
|
|
|
|
//水牌signboard
|
|
|
case "editor-signboard":
|
|
|
$('.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");
|
|
|
g = new common.grid({
|
|
|
hash: false,
|
|
|
el:"#"+id,
|
...
|
...
|
@@ -500,34 +599,16 @@ function gridInit(id){ |
|
|
item.position=item.position || (item.__index+1);
|
|
|
return "<input class='form-control numInput inputChange' type=text name='position' value='"+item.position+"' data-index='"+item.__index+"' />";
|
|
|
}},
|
|
|
{display:"图片", render:function(item){
|
|
|
return "<input type=file name='signboardImage' id='signboardImage_"+item.__index+"' value='"+item.src+"' />";
|
|
|
}},
|
|
|
{display:"链接", render:function(item){
|
|
|
return "<input class='form-control inputChange' type=text name='url' value='"+item.url+"' data-index='"+item.__index+"' />";
|
|
|
}},
|
|
|
{display:"开始时间", render:function(item){
|
|
|
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+"' />";
|
|
|
}},
|
|
|
{display:"结束时间", render:function(item){
|
|
|
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+"' />";
|
|
|
}},
|
|
|
{display:"状态", render:function(item){
|
|
|
return "<span style='white-space: nowrap'>" + (item.publishStatus==0?"未发布":"已发布") + "</span>";
|
|
|
}},
|
|
|
{display:"操作", render:function(item){
|
|
|
var htmlPic = "",i=item.__index;
|
|
|
if(i == (g.__rows.length-1) && g.__rows.length > 1){
|
|
|
htmlPic += "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' /><br>";
|
|
|
htmlPic += "<input type=button class='btn btn-info btn-xs addBtn' style='margin-top: 10px' value='添加一条' data-index='"+item.__index+"' />";
|
|
|
}
|
|
|
if(i < (g.__rows.length-1) && g.__rows.length > 1){
|
|
|
htmlPic += "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' />";
|
|
|
{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> " +
|
|
|
"<div class='col-sm-1'>状态</div><div class='col-sm-2'>操作</div></div>",
|
|
|
render: function (item) {
|
|
|
return resourcesHtmlInit(item,"signboard");
|
|
|
}
|
|
|
if(i == (g.__rows.length-1) && g.__rows.length == 1){
|
|
|
htmlPic += "<input type=button class='btn btn-info btn-xs addBtn' value='添加一条' data-index='"+item.__index+"' />";
|
|
|
},
|
|
|
{display:"操作", render:function(item){
|
|
|
if(g.__rows.length > 1){
|
|
|
return "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' />";
|
|
|
}
|
|
|
return htmlPic;
|
|
|
}}
|
|
|
]
|
|
|
});
|
...
|
...
|
@@ -634,12 +715,7 @@ function gridInit(id){ |
|
|
//新品上架
|
|
|
case "editor-newProduct":
|
|
|
$("#"+id).html("<div id='editor-newProduct-grid' style='width: 500px; float: left'></div><div class='top20List' style='float: left;margin-left: 40px'></div> ");
|
|
|
if(topNewProducts){
|
|
|
$("#"+id+" .top20List").html(common.util.__template2($("#top20Products").html(),topNewProducts));
|
|
|
}else{
|
|
|
$("#"+id+" .top20List").html("最新上架20条加载失败,请重新加载!");
|
|
|
}
|
|
|
|
|
|
//左侧已选商品
|
|
|
g = new common.grid({
|
|
|
hash: false,
|
|
|
el:"#editor-newProduct-grid",
|
...
|
...
|
@@ -659,18 +735,19 @@ function gridInit(id){ |
|
|
});
|
|
|
g.__rows=""||jsonClone.resources.newProducts.data;
|
|
|
g.init(g.__rows);
|
|
|
productTopDataLink(g.__rows);
|
|
|
//右侧热销排名前20商品
|
|
|
if(jsonMain.resources.allNewProducts.data.length > 0){
|
|
|
$("#"+id+" .top20List").html(common.util.__template2($("#top20Products").html(),jsonMain.resources.allNewProducts));
|
|
|
productTopDataLink(g.__rows);
|
|
|
}else{
|
|
|
$("#"+id+" .top20List").html("<font color='red'>* 最新上架20条加载失败,请重新加载页面!</font>");
|
|
|
}
|
|
|
break;
|
|
|
|
|
|
//人气单品
|
|
|
case "editor-hotProduct":
|
|
|
$("#"+id).html("<div id='editor-hotProduct-grid' style='width: 500px; float: left'></div><div class='top20List' style='float: left;margin-left: 40px'></div> ");
|
|
|
if(topHotProducts){
|
|
|
$("#"+id+" .top20List").html(common.util.__template2($("#top20Products").html(),topHotProducts));
|
|
|
}else{
|
|
|
$("#"+id+" .top20List").html("最新上架20条加载失败,请重新加载!");
|
|
|
}
|
|
|
|
|
|
//左侧已选商品
|
|
|
g = new common.grid({
|
|
|
hash: false,
|
|
|
el:"#editor-hotProduct-grid",
|
...
|
...
|
@@ -688,9 +765,27 @@ function gridInit(id){ |
|
|
}}
|
|
|
]
|
|
|
});
|
|
|
g.__rows=""||jsonClone.resources.hotProducts.data;
|
|
|
if(curPlatform == "shopWeb-pc"){
|
|
|
g.__rows=""||jsonClone.resources.hotProducts.data;
|
|
|
//右侧热销排名前20商品
|
|
|
if(jsonMain.resources.allHotProducts.data.length > 0){
|
|
|
$("#"+id+" .top20List").html(common.util.__template2($("#top20Products").html(),jsonMain.resources.allHotProducts));
|
|
|
productTopDataLink(g.__rows);
|
|
|
}else{
|
|
|
$("#"+id+" .top20List").html("<font color='red'>* 最新上架20条加载失败,请重新加载页面!</font>");
|
|
|
}
|
|
|
}
|
|
|
if(curPlatform == "shopWeb-app"){
|
|
|
g.__rows=""||jsonClone.resources.hotProducts_APP.data;
|
|
|
//右侧热销排名前20商品
|
|
|
if(jsonMain.resources.allHotProducts_APP.data.length > 0){
|
|
|
$("#"+id+" .top20List").html(common.util.__template2($("#top20Products").html(),jsonMain.resources.allHotProducts_APP));
|
|
|
productTopDataLink(g.__rows);
|
|
|
}else{
|
|
|
$("#"+id+" .top20List").html("<font color='red'>* 最新上架20条加载失败,请重新加载页面!</font>");
|
|
|
}
|
|
|
}
|
|
|
g.init(g.__rows);
|
|
|
productTopDataLink(g.__rows);
|
|
|
break;
|
|
|
|
|
|
default :
|
...
|
...
|
@@ -703,9 +798,24 @@ function freshJson(id,data,status){ |
|
|
case "editor-banner":
|
|
|
if(status == 1){
|
|
|
data[0].isShowShopName = $("input[name='isShowShopName']:checked").val();
|
|
|
cloneArr(data,jsonMain.resources.shopTopBanner.data);
|
|
|
if(curPlatform == "shopWeb-app"){
|
|
|
jsonMain.resources.shopTopBanner_APP.isUsed = "Y";
|
|
|
cloneArr(data,jsonMain.resources.shopTopBanner_APP.data);
|
|
|
}
|
|
|
if(curPlatform == "shopWeb-pc"){
|
|
|
cloneArr(data,jsonMain.resources.shopTopBanner.data);
|
|
|
if(jsonMain.resources.shopTopBanner_APP.isUsed == "N"){
|
|
|
cloneArr(data,jsonMain.resources.shopTopBanner_APP.data);
|
|
|
cloneArr(data,jsonClone.resources.shopTopBanner_APP.data);
|
|
|
}
|
|
|
}
|
|
|
}else if(status == 0){
|
|
|
cloneArr(jsonMain.resources.shopTopBanner.data,data);
|
|
|
if(curPlatform == "shopWeb-app"){
|
|
|
cloneArr(jsonMain.resources.shopTopBanner_APP.data,data);
|
|
|
}
|
|
|
if(curPlatform == "shopWeb-pc"){
|
|
|
cloneArr(jsonMain.resources.shopTopBanner.data,data);
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
|
...
|
...
|
@@ -727,9 +837,24 @@ function freshJson(id,data,status){ |
|
|
|
|
|
case "editor-smallPic":
|
|
|
if(status == 1){
|
|
|
cloneArr(sortJson(data,1),jsonMain.resources.oneRowTwoColImages.data);
|
|
|
if(curPlatform == "shopWeb-app"){
|
|
|
jsonMain.resources.oneRowTwoColImages_APP.isUsed = "Y";
|
|
|
cloneArr(sortJson(data,1),jsonMain.resources.oneRowTwoColImages_APP.data);
|
|
|
}
|
|
|
if(curPlatform == "shopWeb-pc"){
|
|
|
cloneArr(sortJson(data,1),jsonMain.resources.oneRowTwoColImages.data);
|
|
|
if(jsonMain.resources.oneRowTwoColImages_APP.isUsed == "N"){
|
|
|
cloneArr(sortJson(data,1),jsonMain.resources.oneRowTwoColImages_APP.data);
|
|
|
cloneArr(sortJson(data,1),jsonClone.resources.oneRowTwoColImages_APP.data);
|
|
|
}
|
|
|
}
|
|
|
}else if(status == 0){
|
|
|
cloneArr(jsonMain.resources.oneRowTwoColImages.data,data);
|
|
|
if(curPlatform == "shopWeb-app"){
|
|
|
cloneArr(jsonMain.resources.oneRowTwoColImages_APP.data,data);
|
|
|
}
|
|
|
if(curPlatform == "shopWeb-pc"){
|
|
|
cloneArr(jsonMain.resources.oneRowTwoColImages.data,data);
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
|
...
|
...
|
@@ -793,9 +918,24 @@ function freshJson(id,data,status){ |
|
|
|
|
|
case "editor-hotProduct":
|
|
|
if(status == 1){
|
|
|
cloneArr(sortJson(data,1),jsonMain.resources.hotProducts.data);
|
|
|
if(curPlatform == "shopWeb-app"){
|
|
|
jsonMain.resources.hotProducts_APP.isUsed = "Y";
|
|
|
cloneArr(sortJson(data,1),jsonMain.resources.hotProducts_APP.data);
|
|
|
}
|
|
|
if(curPlatform == "shopWeb-pc"){
|
|
|
cloneArr(sortJson(data,1),jsonMain.resources.hotProducts.data);
|
|
|
if(jsonMain.resources.hotProducts_APP.isUsed == "N"){
|
|
|
cloneArr(sortJson(data,1),jsonMain.resources.hotProducts_APP.data);
|
|
|
cloneArr(sortJson(data,1),jsonClone.resources.hotProducts_APP.data);
|
|
|
}
|
|
|
}
|
|
|
}else if(status == 0){
|
|
|
cloneArr(jsonMain.resources.hotProducts.data,data);
|
|
|
if(curPlatform == "shopWeb-app"){
|
|
|
cloneArr(jsonMain.resources.hotProducts_APP.data,data);
|
|
|
}
|
|
|
if(curPlatform == "shopWeb-pc"){
|
|
|
cloneArr(jsonMain.resources.hotProducts.data,data);
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
|
...
|
...
|
@@ -965,9 +1105,13 @@ function showEditorIconEvent(){ |
|
|
var _this = $(this);
|
|
|
var editorModelId = $(this).attr("data-toggle");
|
|
|
var editorModelTitle = $(this).attr("data-title");
|
|
|
|
|
|
var editorIcon = "<div class='editorBorder'></div>" +
|
|
|
"<a class='editorIcon' href='javascrip:'>编辑</a>"
|
|
|
var editorIcon = "";
|
|
|
if(editorModelId == "editor-brand-app" || editorModelId == "editor-largePic-app" || editorModelId == "editor-recommend-app"){
|
|
|
editorIcon += "<div class='editorBorder' style='border: 5px solid #ff69b4'></div>"
|
|
|
}else{
|
|
|
editorIcon += "<div class='editorBorder'></div>"
|
|
|
}
|
|
|
editorIcon += "<a class='editorIcon' href='javascript:'>编辑</a>"
|
|
|
_this.append(editorIcon);
|
|
|
//编辑事件
|
|
|
editorIconEvent(editorModelTitle,editorModelId);
|
...
|
...
|
@@ -1006,14 +1150,18 @@ function untilEditorEvent(id){ |
|
|
var _index = obj.key.replace(/^file_onComplete_recommendImage_/,'');
|
|
|
g.__rows[_index].src = obj.data;
|
|
|
}
|
|
|
if(/^file_onComplete_hotRecommendImage_/.test(obj.key)){
|
|
|
var _index = obj.key.replace(/^file_onComplete_hotRecommendImage_/,'');
|
|
|
g.__rows[_index].src = obj.data;
|
|
|
}
|
|
|
if(/^file_onComplete_signboardImage_/.test(obj.key)){
|
|
|
var _index = obj.key.replace(/^file_onComplete_signboardImage_/,'');
|
|
|
g.__rows[_index].src = obj.data;
|
|
|
var _indexList = _index.split("_");
|
|
|
g.__rows[_indexList[0]].data[_indexList[1]].src = obj.data;
|
|
|
}
|
|
|
});
|
|
|
$("#"+id+" nav").hide();
|
|
|
$(".modal-dialog").css("width","900px");
|
|
|
$(".modal-dialog .modal-body .editor-dialog").css("max-height","650px");
|
|
|
$(".modal-dialog").css("width","960px");
|
|
|
$(".modal-dialog .modal-body .editor-dialog").css("overflow-y","auto");
|
|
|
$(".modal-dialog .modal-body .editor-dialog").css("overflow-x","hidden");
|
|
|
}
|
...
|
...
|
@@ -1025,11 +1173,16 @@ function resourcesHtmlInit(item,resName){ |
|
|
htmlPic += "<div class='row'>" +
|
|
|
"<div class='col-sm-2'><input type=file name='"+ resName +"Image' id='"+ resName +"Image_"+item.__index+"_"+i+"' value='"+picList[i].src+"' /></div>" +
|
|
|
"<div class='col-sm-3'><input type=text class='form-control inputChange' name='url' value='"+ picList[i].url +"' data-index='"+ item.__index +"_"+ i +"' /></div>" +
|
|
|
"<div class='col-sm-2'>" +
|
|
|
"<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>" +
|
|
|
"<div class='col-sm-2'>" +
|
|
|
"<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>" +
|
|
|
"<div class='col-sm-1'><span style='white-space: nowrap;'>"+ (picList[i].publishStatus==0?"未发布":"已发布") +"</span></div>" +
|
|
|
"<div class='col-sm-2'>";
|
|
|
if(i>0){
|
|
|
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 +"' />" +
|
|
|
"<span style='color: #999; font-size: 12px'>*上一条结束时间</span>";
|
|
|
}else{
|
|
|
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 +"' />";
|
|
|
}
|
|
|
htmlPic += "</div><div class='col-sm-2'>" +
|
|
|
"<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>" +
|
|
|
"<div class='col-sm-1'><span class='publishStatus' style='white-space: nowrap; line-height: 40px'>"+ checkdate(picList[i].startTime,picList[i].endTime) +"</span></div>" +
|
|
|
"<div class='col-sm-2'>";
|
|
|
if(i == (picList.length-1) && picList.length > 1){
|
|
|
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){ |
|
|
}
|
|
|
return arr2;
|
|
|
}
|
|
|
//时间校验
|
|
|
function checkdate(startDate,endDate){
|
|
|
if (endDate) {
|
|
|
var endDateTemp = endDate.split(" ");
|
|
|
var arrEndDate = endDateTemp[0].split("-");
|
|
|
var arrEndTime = endDateTemp[1].split(":");
|
|
|
var allEndDate = new Date(arrEndDate[0], parseInt(arrEndDate[1])-1, arrEndDate[2], arrEndTime[0], arrEndTime[1], arrEndTime[2]);
|
|
|
}
|
|
|
if(startDate){
|
|
|
var startDateTemp = startDate.split(" ");
|
|
|
var arrStartDate = startDateTemp[0].split("-");
|
|
|
var arrStartTime = startDateTemp[1].split(":");
|
|
|
var allStartDate = new Date(arrStartDate[0], parseInt(arrStartDate[1])-1, arrStartDate[2], arrStartTime[0], arrStartTime[1], arrStartTime[2]);
|
|
|
}
|
|
|
var nowDate = new Date();
|
|
|
|
|
|
if(startDate && endDate){
|
|
|
if(nowDate > allEndDate) {
|
|
|
return "<b style='color: #ec971f'>已过期</b>";
|
|
|
}else if(allStartDate > nowDate){
|
|
|
return "<b style='color: #428bca'>未发布</b>";
|
|
|
}else{
|
|
|
return "<b style='color: #5cb85c'>发布中</b>";
|
|
|
}
|
|
|
}else if(!startDate && endDate){
|
|
|
if(nowDate > allEndDate) {
|
|
|
return "<b style='color: #ec971f'>已过期</b>";
|
|
|
}else{
|
|
|
return "<b style='color: #5cb85c'>发布中</b>";
|
|
|
}
|
|
|
}else{
|
|
|
return "<b style='color: #428bca'>未发布</b>";
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
/********************事件绑定*********************/
|
|
|
|
...
|
...
|
@@ -1109,20 +1297,18 @@ $(document).on("click","input[name=brandLevel]",function(){ |
|
|
})
|
|
|
//选择使用模板
|
|
|
$(document).on("change","#templateSelect",function(){
|
|
|
jsonMain.templateName = $(this).val();
|
|
|
jsonMain.templateType = $(this).val();
|
|
|
$(this).removeClass("error");
|
|
|
})
|
|
|
//暂存模板
|
|
|
$(document).on("click","#saveModule",function(){
|
|
|
if(jsonMain.templateName == "0"){
|
|
|
common.util.__tip("请选择展示使用模板!");
|
|
|
return;
|
|
|
}
|
|
|
saveDecoration(100);
|
|
|
})
|
|
|
//提交审核
|
|
|
$(document).on("click","#submitModule",function(){
|
|
|
if(jsonMain.templateName == "0"){
|
|
|
if(jsonMain.templateType == "0"){
|
|
|
common.util.__tip("请选择展示使用模板!");
|
|
|
$("#templateSelect").focus().addClass("error");
|
|
|
return;
|
|
|
}
|
|
|
saveDecoration(200);
|
...
|
...
|
@@ -1181,12 +1367,27 @@ $(document).on("click",".addBtn",function(){ |
|
|
|
|
|
if(indexList.length > 1){
|
|
|
g.__rows[indexList[0]].data.push($.extend({},ENUM[curDialogId]));
|
|
|
if(curDialogId == "editor-largePic" || curDialogId == "editor-smallPic" || curDialogId == "editor-signboard"){
|
|
|
(g.__rows[indexList[0]].data)[(parseInt(indexList[1]) + 1)].startTime = (g.__rows[indexList[0]].data)[indexList[1]].endTime;
|
|
|
}
|
|
|
}else{
|
|
|
g.__rows.push($.extend({},ENUM[curDialogId]));
|
|
|
}
|
|
|
g.init(g.__rows);
|
|
|
untilEditorEvent(curDialogId);
|
|
|
});
|
|
|
//资源位大图,水牌添加一条资源位
|
|
|
$(document).on("click",".addBtn2",function(){
|
|
|
if( curDialogId == "editor-largePic" && g.__rows.length > 4){
|
|
|
$(".largePicAddTip").text("* 最多只能添加5个资源位大图!").css("color","#ff0000");
|
|
|
return;
|
|
|
}else{
|
|
|
$(".largePicAddTip").empty();
|
|
|
g.__rows.push($.extend(true,{},ENUM["editor-largePic2"]));
|
|
|
g.init(g.__rows);
|
|
|
untilEditorEvent(curDialogId);
|
|
|
}
|
|
|
});
|
|
|
//input change同时更新json
|
|
|
$(document).on("change",".inputChange",function(){
|
|
|
var _index = $(this).attr("data-index");
|
...
|
...
|
@@ -1198,6 +1399,23 @@ $(document).on("change",".inputChange",function(){ |
|
|
}else{
|
|
|
g.__rows[indexList[0]][_name] = $(this).val();
|
|
|
}
|
|
|
if(curDialogId == "editor-largePic" || curDialogId == "editor-smallPic" || curDialogId == "editor-signboard"){
|
|
|
if($(this).attr("name") == "endTime"){
|
|
|
if(g.__rows[indexList[0]].data.length - 1 > indexList[1]){
|
|
|
(g.__rows[indexList[0]].data)[(parseInt(indexList[1]) + 1)].startTime = $(this).val();
|
|
|
$(this).parents(".row").next().children().find("input[name='startTime']").val($(this).val());
|
|
|
|
|
|
var endDate = $(this).parents(".row").next().children().find("input[name='endTime']").val();
|
|
|
$(this).parents(".row").next().children().find(".publishStatus").html(checkdate($(this).val(),endDate));
|
|
|
}
|
|
|
var startDate = $(this).parents(".row").find("input[name='startTime']").val();
|
|
|
$(this).parents(".row").find(".publishStatus").html(checkdate(startDate,$(this).val()));
|
|
|
}
|
|
|
if($(this).attr("name") == "startTime"){
|
|
|
var endDate = $(this).parents(".row").find("input[name='endTime']").val();
|
|
|
$(this).parents(".row").find(".publishStatus").html(checkdate($(this).val(),endDate));
|
|
|
}
|
|
|
}
|
|
|
$(this).removeClass("error");
|
|
|
});
|
|
|
//checkBox change同时更新json
|
...
|
...
|
@@ -1219,12 +1437,13 @@ $(document).on("click",".topAdd",function(){ |
|
|
item.src = $(this).find('img').attr("src");
|
|
|
item.productId = $(this).attr("data-productId");
|
|
|
item.productName = $(this).attr("data-productName");
|
|
|
item.productPrice = $(this).attr("data-productPrice");
|
|
|
item.salesPrice = $(this).attr("data-productPrice");
|
|
|
item.productSkn = $(this).attr("data-productSkn");
|
|
|
|
|
|
g.__rows.push(item);
|
|
|
g.init(g.__rows);
|
|
|
untilEditorEvent(curDialogId);
|
|
|
|
|
|
productTopDataLink(g.__rows);
|
|
|
$(".topTip span").text("已经勾选"+ g.__rows.length +"件,最多勾选8件商品!");
|
|
|
}
|
|
|
}else{
|
...
|
...
|
|