Merge branch 'hotfix/expandNew2' into 'master'
空uid 空值 See merge request !802
Showing
2 changed files
with
12 additions
and
7 deletions
@@ -25,7 +25,8 @@ module.exports = class extends global.yoho.BaseModel { | @@ -25,7 +25,8 @@ module.exports = class extends global.yoho.BaseModel { | ||
25 | 25 | ||
26 | result.data.isApp = isApp; | 26 | result.data.isApp = isApp; |
27 | 27 | ||
28 | - result.data.copyUrl = result.data.shareUrl.replace(/"/g, '"').replace(/=/g, ':'); | 28 | + result.data.copyUrl = result.data.shareUrl ? |
29 | + result.data.shareUrl.replace(/"/g, '"').replace(/=/g, ':') : ''; | ||
29 | 30 | ||
30 | return result.data; | 31 | return result.data; |
31 | } else { | 32 | } else { |
@@ -115,12 +115,16 @@ const _getRes = () => { | @@ -115,12 +115,16 @@ const _getRes = () => { | ||
115 | 115 | ||
116 | // 潮流口令 | 116 | // 潮流口令 |
117 | const _getCode = (uid) => { | 117 | const _getCode = (uid) => { |
118 | - return api.get('', { | ||
119 | - method: 'app.invitecode.my', | ||
120 | - uid: uid | ||
121 | - }, { | ||
122 | - code: 200 | ||
123 | - }); | 118 | + if (uid) { |
119 | + return api.get('', { | ||
120 | + method: 'app.invitecode.my', | ||
121 | + uid: uid | ||
122 | + }, { | ||
123 | + code: 200 | ||
124 | + }); | ||
125 | + } else { | ||
126 | + return Promise.resolve({}); | ||
127 | + } | ||
124 | }; | 128 | }; |
125 | 129 | ||
126 | const _getTrendPop = (contentCode) => { | 130 | const _getTrendPop = (contentCode) => { |
-
Please register or login to post a comment