<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>未实名-我的创客-爽客邦</title> <meta name="keywords" content="未实名-我的创客-爽客邦"> <meta name="description" content="未实名-我的创客-爽客邦"> <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> <meta content="telephone=no" name="format-detection"> <meta content="email=no" name="format-detection"> <meta name="apple-mobile-web-app-title" content="未实名-我的创客-爽客邦"> <meta http-equiv="Cache-Control" content="no-siteapp"> <link rel="stylesheet" href="./static/css/main.css"> </head> <body class="bgc-back"> <div id="app"> <van-nav-bar class="camp_title user_title_normal" title="未实名创客" @click-left="backbtn" left-arrow v-if="toptitleisshow"> <template #left> <van-icon name="arrow-left" color="#fff" size="20"></van-icon> </template> </van-nav-bar> <div class="creater-list-wrapper" v-cloak> <van-sticky> <div class="pt8 pb8 pl16 pr16 bgcfff f14 c333 b">未实名总数:{{norealauthcount}}人</div> </van-sticky> <van-pull-refresh v-model="refreshing" @refresh="onRefresh" :class="creaters.length === 0 ? 'isnodata':''" style="padding-bottom: 15vh"> <van-list v-model="loading" :finished="finished" finished-text="没有更多数据了" @load="onLoad" :immediate-check="false"> <van-empty class="custom-image" image="./static/images/empty-img.png" description="暂无数据" v-if="isnodata"></van-empty> <van-cell-group :border="false"> <van-cell v-for="item,index in creaters" center> <template #icon> <div class="mr12"> <van-image :src="item.HeadPhoto" fit="cover" lazy-load round> <template v-slot:loading><img src="./static/images/user-img@3x.png" alt="" width="100%"></template> </van-image> </div> </template> <template #title><span class="f16 c333 vb">{{item.phoneNum}}</span></template> <template #label><span class="f12 c999 vb">注册时间:{{item.CreateDate}}</span></template> <template #right-icon> <div class="contact f12" @click="takephone(item.Mobile)">联系TA</div> </template> </van-cell> </van-cell-group> </van-list> </van-pull-refresh> </div> </div> <script src="./static/js/klm-vv.min.js"></script> <script src="./static/js/klm-axios-config.js"></script> <script> // 通过 CDN 引入时不会自动注册 Lazyload 组件 // 可以通过下面的方式手动注册 Vue.use(vant.Lazyload); // 在 #app 标签下渲染一个按钮组件 let app = new Vue({ el: '#app', data() { return { isnodata:false, toptitleisshow:true, active: 0, searchContent: '', isShow: false, creaters: [ ], loading: false, finished: false, refreshing: false, pageinfo:{ PageSize:10, PageNum:1 }, norealauthcount: 3 }; }, created() { this.getunrealauthlist(); //- this.norealauthcount = PublicLib.getCookieInfo('norealauth'); }, methods: { onLoad() { if (this.refreshing) { this.creaters = []; this.refreshing = false; } this.pageinfo.PageNum++; this.getunrealauthlist(); }, onRefresh() { this.pageinfo.PageNum = 0; // 清空列表数据 this.creaters = []; // 清空列表数据 this.finished = false; // 重新加载数据 // 将 loading 设置为 true,表示处于加载状态 this.loading = true; this.onLoad(); }, async getunrealauthlist(){ PublicLib.ShowLoading({Message:''}); const UserId = PublicLib.getCookieInfo('userId'); const res = await getRequest('/api/v1/users/mymakerfornotauth',JSON.stringify({...this.pageinfo,UserId})); if(res.status !== '1') return tips('获取未实名创客列表失败,请重试!'); PublicLib.HideLoading(); res.data.forEach(obj=>{ obj.phoneNum = hidemiddlenum(obj.Mobile,3,4) }); if(res.data.length < 10 ){ this.finished = true; }; this.creaters.push(...res.data); this.creaters = [ { Id: 2, //Id CreateDate: "2020-12-25", //创建时间 HeadPhoto: " http://test.ap.shuangkebang.com/default.png", //头像 phoneNum: "147****9364", //真实姓名 ThisMonthTrade: "1520.12", //本月交易额 Mobile:'14781419364', }, { Id: 3, //Id CreateDate: "2020-12-22", //创建时间 HeadPhoto: " http://test.ap.shuangkebang.com/default.png", //头像 phoneNum: "133****3195", //真实姓名 ThisMonthTrade: "1820.12",//本月交易额 Mobile:'13308013195', }, { Id: 4, //Id CreateDate: "2020-12-17", //创建时间 HeadPhoto: " http://test.ap.shuangkebang.com/default.png", //头像 phoneNum: "188****5309", //真实姓名 ThisMonthTrade: "2520.12", //本月交易额 Mobile:'18876925309', }, ] this.loading = false; if(this.creaters.length === 0) {this.isnodata = true}else{this.isnodata = false}; }, backbtn(){ PublicLib.GoBack({Level:1}); }, takephone(phonenum){ console.log(phonenum); PublicLib.PhoneCall(phonenum); } } }); </script> </body> </html>