Merge branch 'hotfix/error' into 'release/6.4'
'修复频道页undifined' See merge request !1196
Showing
2 changed files
with
2 additions
and
2 deletions
@@ -89,7 +89,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -89,7 +89,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
89 | list = list || []; | 89 | list = list || []; |
90 | 90 | ||
91 | _.forEach(list, (item, i) => { | 91 | _.forEach(list, (item, i) => { |
92 | - if (item.sub) { | 92 | + if (_.isArray(item.sub)) { |
93 | item.sub.unshift({ | 93 | item.sub.unshift({ |
94 | sort_name: item.sort_name, | 94 | sort_name: item.sort_name, |
95 | sort_name_en: item.sort_name_en, | 95 | sort_name_en: item.sort_name_en, |
@@ -153,7 +153,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -153,7 +153,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
153 | return this.get({ | 153 | return this.get({ |
154 | data: { | 154 | data: { |
155 | method: 'app.brand.newBrandList', | 155 | method: 'app.brand.newBrandList', |
156 | - yh_channel: yhChannel[channel].channel, | 156 | + yh_channel: _.get(yhChannel, `${channel}.channel`, '1'), |
157 | app_type: 1 | 157 | app_type: 1 |
158 | }, | 158 | }, |
159 | params: { | 159 | params: { |
-
Please register or login to post a comment