2021-08-19 06:40:59 +00:00
|
|
|
|
<template>
|
|
|
|
|
<view>
|
|
|
|
|
<!-- 状态栏 -->
|
|
|
|
|
<status-nav :titleVal="'用户足迹'" :statusTitle="true"></status-nav>
|
|
|
|
|
<!-- 自定义二级分类 -->
|
|
|
|
|
<!-- 列表 -->
|
|
|
|
|
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30">
|
|
|
|
|
<view class="radius20 fon28 col3 mar-sx20">
|
|
|
|
|
<view class="disac">
|
|
|
|
|
<view class="disjbac width100 radius10 pad-zy20 xialak bacf">
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<input class="fon28 width100" type="text" @confirm="searchEv" v-model="keyword" placeholder="请输入姓名/电话查找" placeholder-style="color: #B3B3B3;" />
|
2021-08-19 06:40:59 +00:00
|
|
|
|
</view>
|
2021-08-22 08:53:12 +00:00
|
|
|
|
<view @tap="searchEv" class="flexs tc mar-z30 colf radius10 customer-btn" :style="{background:publicColor}">搜索</view>
|
2021-08-19 06:40:59 +00:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 列表 -->
|
2022-01-18 02:43:26 +00:00
|
|
|
|
<view @tap="chooseId(item.id)" v-if="item.name!=null" class="bacf radius10 pad20 mar-x20 fon28" v-for="(item,index) in dataList" :key="index">
|
|
|
|
|
<view style="color: #B3B3B3;" class="disjbac">{{item.time}} <view>{{item.mobile}}</view></view>
|
2021-08-19 06:40:59 +00:00
|
|
|
|
<view class="mar-s20">
|
|
|
|
|
<text class="bold col3">{{item.name}}</text>
|
2021-08-22 08:53:12 +00:00
|
|
|
|
<text style="color: #B3B3B3;">{{item.action}}</text>
|
|
|
|
|
<text class="bold col3" v-if="item.title!=null && item.title!=''">【{{item.title}}】</text>
|
|
|
|
|
<text style="color: #B3B3B3;" v-if="item.zwhat!=null && item.zwhat!=''">{{item.zwhat}}</text>
|
2021-08-19 06:40:59 +00:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2022-01-18 02:43:26 +00:00
|
|
|
|
<view v-if="dataList.length==0 && keyword!=''" class="disjcac fc" style="margin-top: 50%;">
|
2021-08-22 08:53:12 +00:00
|
|
|
|
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>
|
|
|
|
|
<view class="fon24 col3">您搜索的内容暂无结果,换个关键词试试吧</view>
|
|
|
|
|
</view>
|
2021-08-19 06:40:59 +00:00
|
|
|
|
<!-- 返回顶部 -->
|
2022-01-18 02:43:26 +00:00
|
|
|
|
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
|
2021-08-19 06:40:59 +00:00
|
|
|
|
</view>
|
2021-08-26 09:57:04 +00:00
|
|
|
|
<!-- 底部客服 -->
|
|
|
|
|
<public-customer :nbottom="100"></public-customer>
|
2021-12-02 09:31:26 +00:00
|
|
|
|
<!-- 弹框授权 -->
|
|
|
|
|
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
|
|
|
|
|
<!-- 弹框 -->
|
|
|
|
|
<auth-phone v-if="isShowP"></auth-phone>
|
2021-08-19 06:40:59 +00:00
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
statusHNH:uni.getStorageSync('statusHNH'),
|
|
|
|
|
publicColor:uni.getStorageSync('publicColor'),//主题颜色
|
2021-08-22 08:53:12 +00:00
|
|
|
|
dataList:[],//数据列表
|
|
|
|
|
showTop:false,//是否显示返回顶部的箭头
|
|
|
|
|
customer_id:'',//客户ID
|
|
|
|
|
keyword:'',//关键词
|
|
|
|
|
page:1,
|
|
|
|
|
size:10,
|
|
|
|
|
total:'',//总数
|
2021-12-02 09:31:26 +00:00
|
|
|
|
isZanw:true,
|
2021-12-20 08:02:27 +00:00
|
|
|
|
vision:false,
|
2021-12-02 09:31:26 +00:00
|
|
|
|
isShowP:false,
|
2021-08-19 06:40:59 +00:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onPageScroll(e) {
|
|
|
|
|
e.scrollTop > 360 ? this.showTop = true : this.showTop = false
|
|
|
|
|
},
|
|
|
|
|
onReachBottom() {//触底事件
|
2021-08-22 08:53:12 +00:00
|
|
|
|
if(this.total!=this.dataList.length){
|
|
|
|
|
this.page++
|
|
|
|
|
this.checkList()
|
|
|
|
|
} else {
|
|
|
|
|
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多足迹内容')
|
|
|
|
|
this.isZanw = false
|
2021-08-19 06:40:59 +00:00
|
|
|
|
}
|
|
|
|
|
},
|
2021-08-22 08:53:12 +00:00
|
|
|
|
onShow() {
|
|
|
|
|
this.$toolAll.tools.isLogin()
|
|
|
|
|
},
|
2022-02-09 00:52:28 +00:00
|
|
|
|
onShareAppMessage() {
|
|
|
|
|
var shareObj = {
|
|
|
|
|
path: `/pagesB/userFootprint/userFootprint?invite_code=${uni.getStorageSync('invite_code')}`, // 默认是当前页面,必须是以‘/’开头的完整路径
|
|
|
|
|
};
|
|
|
|
|
return shareObj;
|
|
|
|
|
},
|
2021-12-02 09:31:26 +00:00
|
|
|
|
onLoad(options) {
|
2022-02-15 08:02:16 +00:00
|
|
|
|
if(uni.getStorageSync('phone_active')==0){this.vision = true;}
|
2021-12-02 09:31:26 +00:00
|
|
|
|
if(options.invite_code!='' && options.invite_code!=undefined){
|
|
|
|
|
this.loginEv(options.invite_code);
|
|
|
|
|
} else if(options.source_code!='' && options.source_code!=undefined){
|
|
|
|
|
this.loginEv('',options.source_code,options.channel);
|
|
|
|
|
}
|
2021-08-22 08:53:12 +00:00
|
|
|
|
this.checkList()
|
2021-08-19 06:40:59 +00:00
|
|
|
|
},
|
|
|
|
|
methods: {
|
2021-12-02 09:31:26 +00:00
|
|
|
|
loginEv(invite_code='',source='',channel=''){
|
|
|
|
|
uni.login({
|
|
|
|
|
provider: 'weixin',
|
|
|
|
|
success: (res)=> {
|
2022-01-24 05:53:00 +00:00
|
|
|
|
var params = {
|
|
|
|
|
code:res.code,
|
|
|
|
|
invite_code:invite_code,//用户邀请码
|
|
|
|
|
source_code:source,
|
|
|
|
|
channel:channel
|
2021-12-02 09:31:26 +00:00
|
|
|
|
}
|
2022-01-24 05:53:00 +00:00
|
|
|
|
this.$requst.post('user/login',params).then(res => {
|
|
|
|
|
if(res.data.token!=''){
|
|
|
|
|
if(res.data.is_active==0) {
|
|
|
|
|
this.haveImg = false;
|
|
|
|
|
this.vision = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},error => {})
|
2021-12-02 09:31:26 +00:00
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
buttonH(e){//授权成功
|
|
|
|
|
this.haveImg = e
|
|
|
|
|
if(e) {
|
|
|
|
|
this.vision = false
|
|
|
|
|
this.isShowP = true
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-08-22 08:53:12 +00:00
|
|
|
|
chooseId(id){
|
|
|
|
|
this.backTop()
|
|
|
|
|
this.page = 1
|
|
|
|
|
this.isZanw = true
|
|
|
|
|
this.customer_id = id
|
|
|
|
|
this.keyword = ''
|
|
|
|
|
this.checkList()
|
|
|
|
|
},
|
|
|
|
|
searchEv(){//搜索事件
|
|
|
|
|
if(this.keyword!='') this.customer_id = ''
|
|
|
|
|
this.page = 1
|
|
|
|
|
this.isZanw = true
|
|
|
|
|
this.checkList()
|
|
|
|
|
},
|
|
|
|
|
checkList(){//查询列表事件
|
|
|
|
|
let params = {
|
|
|
|
|
page:this.page,
|
|
|
|
|
size:this.size,
|
|
|
|
|
customer_id:this.customer_id,//客户ID
|
2022-01-18 02:43:26 +00:00
|
|
|
|
keyword:this.keyword,
|
|
|
|
|
// user_id:uni.getStorageSync('userId')
|
2021-08-22 08:53:12 +00:00
|
|
|
|
}
|
|
|
|
|
this.$requst.post('user/footmarks',params).then(res=>{
|
|
|
|
|
// console.log('足迹列表查询:',res);
|
|
|
|
|
if(res.code==0){
|
|
|
|
|
if(this.page==1) this.dataList = []
|
|
|
|
|
this.total = res.data.total
|
|
|
|
|
if(res.data.list.length!=0){
|
|
|
|
|
res.data.list.forEach(item=>{
|
|
|
|
|
let newCate = ''
|
|
|
|
|
if(item.content_id > 0) newCate = item.category
|
|
|
|
|
else newCate = ''
|
|
|
|
|
let obj = {
|
|
|
|
|
id:item.account_id,
|
|
|
|
|
name:item.nickname,
|
|
|
|
|
action:item.action,
|
|
|
|
|
title:item.title,
|
|
|
|
|
time:item.created_at,
|
|
|
|
|
zwhat:newCate,
|
2022-01-18 02:43:26 +00:00
|
|
|
|
mobile:item.mobile
|
2021-08-22 08:53:12 +00:00
|
|
|
|
}
|
|
|
|
|
this.dataList.push(obj)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},error=>{})
|
|
|
|
|
},
|
2021-08-19 06:40:59 +00:00
|
|
|
|
backTop(){//回到顶部事件
|
|
|
|
|
uni.pageScrollTo({
|
|
|
|
|
scrollTop: 0,
|
|
|
|
|
duration: 300
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
</style>
|