htc 3 дней назад
Родитель
Сommit
e2fb45554e
1 измененных файлов с 5 добавлено и 7 удалено
  1. 5 7
      pagesMy/recommendHistory.vue

+ 5 - 7
pagesMy/recommendHistory.vue

@@ -7,13 +7,13 @@
 		</view>
 		<view class="list" v-if="list.length">
 			<up-list @scrolltolower="scrolltolower" style="height: 100%">
-				<up-list-item class="list-item" v-for="(item, index) in list" :key="index">
-					<view class="adfacjb">
+				<up-list-item v-for="(item, index) in list" :key="index">
+					<view class="list-item adfacjb">
 						<view class="list-item-left adfac">
 							<image :src="imgCfg[item.channelType]||defaultImg"></image>
 							<view class="name adffc">
 								<p>{{item.realName}}</p>
-								<text>来源:{{item.channelTypeText||''}}</text>
+								<text>来源:{{item.channelName||''}}</text>
 							</view>
 						</view>
 						<view class="list-item-right">{{item.createDate||''}}</view>
@@ -55,7 +55,7 @@
 				list:[]
 			}
 		},
-		onLoad() {
+		async onLoad() {
 			this.queryParams.referrerId = uni.getStorageSync('userInfo')&&JSON.parse(uni.getStorageSync('userInfo')).id||'';
 			this.getChannelData();
 			this.getList();
@@ -65,6 +65,7 @@
 				this.$api.get('/getListByType/channel_type').then(({data:res})=>{
 					if(res.code!==0) return this.$showToast(res.msg)
 					this.typeData = [res.data.map(d=>({name:d.dictLabel,id:d.dictValue}))];
+					resolve()
 				})
 			},
 			scrolltolower(){
@@ -80,9 +81,6 @@
 				this.$api.get('/core/register/record/page',this.queryParams).then(({data:res})=>{
 					if(res.code!==0) return this.$showToast(res.msg)
 					this.list = [...this.list,...res.data.list];
-					this.list.forEach(l=>{
-						l.channelTypeText = this.typeData.find(t=>t.id===l.channelType).name||'';
-					})
 					this.queryParams.page++;
 					if(res.data.list.length===0) this.isOver = true;
 				})