Authored by 陈峰

权限

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