|
@@ -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
|
- return api.get('', {
|
|
|
21
|
- method: 'app.passport.profile',
|
|
|
22
|
- uid: params.uid
|
|
|
23
|
- }, {code: 200});
|
20
|
+ if (params.uid) {
|
|
|
21
|
+ return api.get('', {
|
|
|
22
|
+ method: 'app.passport.profile',
|
|
|
23
|
+ uid: params.uid
|
|
|
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) => {
|
41
|
- return singleAPI.get('brower', {
|
|
|
42
|
- method: 'app.favorite.getFavoriteCount',
|
|
|
43
|
- uid: params.uid
|
|
|
44
|
- }, {code: 200});
|
43
|
+ if (params.uid) {
|
|
|
44
|
+ return singleAPI.get('brower', {
|
|
|
45
|
+ method: 'app.favorite.getFavoriteCount',
|
|
|
46
|
+ uid: params.uid
|
|
|
47
|
+ }, {code: 200});
|
|
|
48
|
+ }
|
45
|
};
|
49
|
};
|
46
|
|
50
|
|
47
|
/**
|
51
|
/**
|
48
|
* 个人中心页面优惠券,收藏的商品等的数目数据
|
52
|
* 个人中心页面优惠券,收藏的商品等的数目数据
|
49
|
*/
|
53
|
*/
|
50
|
const _infoNum = (params) => {
|
54
|
const _infoNum = (params) => {
|
51
|
- return api.get('', {
|
|
|
52
|
- method: 'app.home.getInfoNum',
|
|
|
53
|
- uid: params.uid,
|
|
|
54
|
- udid: params.udid
|
|
|
55
|
- }, {code: 200});
|
55
|
+ if (params.uid) {
|
|
|
56
|
+ return api.get('', {
|
|
|
57
|
+ method: 'app.home.getInfoNum',
|
|
|
58
|
+ uid: params.uid,
|
|
|
59
|
+ udid: params.udid
|
|
|
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) => {
|
230
|
- return api.get('', {
|
|
|
231
|
- method: 'app.passport.profile',
|
|
|
232
|
- uid: uid,
|
|
|
233
|
- channel: channel || 1
|
|
|
234
|
- }, {code: 200});
|
236
|
+ if (uid) {
|
|
|
237
|
+ return api.get('', {
|
|
|
238
|
+ method: 'app.passport.profile',
|
|
|
239
|
+ uid: uid,
|
|
|
240
|
+ channel: channel || 1
|
|
|
241
|
+ }, {code: 200});
|
|
|
242
|
+ }
|
235
|
};
|
243
|
};
|
236
|
|
244
|
|
237
|
const getGrade = (channel, uid) => {
|
245
|
const getGrade = (channel, uid) => {
|