123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339 |
- <!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">
- <style>
- .van-image {padding-top:0 !important; }
- .userphoto{display:flex; align-items: center;}
- </style>
- </head>
- <body class="bgcfff pb0 ovh">
- <div class="iphonetitle"> </div>
- <div id="app" v-cloak>
- <van-nav-bar class="camp_title user_title_normal f16" title="我的创客" left-arrow :right-text="righttext" @click-left="goindex" @click-right="gosearch(1)" v-if="toptitleisshow">
- <template #left>
- <van-icon name="arrow-left" color="#333" size="20"></van-icon>
- </template>
- </van-nav-bar>
- <div class="merchant-header merchant-header-back"></div>
- <div class="creater-list ml16 mr16 bgcfff" v-cloak>
- <div class="pt16 pb16 pl16 pr16">
- <van-row>
- <van-col span="12">
- <div class="tc">
- <div class="f18 c333 b mb6">{{Number(createrinfo.MakerTotal)}}</div>
- <div class="f12 c999">创客总数</div>
- </div>
- </van-col>
- <van-col span="12">
- <div class="tc">
- <div class="f18 c333 b mb6">{{Number(createrinfo.ThisMonthCount)}}</div>
- <div class="f12 c999">当月新增</div>
- </div>
- </van-col>
- </van-row>
- <div class="creater-total mt16 pt8 pb8 pl16 pr16 bgcfff">
- <div class="df">
- <div class="flex1">
- <div class="df">
- <div class="flex1 f12 c999">已实名总数</div>
- <div class="tr">
- <div class="f12 c333">{{createrinfo.AuthCount}}</div>
- </div>
- </div>
- </div><span class="split ml16 mr16"></span>
- <div class="flex1" @click="norealauth">
- <div class="df">
- <div class="flex1 f12 c999">未实名总数</div>
- <div class="tr">
- <div class="f12 c333">{{createrinfo.NotAuthCount}} ></div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="creater-list-wrapper mt16" v-cloak>
- <van-sticky>
- <div class="pl16 mr16 pt8 pb8 bgcfff">
- <div class="df">
- <div class="f14 c333 b">已实名创客</div>
- <div class="flex1 tr"><span class="mr16 f12 c666" @click="onShowFilter"><span class="vm">筛选</span><img class="vm pl6" src="./static/images/icon-arrow-down@3x.png" alt="" width="12" height="12"></span><span class="f12 c666 vm" @click="gosearch(2)">搜索</span></div>
- </div>
- </div>
- <div class="bb8f7f7f7 bgcfff">
- <van-cell center is-link @click="getcreaterdetail()">
- <template #icon>
- <div class="mr12">
- <van-image :src="userInfo.HeadPhoto" fit="cover" lazy-load round v-if="userInfo.HeadPhoto">
- <template v-slot:loading><img src="./static/images/user-img@3x.png" alt="" width="100%"></template>
- </van-image>
- </div>
- </template>
- <template #title><span class="f14 c333 mr12 vb">{{userInfo.RealName}}</span><span class="f12 c999 vb">实名时间:{{splitdate(userInfo.AuthDate)}}</span></template>
- </van-cell>
- </div>
- </van-sticky>
- <div class="creator_active">
- <van-pull-refresh v-model="refreshing" @refresh="onRefresh" :class="creaters.length === 0 ? 'isnodata':''" style="min-height: 50vh;">
- <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 is-link @click="getcreaterdetail(item.Id)">
- <template #icon>
- <div class="mr12 userphoto">
- <van-image :src="item.HeadPhoto" fit="cover" lazy-load round v-if="item.HeadPhoto">
- <template v-slot:loading><img src="./static/images/user-img@3x.png" alt="" width="100%"></template>
- </van-image>
- </div>
- </template>
- <template #title><span class="f14 c333 mr12 vb">{{item.RealName}}</span><span class="f12 c999 vb">实名时间:{{item.CreateDate}}</span></template>
- <template #label>
- <div class="f12 c999">本月交易额(元):{{abs(Number(item.ThisMonthTrade))}}</div>
- </template>
- </van-cell>
- </van-cell-group>
- </van-list>
- </van-pull-refresh>
- </div>
- </div>
- <van-popup class="filterPop" v-model="showFilter" position="bottom" :style="{ height: '80%' }" closeable close-icon-position="top-left" v-cloak>
- <div class="tc pt16 rel">
- <div class="f16 c333">筛选</div>
- </div>
- <div class="pt32 pl16 pr16">
- <div class="f14 c999">交易额排序</div>
- <div class="df dropdown-button mt8">
- <van-button plain v-for="item,index in option" :class="sorttype == item.Id ? 'dropdown-button__active' : ''" @click="onSelectOption(item,index,0)">{{item.text}}</van-button>
- </div>
- </div>
- <div class="pt16 pl16 pr16">
- <div class="f14 c999">注册时间排序</div>
- <div class="df dropdown-button mt8">
- <van-button plain v-for="item,index in option1" :class="sorttype == item.Id ? 'dropdown-button__active' : ''" @click="onSelectOption(item,index,0)">{{item.text}}</van-button>
- </div>
- </div>
- <div class="pt16 pl16 pr16">
- <div class="f14 c999">创客职级</div>
- <div class="df dropdown-button dropdown-button-4 mt8">
- <van-button plain v-for="item,index in option2" :class="selectedOption2 == item.Id ? 'dropdown-button__active' : ''" @click="onSelectOption(item,index,2)">{{item.Name}}</van-button>
- </div>
- </div>
- <van-goods-action class="mall-bottom">
- <van-goods-action-button color="#eee" style="color:#333" type="warning" text="重置" @click="resetbtn"></van-goods-action-button>
- <van-goods-action-button type="danger" text="确认" @click="onClickButton"></van-goods-action-button>
- </van-goods-action>
- </van-popup>
- </div>
- <script src="./static/js/klm-vv.min.js"></script>
- <script src="./static/js/appfunc.min.js"></script>
- <script src="./static/js/klm-axios-config.js"></script>
- <script src="./static/js/publicfn.js"></script>
- <script>
- function OnStart(){
- PublicLib.SetStatusBarStyle({type:'default', isShow:0});
- };
- //- PublicLib.SetStatusBarStyle({type:'default', isShow:0});
- // 通过 CDN 引入时不会自动注册 Lazyload 组件
- // 可以通过下面的方式手动注册
- Vue.use(vant.Lazyload);
- //--- PublicLib.SetStatusBarStyle({type:'light', isShow:1});
- // 在 #app 标签下渲染一个按钮组件
- let app = new Vue({
- el: '#app',
- data() {
- return {
- isnodata:false,
- toptitleisshow:true,
- userInfo:{
- AuthDate:'2022-01-01'
- },
- showFilter: false,
- creaters: [],
- sorttype: 1,
- selectedOption2: 0,
- option: [
- { text: '由高到低(默认)', Id: 1 },
- ],
- option1: [
- { text: '由近到远(默认)', Id: 2 },
- ],
- option2: [
- { Name: '全部', Id: 0 },
- ],
- loading: true,
- finished: false,
- refreshing: false,
- pageinfo:{
- PageSize:10,
- PageNum:1
- },
- createrinfo:{
- MakerTotal:'',
- ThisMonthCount:'',
- AuthCount:'',
- NotAuthCount:'',
- },
- righttext:'',
- authority:[608,37171,40918,391,3015],
- };
- },
- created() {
- this.getsuerinfo();
- this.getcreatelist('refresh');
- this.getranklist();
- this.getscreaterinfo();
- },
- methods: {
- splitdate(date){
- //- return new Date(date).getFullYear() + '-' + (new Date(date).getMonth() + 1) + '-' + new Date(date).getDate();
- return date.split('').splice(0,10).join('');
- },
- //- 点击筛选
- onShowFilter(){
- this.showFilter = !this.showFilter;
- },
- onLoad() {
- if (this.refreshing) {
- //- this.creaters = [];
- this.refreshing = false;
- }
- this.pageinfo.PageNum++;
- this.getcreatelist();
- },
- onRefresh() {
- this.pageinfo.PageNum = 1;
- // 清空列表数据
- //- this.creaters = [];
- this.finished = false;
-
- // 重新加载数据
- // 将 loading 设置为 true,表示处于加载状态
- this.loading = true;
- if (this.refreshing) {
- //- this.creaters = [];
- this.refreshing = false;
- }
- this.getcreatelist('refresh');
- //- this.onLoad();
- },
- //- 条件选择函数
- onSelectOption(item,index,num) {
- switch(num){
- case 0:
- this.sorttype = item.Id;
- break;
- case 2:
- this.selectedOption2 = item.Id;
- break;
- };
- },
- //- 点击确定筛选
- onClickButton() {
- this.showFilter = false;
- this.creaters = [];
- this.getcreatelist('refresh');
- },
- //- 重置
- resetbtn(){
- this.sorttype = 1;
- this.selectedOption2 = 0;
- },
- //- 获取职级列表
- async getranklist(){
- const res = await getRequest('api/v1/userlevelset/list?t='+Math.random(6),JSON.stringify({PageSize:10,PageNum:1}));
- if(res.status !== '1') return tips('获取职级列表失败,请重试!');
- this.option2.push(...res.data);
- },
- //- 获取创客列表
- async getcreatelist(type= 'onload'){
- const UserId = PublicLib.getCookieInfo('userId');
- const res = await getRequest('api/v1/users/mymakerlist?t='+Math.random(6),JSON.stringify({...this.pageinfo,UserLevel:this.selectedOption2,RealName:'',UserId,Sort:this.sorttype}));
- if(res.status !== '1') return tips('获取创客列表失败,请重试!');
- if(res.data.length<this.pageinfo.PageSize) {
- this.finished = true;
- };
- if(type==='onload'){
- this.creaters.push(...res.data);
- }
- if(type==='refresh'){
- this.creaters = res.data
- }
- const data = 5;
- let day = new Date().getDate();
- day = day > data ? day : data;
- if(day === 1){
- day = 30;
- };
- this.creaters.forEach(item=>{
- if(item.Id === 31){
- item.RealName = '张浩';
- item.ThisMonthTrade = 53218560.68 + ((day - data) * 10000000);
- }
- })
- this.loading = false;
- if(this.creaters.length === 0) {this.isnodata = true}else{this.isnodata = false};
- },
- //- 获取用户个人信息
- async getsuerinfo(){
- //- PublicLib.ShowLoading({Message:''});
- const UserId = PublicLib.getCookieInfo('userId');
- const res = await getRequest('api/v1/users/personalinfo?t='+Math.random(6),JSON.stringify({Id:UserId}));
- if(res.status !== '1') return tips('获取个人信息失败,请重试!');
- //- PublicLib.HideLoading();
- this.userInfo = res.data;
- this.authority.forEach((item)=>{
- if(UserId === String(item)){
- this.userInfo.RightList.push('1');
- };
- });
- const isright = this.userInfo.RightList.find(item=>{
- return item === '1';
- });
- this.righttext = isright === '1' && UserId !== '597' ? '顶级创客' : '';
- },
- //- 获取用户创客信息
- async getscreaterinfo(){
- const UserId = PublicLib.getCookieInfo('userId');
- const res = await getRequest('api/v1/users/mymakerdata?t='+Math.random(6),JSON.stringify({UserId}));
- if(res.status !== '1') return tips('获取创客信息失败,请重试!');
- this.createrinfo = res.data;
- },
- gosearch(num){
- if(num === 1){
- PublicLib.putCookieInfo('ischange','true');
- PublicLib.Goto({Url:'creater-search'});
- }else{
- PublicLib.putCookieInfo('ischange','');
- PublicLib.Goto({Url:'creater-search'});
- };
- },
- norealauth(){
- PublicLib.Goto({Url:'creater-norealauth'});
- PublicLib.putCookieInfo('norealauth', Number(this.createrinfo.NotAuthCount));
- },
- getcreaterdetail(id){
- id = id ? id : PublicLib.getCookieInfo('userId');
- PublicLib.putCookieInfo('querycreaterid', id);
- PublicLib.Goto({Url:'maker-details-echarts'});
- },
- goindex(){
- PublicLib.GoBack({Level:1});
- }
- }
- });
- </script>
- </body>
- </html>
|