...
|
...
|
@@ -66,6 +66,7 @@ var Bll = { |
|
|
a.brandIco = common.util.__joinImg("brandLogo", a.brand_ico)
|
|
|
Brands2.push(a);
|
|
|
}else{
|
|
|
item.brandIco=common.util.__template(item.brandIco,{width:110,height:150});
|
|
|
Brands2.push(item);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -135,10 +136,14 @@ Bll.__render("#panel-body","tempalte1",ViewModel); |
|
|
Bll.Brdata=ViewModel.brandList||[];
|
|
|
Bll.renderBrandPic(Bll.Brdata);
|
|
|
/*渲染标签*/
|
|
|
Bll.Tags=(ViewModel.tag||"").split(',');
|
|
|
Bll.Tags=ViewModel.tag?ViewModel.tag.split(','):[];
|
|
|
Bll.__render("#taglist","template4",{tags:Bll.Tags});
|
|
|
/*内容渲染->对象转数组*/
|
|
|
// Bll.contentDatas=ENUM.contentData;
|
|
|
// Bll.contentDatas=ENUM.articleContent;
|
|
|
ViewModel.contentData.forEach(function(item,index){
|
|
|
item.contentData=common.util.__ObjToArray(JSON.parse(item.contentData));
|
|
|
Bll.contentDatas.push(item);
|
|
|
});
|
|
|
|
|
|
|
|
|
new common.dropDown({
|
...
|
...
|
@@ -308,8 +313,9 @@ $("#content_btns").html(common.util.__template2($("#template_content_btns").html |
|
|
|
|
|
$(document).on("click", ".add_btn", function() {
|
|
|
var item = Button[$(this).data("index")];
|
|
|
Bll.module = $.extend(true, {}, item);
|
|
|
Bll.toast(-1, Bll.module);
|
|
|
Bll.module={};
|
|
|
Bll.module.contentData = $.extend(true, {}, item);
|
|
|
Bll.toast(-1, Bll.module);
|
|
|
});
|
|
|
$(document).on("click", ".del", function() {
|
|
|
Bll.contentDatas.splice($(this).data("index"), 1);
|
...
|
...
|
@@ -365,7 +371,7 @@ var goodsgird = new common.grid({ |
|
|
else {
|
|
|
item.images_url = "";
|
|
|
}
|
|
|
return "<img width=120 height=60 src='" + item.images_url + "'/>";
|
|
|
return "<img width=120 height=60 src='" + item.images_url + "?imageView/2/w/100/h/100'/>";
|
|
|
}
|
|
|
}, {
|
|
|
display: "产品名称",
|
...
|
...
|
@@ -490,7 +496,9 @@ $(document).on("click", "#submit", function() { |
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
console.log("Bll.contentDatas", Bll.Brdata);
|
|
|
|
|
|
option.data.contentData = JSON.stringify(option.data.contentData);
|
|
|
option.data.brands = JSON.stringify(Bll.Brdata);
|
|
|
option.data.tag = Bll.Tags.join(',');
|
...
|
...
|
@@ -514,12 +522,3 @@ $(document).on("click", "#submit", function() { |
|
|
/*交互部分*/
|
|
|
|
|
|
|
|
|
/*测试*/
|
|
|
var AAA={};
|
|
|
AAA=common.util.__buildobj("0.b",".",AAA,function(obj,name){
|
|
|
obj[name]="1";
|
|
|
});
|
|
|
AAA=common.util.__buildobj("1.b",".",AAA,function(obj,name){
|
|
|
obj[name]="1";
|
|
|
});
|
|
|
console.log(AAA); |
|
|
\ No newline at end of file |
...
|
...
|
|