|
|
var $ = require('jquery'),
|
|
|
common = require('../common/common');
|
|
|
// module;
|
|
|
var ENUM = {};
|
|
|
// common.util.__ajax({
|
|
|
// url:'/guang/article/getEnumList',
|
|
|
// async:false
|
|
|
// },function(res){
|
|
|
// ENUM=res.data;
|
|
|
// });
|
|
|
console.log(ENUM);
|
|
|
|
|
|
|
|
|
/*获取数据ViewModel*/
|
|
|
var ViewModel = {};
|
|
|
var param = location.href.slice(location.href.indexOf("contentEdit")).match(/\/\d+/g);
|
|
|
if(param&¶m.length==1){
|
|
|
param[0]=param[0].replace(/\//,'');
|
|
|
common.util.__ajax({
|
|
|
url:'/guang/article/getArticleDetail',
|
|
|
data:{
|
|
|
id:param[0]
|
|
|
},
|
|
|
async:false
|
|
|
},function(res){
|
|
|
console.log(res.data);
|
|
|
ViewModel=res.data;
|
|
|
});
|
|
|
}
|
|
|
|
|
|
console.log("ViewModel",ViewModel);
|
|
|
|
|
|
var edit = new common.edit(".modal-body", {
|
|
|
bucket: "goodsimg"
|
...
|
...
|
@@ -103,7 +114,7 @@ var Bll = { |
|
|
$(selecter).html(common.util.__template2($("#" + templater).html(), data));
|
|
|
},
|
|
|
Tags: []
|
|
|
}
|
|
|
}
|
|
|
//获取品牌
|
|
|
Bll.getBrands();
|
|
|
|
...
|
...
|
@@ -113,7 +124,7 @@ $(document).on('click', '.brand-index', function() { |
|
|
});
|
|
|
|
|
|
/*渲染页面*/
|
|
|
$("#panel-body").html(common.util.__template2($("#tempalte1").html(), ENUM));
|
|
|
$("#panel-body").html(common.util.__template2($("#tempalte1").html(), ViewModel));
|
|
|
/*渲染品牌*/
|
|
|
// Bll.Brdata=ENUM.brands;
|
|
|
// Bll.renderBrandPic(Bll.Brdata);
|
...
|
...
|
|