|
@@ -156,7 +156,8 @@ export default {
|
|
|
this.state.loading = false
|
|
|
this.params.page++
|
|
|
const _list = this.isSupertube ? data.list : convertCompanylist(data.list)
|
|
|
- this.$store.commit('user/setCompanylist', [...this.companylist, ..._list])
|
|
|
+ const __list = this.isSupertube && this.currentLevel === '1' ? _list.map(item => ({ ...item, code: item.relation_code })) : _list
|
|
|
+ this.$store.commit('user/setCompanylist', [...this.companylist, ...__list])
|
|
|
return this.isSupertube ? data.list : convertCompanylist(data.list)
|
|
|
},
|
|
|
|
|
@@ -239,8 +240,9 @@ export default {
|
|
|
if (height + scrollTop >= scrollHeight && isAllowLoad) {
|
|
|
const list = await this.loadMore()
|
|
|
const _list = this.isSupertube ? list : convertCompanylist(list)
|
|
|
+ const __list = this.isSupertube && this.currentLevel === '1' ? _list.map(item => ({ ...item, code: item.relation_code })) : _list
|
|
|
// 保存到全局
|
|
|
- this.$store.commit(userStoreActions.setCompanyList, [...this.companylist, ..._list])
|
|
|
+ this.$store.commit(userStoreActions.setCompanyList, [...this.companylist, ...__list])
|
|
|
}
|
|
|
},
|
|
|
|