|
@@ -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) => {
|