Showing
1 changed file
with
14 additions
and
2 deletions
@@ -9,13 +9,14 @@ | @@ -9,13 +9,14 @@ | ||
9 | 9 | ||
10 | // const logger = global.yoho.logger; | 10 | // const logger = global.yoho.logger; |
11 | const favApi = global.yoho.FavAPI; | 11 | const favApi = global.yoho.FavAPI; |
12 | +const api = global.yoho.API; | ||
12 | 13 | ||
13 | /** | 14 | /** |
14 | * 收藏数量接口 | 15 | * 收藏数量接口 |
15 | * @param params | 16 | * @param params |
16 | * @returns {*|Promise.<TResult>} | 17 | * @returns {*|Promise.<TResult>} |
17 | */ | 18 | */ |
18 | -const favorite = (params) => { | 19 | +const _favoriteData = (params) => { |
19 | return favApi.get('brower', { | 20 | return favApi.get('brower', { |
20 | method: 'app.favorite.getFavoriteCount', | 21 | method: 'app.favorite.getFavoriteCount', |
21 | uid: params.uid || '8039759' | 22 | uid: params.uid || '8039759' |
@@ -27,12 +28,23 @@ const favorite = (params) => { | @@ -27,12 +28,23 @@ const favorite = (params) => { | ||
27 | }; | 28 | }; |
28 | 29 | ||
29 | /** | 30 | /** |
31 | + * 获取个人中心公告有关数据 | ||
32 | + */ | ||
33 | +const _noticeData = () => { | ||
34 | + return api.get('', { | ||
35 | + method: 'app.resources.getNotices', | ||
36 | + }).then(result => { | ||
37 | + return result; | ||
38 | + }); | ||
39 | +}; | ||
40 | + | ||
41 | +/** | ||
30 | * 个人中心首页 | 42 | * 个人中心首页 |
31 | * @param params | 43 | * @param params |
32 | * @returns {function()} | 44 | * @returns {function()} |
33 | */ | 45 | */ |
34 | const index = (params) => { | 46 | const index = (params) => { |
35 | - return favorite; | 47 | + return _favoriteData; |
36 | }; | 48 | }; |
37 | 49 | ||
38 | module.exports = { | 50 | module.exports = { |
-
Please register or login to post a comment