Authored by unknown

店铺越权控制

... ... @@ -21,6 +21,7 @@ module.exports = {
params: [
{name: "shopId", type: "Number"},
{name: "platform", type: "Number"},
{name: 'platformType', type: 'Number'},
{name: "appType", type: "Number"},
{name: "templateName", type: "String"},
{name: "templateType", type: "String"},
... ... @@ -66,6 +67,7 @@ module.exports = {
{name: "templateId", type: "Number"},
{name: "shopId", type: "Number"},
{name: "platform", type: "Number"},
{name: 'platformType', type: 'Number'},
{name: "appType", type: "Number"},
{name: "templateName", type: "String"},
{name: "modules", type: "String"}
... ...
... ... @@ -30,6 +30,7 @@
{name: 'shopsId', type: 'Number'},
{name: 'submitStatus', type: 'Number'},
{name: 'platform', type: 'String'},
{name: 'platformType', type: 'Number'},
{name: 'templateType', type: 'String'},
{name: 'resources', type: 'String'}
]
... ...
... ... @@ -380,10 +380,15 @@ function saveDecoration(submitStatus){
"submitStatus": submitStatus,
"shopsId": jsonMain.shopsId,
"platform": jsonMain.platform,
"platformType": 2,
"templateType": jsonMain.templateType,
"resources": JSON.stringify(jsonMain.resources)
}
},function(rs){
if(rs.data == 500){
common.util.__tip(rs.message);
return;
}
if(rs.data){
if(submitStatus == 100){
jsonMain = rs.data;
... ...
... ... @@ -1875,6 +1875,7 @@ var saveTemplate = function(flag, name, cb) {
data: {
shopId: Bll.shopId,
platform: +t.active ? 0 : 1,
platformType: 2,
appType: Bll.appType,
templateName: name,
templateType: Bll.templateType,
... ... @@ -1882,6 +1883,10 @@ var saveTemplate = function(flag, name, cb) {
flag: flag
}
}, function(res) {
if(res.data == 500){
common.util.__tip(res.message);
return;
}
if(res && res.code == 200) {
// 重载模板列表
Bll.getTemplates();
... ... @@ -1973,9 +1978,14 @@ $(document).on('click', '#updateBtn', function() {
data: {
templateId: templateId,
shopId: Bll.shopId,
platformType: 2,
modules: JSON.stringify(Bll.moduleDataList)
}
}, function(resp) {
if(resp.data == 500){
common.util.__tip(resp.message);
return;
}
if(resp.code === 200) {
// 将变化监控值置为0,无需重新刷新模板列表
Bll.changedModuleMonitor = 0;
... ...