Authored by zhangxiaoru

online

@@ -17,10 +17,12 @@ const _ = require('lodash'); @@ -17,10 +17,12 @@ const _ = require('lodash');
17 * 个人详情数据 17 * 个人详情数据
18 */ 18 */
19 const _userData = (params) => { 19 const _userData = (params) => {
  20 + if (params.uid) {
20 return api.get('', { 21 return api.get('', {
21 method: 'app.passport.profile', 22 method: 'app.passport.profile',
22 uid: params.uid 23 uid: params.uid
23 }, {code: 200}); 24 }, {code: 200});
  25 + }
24 }; 26 };
25 27
26 /** 28 /**
@@ -38,21 +40,25 @@ const _noticeData = () => { @@ -38,21 +40,25 @@ const _noticeData = () => {
38 * @returns {*|Promise.<TResult>} 40 * @returns {*|Promise.<TResult>}
39 */ 41 */
40 const _favoriteData = (params) => { 42 const _favoriteData = (params) => {
  43 + if (params.uid) {
41 return singleAPI.get('brower', { 44 return singleAPI.get('brower', {
42 method: 'app.favorite.getFavoriteCount', 45 method: 'app.favorite.getFavoriteCount',
43 uid: params.uid 46 uid: params.uid
44 }, {code: 200}); 47 }, {code: 200});
  48 + }
45 }; 49 };
46 50
47 /** 51 /**
48 * 个人中心页面优惠券,收藏的商品等的数目数据 52 * 个人中心页面优惠券,收藏的商品等的数目数据
49 */ 53 */
50 const _infoNum = (params) => { 54 const _infoNum = (params) => {
  55 + if (params.uid) {
51 return api.get('', { 56 return api.get('', {
52 method: 'app.home.getInfoNum', 57 method: 'app.home.getInfoNum',
53 uid: params.uid, 58 uid: params.uid,
54 udid: params.udid 59 udid: params.udid
55 }, {code: 200}); 60 }, {code: 200});
  61 + }
56 }; 62 };
57 63
58 /** 64 /**
@@ -227,11 +233,13 @@ const getGradeGrade = (channel, uid) => { @@ -227,11 +233,13 @@ const getGradeGrade = (channel, uid) => {
227 }; 233 };
228 234
229 const getGradeUser = (channel, uid) => { 235 const getGradeUser = (channel, uid) => {
  236 + if (uid) {
230 return api.get('', { 237 return api.get('', {
231 method: 'app.passport.profile', 238 method: 'app.passport.profile',
232 uid: uid, 239 uid: uid,
233 channel: channel || 1 240 channel: channel || 1
234 }, {code: 200}); 241 }, {code: 200});
  242 + }
235 }; 243 };
236 244
237 const getGrade = (channel, uid) => { 245 const getGrade = (channel, uid) => {
@@ -15,19 +15,13 @@ module.exports = { @@ -15,19 +15,13 @@ module.exports = {
15 port: 6001, 15 port: 6001,
16 siteUrl: '//m.yohobuy.com', 16 siteUrl: '//m.yohobuy.com',
17 domains: { 17 domains: {
18 - // api: 'http://devapi.yoho.cn:58078/',  
19 - // service: 'http://devservice.yoho.cn:58077/',  
20 -  
21 // api: 'http://api.yoho.cn/', 18 // api: 'http://api.yoho.cn/',
22 // service: 'http://service.yoho.cn/', 19 // service: 'http://service.yoho.cn/',
23 -  
24 - // api: 'http://testapi.yoho.cn:28078/',  
25 - // service: 'http://testservice.yoho.cn:28077/', 20 + // singleApi: 'http://single.yoho.cn/',
26 21
27 api: 'http://api-test1.yohops.com:9999/', 22 api: 'http://api-test1.yohops.com:9999/',
28 service: 'http://service-test1.yohops.com:9999/', 23 service: 'http://service-test1.yohops.com:9999/',
29 -  
30 - singleApi: 'http://192.168.102.31:8092/' 24 + singleApi: 'http://api-test1.yohops.com:9999/'
31 }, 25 },
32 subDomains: { 26 subDomains: {
33 host: '.m.yohobuy.com', 27 host: '.m.yohobuy.com',
@@ -34,6 +34,7 @@ @@ -34,6 +34,7 @@
34 "bluebird": "^3.4.1", 34 "bluebird": "^3.4.1",
35 "body-parser": "^1.15.2", 35 "body-parser": "^1.15.2",
36 "connect-memcached": "^0.2.0", 36 "connect-memcached": "^0.2.0",
  37 + "connect-multiparty": "^2.0.0",
37 "cookie-parser": "^1.4.3", 38 "cookie-parser": "^1.4.3",
38 "express": "^4.14.0", 39 "express": "^4.14.0",
39 "express-handlebars": "^3.0.0", 40 "express-handlebars": "^3.0.0",