Authored by zhangxiaoru

online

... ... @@ -17,10 +17,12 @@ const _ = require('lodash');
* 个人详情数据
*/
const _userData = (params) => {
return api.get('', {
method: 'app.passport.profile',
uid: params.uid
}, {code: 200});
if (params.uid) {
return api.get('', {
method: 'app.passport.profile',
uid: params.uid
}, {code: 200});
}
};
/**
... ... @@ -38,21 +40,25 @@ const _noticeData = () => {
* @returns {*|Promise.<TResult>}
*/
const _favoriteData = (params) => {
return singleAPI.get('brower', {
method: 'app.favorite.getFavoriteCount',
uid: params.uid
}, {code: 200});
if (params.uid) {
return singleAPI.get('brower', {
method: 'app.favorite.getFavoriteCount',
uid: params.uid
}, {code: 200});
}
};
/**
* 个人中心页面优惠券,收藏的商品等的数目数据
*/
const _infoNum = (params) => {
return api.get('', {
method: 'app.home.getInfoNum',
uid: params.uid,
udid: params.udid
}, {code: 200});
if (params.uid) {
return api.get('', {
method: 'app.home.getInfoNum',
uid: params.uid,
udid: params.udid
}, {code: 200});
}
};
/**
... ... @@ -227,11 +233,13 @@ const getGradeGrade = (channel, uid) => {
};
const getGradeUser = (channel, uid) => {
return api.get('', {
method: 'app.passport.profile',
uid: uid,
channel: channel || 1
}, {code: 200});
if (uid) {
return api.get('', {
method: 'app.passport.profile',
uid: uid,
channel: channel || 1
}, {code: 200});
}
};
const getGrade = (channel, uid) => {
... ...
... ... @@ -15,19 +15,13 @@ module.exports = {
port: 6001,
siteUrl: '//m.yohobuy.com',
domains: {
// api: 'http://devapi.yoho.cn:58078/',
// service: 'http://devservice.yoho.cn:58077/',
// api: 'http://api.yoho.cn/',
// service: 'http://service.yoho.cn/',
// api: 'http://testapi.yoho.cn:28078/',
// service: 'http://testservice.yoho.cn:28077/',
// singleApi: 'http://single.yoho.cn/',
api: 'http://api-test1.yohops.com:9999/',
service: 'http://service-test1.yohops.com:9999/',
singleApi: 'http://192.168.102.31:8092/'
singleApi: 'http://api-test1.yohops.com:9999/'
},
subDomains: {
host: '.m.yohobuy.com',
... ...
... ... @@ -34,6 +34,7 @@
"bluebird": "^3.4.1",
"body-parser": "^1.15.2",
"connect-memcached": "^0.2.0",
"connect-multiparty": "^2.0.0",
"cookie-parser": "^1.4.3",
"express": "^4.14.0",
"express-handlebars": "^3.0.0",
... ...