Authored by weiqingting

提交

... ... @@ -140,10 +140,13 @@ Bll.Tags=ViewModel.tag?ViewModel.tag.split(','):[];
Bll.__render("#taglist","template4",{tags:Bll.Tags});
/*内容渲染->对象转数组*/
// Bll.contentDatas=ENUM.articleContent;
ViewModel.contentData.forEach(function(item,index){
item.contentData=common.util.__ObjToArray(JSON.parse(item.contentData));
Bll.contentDatas.push(item);
});
if(ViewModel.articleContent){
ViewModel.articleContent.forEach(function(item,index){
item.contentData=common.util.__ObjToArray(JSON.parse(item.contentData));
Bll.contentDatas.push(item);
});
}
new common.dropDown({
... ... @@ -327,10 +330,10 @@ $(document).on("change", ".observe", function() {
var name = $this.data("field");
// index = $this.data("index");
// var module = (index == undefined) ? Bll.module.data : Bll.module.data[index];
Bll.module.data=common.util.__buildobj(name, '.', Bll.module.data, function(obj, name) {
Bll.module.contentData.data=common.util.__buildobj(name, '.', Bll.module.contentData.data, function(obj, name) {
obj[name] = $this.val();
});
console.log("module",Bll.module.data);
console.log("module",Bll.module.contentData.data);
});
$(document).on("click", ".edit", function() {
... ... @@ -415,7 +418,7 @@ $(document).on("click", "#goodsSelectBtn", function () {
});
// Bll.module.data=goodsgird.selected;
Bll.__render("#goodspic", "template_dialog_goodsimgs", {
datas: Bll.module.data
datas: Bll.module.contentData.data
});
},
css: "btn-primary"
... ...
... ... @@ -264,7 +264,7 @@
<!-- 文本内容 -->
[[each modules as module index]]
<li class="custom-group" data-index="[[index]]">
[[if module.template_name=='text']]
[[if module.contentData.template_name=='text']]
<div class="con">[[module.data.text]]</div>
[[else if module.template_name=='singleImage']]
<div class="list">
... ...