|
@@ -1,58 +1,98 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <view class="default_page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
|
|
|
|
|
|
|
+ <view class="default_page adffc" :style="{'height':h+'px', 'padding-top':mt+'px'}">
|
|
|
<cus-header title='推荐记录'></cus-header>
|
|
<cus-header title='推荐记录'></cus-header>
|
|
|
<view class="top adfac" @click="show=true">
|
|
<view class="top adfac" @click="show=true">
|
|
|
<text>{{typeText}}</text>
|
|
<text>{{typeText}}</text>
|
|
|
<image :src="imgBase+'icon_down.png'"></image>
|
|
<image :src="imgBase+'icon_down.png'"></image>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="list">
|
|
|
|
|
- <view class="list-item adfacjb" v-for="(item,index) in list" :key="index">
|
|
|
|
|
- <view class="list-item-left adfac">
|
|
|
|
|
- <image :src="imgCfg[item.type]"></image>
|
|
|
|
|
- <view class="name adffc">
|
|
|
|
|
- <p>{{item.name}}</p>
|
|
|
|
|
- <text>来源:{{typeCfg[item.type]}}</text>
|
|
|
|
|
|
|
+ <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">
|
|
|
|
|
+ <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>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="list-item-right">{{item.createDate||''}}</view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
- <view class="list-item-right">{{item.datetime}}</view>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ </up-list-item>
|
|
|
|
|
+ </up-list>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view style="height: 100%;" v-else>
|
|
|
|
|
+ <page-empty text="暂无推荐记录"></page-empty>
|
|
|
</view>
|
|
</view>
|
|
|
<u-picker :itemHeight="88" :immediateChange="true" :show="show" :columns="typeData" title="渠道类型"
|
|
<u-picker :itemHeight="88" :immediateChange="true" :show="show" :columns="typeData" title="渠道类型"
|
|
|
- @cancel="show=false" @confirm="confirm"></u-picker>
|
|
|
|
|
|
|
+ @cancel="show=false" @confirm="confirm" keyName="name"></u-picker>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+ import PageEmpty from '@/components/pageEmpty/index.vue'
|
|
|
export default {
|
|
export default {
|
|
|
|
|
+ components:{ PageEmpty },
|
|
|
data(){
|
|
data(){
|
|
|
return {
|
|
return {
|
|
|
show:false,
|
|
show:false,
|
|
|
typeText:'全部渠道',
|
|
typeText:'全部渠道',
|
|
|
- typeData:[['全部渠道','问卷任务','推荐转发','创衡运营邀请渠道1','创衡运营邀请渠道2']],
|
|
|
|
|
|
|
+ typeData:[],
|
|
|
|
|
+ defaultImg:this.$imgBase+'recommend_zf.png',
|
|
|
imgCfg:{
|
|
imgCfg:{
|
|
|
- 1:this.$imgBase+'recommend_wj.png',
|
|
|
|
|
- 2:this.$imgBase+'recommend_zf.png',
|
|
|
|
|
- 3:this.$imgBase+'recommend_yy1.png',
|
|
|
|
|
- 4:this.$imgBase+'recommend_yy2.png'
|
|
|
|
|
|
|
+ 'Questionnaire':this.$imgBase+'recommend_wj.png',
|
|
|
|
|
+ 'Forward':this.$imgBase+'recommend_zf.png',
|
|
|
|
|
+ 'scan':this.$imgBase+'recommend_yy1.png',
|
|
|
|
|
+ 'common':this.$imgBase+'recommend_yy2.png'
|
|
|
},
|
|
},
|
|
|
- typeCfg:{
|
|
|
|
|
- 1:'问卷任务',
|
|
|
|
|
- 2:'推荐转发',
|
|
|
|
|
- 3:'创衡运营邀请渠道1',
|
|
|
|
|
- 4:'创衡运营邀请渠道2'
|
|
|
|
|
|
|
+ queryParams:{
|
|
|
|
|
+ page:1,
|
|
|
|
|
+ limit:10,
|
|
|
|
|
+ channelType:'',
|
|
|
|
|
+ referrerId:''
|
|
|
},
|
|
},
|
|
|
- list:[
|
|
|
|
|
- {name:'李依然',type:1,datetime:'2025-10-10 06:00'},
|
|
|
|
|
- {name:'张三',type:2,datetime:'2025-10-10 06:00'},
|
|
|
|
|
- {name:'李四',type:3,datetime:'2025-10-10 06:00'},
|
|
|
|
|
- {name:'龙傲天',type:4,datetime:'2025-10-10 06:00'},
|
|
|
|
|
- ]
|
|
|
|
|
|
|
+ isOver:false,
|
|
|
|
|
+ list:[]
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ onLoad() {
|
|
|
|
|
+ this.queryParams.referrerId = uni.getStorageSync('userInfo')&&JSON.parse(uni.getStorageSync('userInfo')).id||'';
|
|
|
|
|
+ this.getChannelData();
|
|
|
|
|
+ this.getList();
|
|
|
|
|
+ },
|
|
|
methods:{
|
|
methods:{
|
|
|
|
|
+ getChannelData(){
|
|
|
|
|
+ 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}))];
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ scrolltolower(){
|
|
|
|
|
+ if(this.isOver) return
|
|
|
|
|
+ this.getList();
|
|
|
|
|
+ },
|
|
|
|
|
+ initList(){
|
|
|
|
|
+ this.queryParams.page = 1;
|
|
|
|
|
+ this.isOver = false;
|
|
|
|
|
+ this.list = [];
|
|
|
|
|
+ },
|
|
|
|
|
+ getList(){
|
|
|
|
|
+ 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;
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
confirm(e){
|
|
confirm(e){
|
|
|
- this.typeText = e.value[0];
|
|
|
|
|
|
|
+ this.typeText = e.value[0].name;
|
|
|
|
|
+ this.queryParams.channelType = e.value[0].id;
|
|
|
this.show = false;
|
|
this.show = false;
|
|
|
|
|
+ this.initList();
|
|
|
|
|
+ this.getList();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|