Showing
2 changed files
with
6 additions
and
1 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 | + if (uid) { | ||
118 | return api.get('', { | 119 | return api.get('', { |
119 | method: 'app.invitecode.my', | 120 | method: 'app.invitecode.my', |
120 | uid: uid | 121 | uid: uid |
121 | }, { | 122 | }, { |
122 | code: 200 | 123 | code: 200 |
123 | }); | 124 | }); |
125 | + } else { | ||
126 | + return {}; | ||
127 | + } | ||
124 | }; | 128 | }; |
125 | 129 | ||
126 | const _getTrendPop = (contentCode) => { | 130 | const _getTrendPop = (contentCode) => { |
-
Please register or login to post a comment