123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193 |
- <!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="pb0 ovh bgcf5f5f5">
- <div class="user-center" id="app" v-cloak>
- <div class="loginbgc abs"></div>
- <van-pull-refresh class="user-centerxy iphonetitle" v-model="isLoading" @refresh="onRefresh" style="min-height:80vh;">
- <div class="pl16 pr16">
- <div class="index_title df mb6">
- <div class="title_mame mb f16 c333 mr12">{{merchantname}}</div><img src="./static/images/user-center-authmerchant.png" alt="" v-if="IsAuth === 2">
- </div>
- <div class="c333 f12">{{phonenumber}}</div>
- <div class="index_panel">
- <div class="money_count_icon df">
- <div class="f14 c333">总收益</div>
- </div>
- <div class="money_count_icon df mb money_count">
- <div class="f16 c333 mb6 mb">¥</div>
- <div class="count c333">{{moneycount}}</div>
- </div>
- <div class="money_count_detail df">
- <div class="data tc">
- <div class="c999 f12">订单总数</div>
- <div class="mb f16 mt6">{{ordercount}}</div>
- </div>
- <div class="line"></div>
- <div class="data tc">
- <div class="c999 f12">加入时间</div>
- <div class="mb f16 mt6">{{jointime}}</div>
- </div>
- <div class="line"></div>
- <div class="data tc">
- <div class="c999 f12">新增会员</div>
- <div class="mb f16 mt6">{{vipcount}}</div>
- </div>
- </div>
- </div>
- <div class="index_panel bgcfff mt10">
- <div class="title df">
- <div class="mb c333 f16">常用工具</div>
- </div>
- <van-grid class="index_grid bgcfff" :column-num="3">
- <van-grid-item :icon="item.icon" :text="item.title" v-for="item,index in listdata" :key="index" @click="userclick(item.Url)"></van-grid-item>
- </van-grid>
- </div>
- </div>
- </van-pull-refresh>
- <van-dialog class="option" style="border-radius:4px;" v-model="dialogisshow" title="确定退出登录。" show-cancel-button @confirm="loginout" @cancel="dialogisshow = false"> </van-dialog>
- <van-tabbar v-model="active" active-color="#FF502A" v-cloak v-if="tabsisshow">
- <van-tabbar-item icon="home-o" @click="index">工作台
- <template #icon="props"><img :src="props.active ? icon1.active : icon1.inactive"></template>
- </van-tabbar-item>
- <van-tabbar-item icon="home-o" @click="management">经营数据
- <template #icon="props"><img :src="props.active ? icon2.active : icon2.inactive"></template>
- </van-tabbar-item>
- <van-tabbar-item icon="friends-o" @click="notice">消息
- <template #icon="props"><img :src="props.active ? icon3.active : icon3.inactive"></template>
- </van-tabbar-item>
- <van-tabbar-item icon="setting-o">我的
- <template #icon="props"><img :src="props.active ? icon4.active : icon4.inactive"></template>
- </van-tabbar-item>
- </van-tabbar>
- </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 {
- isLoading:false,
- topisshow:false,
- dialogisshow:false,
- chosedate:1,
- active: 3,
- moneycount:0,
- jointime:'',
- ordercount:0,
- vipcount:0,
- merchantname:'',
- icon1: {
- active: './static/images/tab-icon1-active.png',
- inactive: './static/images/tab-icon1-no.png',
- },
- icon2: {
- active: './static/images/tab-icon2-active.png',
- inactive: './static/images/tab-icon2-no.png',
- },
- icon3: {
- active: './static/images/tab-icon3-active.png',
- inactive: './static/images/tab-icon3-no.png',
- },
- icon4: {
- active: './static/images/tab-icon4-active.png',
- inactive: './static/images/tab-icon4-no.png',
- },
- tabsisshow:false,
- listdata:[
- {icon:'./static/images/user-center-icon1.png',title:'常见问题',Url:'user-service-list'},
- {icon:'./static/images/user-center-icon2.png',title:'客服中心',Url:'user-feedback'},
- {icon:'./static/images/user-center-icon3.png',title:'合作协议',Url:'user-maker-agreement'},
- {icon:'./static/images/user-center-icon4.png',title:'关于创业帮',Url:'user-about'},
- {icon:'./static/images/user-center-icon5.png',title:'修改密码',Url:'user-forgetpwd'},
- {icon:'./static/images/user-center-icon6.png',title:'退出登录',Url:'loginout'},
- ],
- IsAuth:0,
- phonenumber:'',
- };
- },
- created() {
- this.tabsisshow = bottomtabisshow;
- this.getmerchantdetail();
- this.getmangementdata();
- },
- mounted(){
- },
- computed:{
- isnotice:function(){
- return PublicLib.getCookieInfo('noticeiscount') !== "";
- }
- },
- methods: {
- //- 获取商户详情
- async getmerchantdetail(){
- let Id = PublicLib.getCookieInfo('userId')
- const res = await getRequest('/api/v1/merchantinfo/detail?t='+Math.random(6),JSON.stringify({Id}));
- if(res.status !== '1') return tips(res.info);
- //- console.log(res);
- this.merchantname = res.data.Name;
- this.IsAuth = res.data.IsAuth;
- this.phonenumber = hidemiddlenum(res.data.Mobile,3,2);
- },
- //- 获取商户统计数据
- async getmangementdata(){
- let Id = PublicLib.getCookieInfo('userId')
- const res = await getRequest('/api/v1/merchantinfo/statdata?t='+Math.random(6),JSON.stringify({Id}));
- if(res.status !== '1') return tips(res.info);
- //- console.log(res);
- this.moneycount = res.data.TotalActual.toFixed(2);
- this.jointime = res.data.CreateDate;
- this.ordercount = res.data.TotalOrder;
- this.vipcount = res.data.TotalCustomer;
- },
- onRefresh(){
- this.isLoading = false;
- this.getmerchantdetail();
- this.getmangementdata();
- },
- userclick(Url){
- if(Url && Url === 'loginout'){
- this.dialogisshow = true;
- } else{
- PublicLib.Goto({Url});
- }
- },
- notice(){
- PublicLib.Goto({Url:'notice-center'});
- },
- management(){
- PublicLib.Goto({Url:'management'});
- },
- index(){
- PublicLib.Goto({Url:'index'});
- },
- loginout(){
- const id = PublicLib.getCookieInfo('userId');
- postRequest('/api/v1/users/logout',JSON.stringify({UserId:id}));
- PublicLib.putCookieInfo('userId', '');
- //- PublicLib.GoBack({Level:-1});
- PublicLib.Goto({Url:'user-login'});
- }
- }
- });
- </script>
- </body>
- </html>
|