Authored by 李奇

资源位服务修改

@@ -10,13 +10,15 @@ const commonController = { @@ -10,13 +10,15 @@ const commonController = {
10 const {contentCode} = req.query; 10 const {contentCode} = req.query;
11 11
12 try { 12 try {
13 - let list = await req.ctx(Common).resource(contentCode); 13 + let result = await req.ctx(Common).resource(contentCode);
14 14
15 - res.json({  
16 - code: 200,  
17 - data: list,  
18 - message: '获取成功'  
19 - }); 15 + if (result.code === 200) {
  16 + return res.json({
  17 + code: 200,
  18 + data: result.data,
  19 + message: '获取成功'
  20 + });
  21 + }
20 } catch (e) { 22 } catch (e) {
21 next(); 23 next();
22 } 24 }
@@ -14,7 +14,7 @@ class Common extends global.yoho.BaseModel { @@ -14,7 +14,7 @@ class Common extends global.yoho.BaseModel {
14 url: 'operations/api/v5/resource/get', 14 url: 'operations/api/v5/resource/get',
15 data: { 15 data: {
16 content_code: code, 16 content_code: code,
17 - platform: 'app' 17 + platform: 'platform'
18 }, 18 },
19 api: global.yoho.ServiceAPI 19 api: global.yoho.ServiceAPI
20 }); 20 });
@@ -19,16 +19,16 @@ module.exports = { @@ -19,16 +19,16 @@ module.exports = {
19 19
20 // yohoVerifyUdid: '0f626ede-0e17-460b-a8ea-069ee506e8e9', 20 // yohoVerifyUdid: '0f626ede-0e17-460b-a8ea-069ee506e8e9',
21 domains: { 21 domains: {
22 - // api: 'http://api-test3.yohops.com:9999/',  
23 - // service: 'http://service-test3.yohops.com:9999/',  
24 - // singleApi: 'http://api-test3.yohops.com:9999/' 22 + api: 'http://api-test3.dev.yohocorp.com/',
  23 + service: 'http://api-test3.dev.yohocorp.com/',
  24 + singleApi: 'http://api-test3.dev.yohocorp.com/',
25 25
26 - singleApi: 'http://api.yoho.cn/',  
27 - api: 'http://api.yoho.cn/',  
28 - store: 'http://192.168.102.47:8080/portal-gateway/wechat/',  
29 - service: 'http://service.yoho.cn/',  
30 - serviceNotify: 'http://service.yoho.cn/',  
31 - platformApi: 'http://172.16.6.210:8088/', 26 + // singleApi: 'http://api.yoho.cn/',
  27 + // api: 'http://api.yoho.cn/',
  28 + // store: 'http://192.168.102.47:8080/portal-gateway/wechat/',
  29 + // service: 'http://service.yoho.cn/',
  30 + // serviceNotify: 'http://service.yoho.cn/',
  31 + // platformApi: 'http://172.16.6.210:8088/',
32 }, 32 },
33 from: { 33 from: {
34 action: { 34 action: {