Authored by 陈峰

权限

... ... @@ -8,7 +8,9 @@ const userService = {
});
},
purviews() {
return axios.post('/erp/getPurview').then(res => {
return axios.post('/erp/getPurview', {
platform_id: 4
}).then(res => {
return {ori: res.data.data, deep: this.deepList(res.data.data)};
});
},
... ...
... ... @@ -53,7 +53,7 @@ module.exports = (req, res, next) => {
founder: req.session.LOGIN_UID,
shopId: currentShop.shopsId,
supplierId: currentShop.shopsBrands.length ? _.first(currentShop.shopsBrands).supplierId : 0,
platform_id: 2
platform_id: config.platform
};
} else if (channel === 'platform') {
baseParams = {
... ... @@ -62,7 +62,7 @@ module.exports = (req, res, next) => {
userId: req.session.LOGIN_UID
};
}
let params = Object.assign(req.query, req.body, baseParams);
let params = Object.assign(baseParams, req.query, req.body);
return api.proxy(apiUrl, params, {
method: req.method.toLowerCase(),
... ...
... ... @@ -61,7 +61,8 @@ class UserService extends Context {
getShops(pid) {
return this.api.get(config.apiDomain.platform.queryShopsByAdminPid, {
userId: pid
userId: pid,
platform: 4
}).then(result => {
return result;
});
... ...