123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326 |
- <!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" style="padding-top:0;">
- <div class="index_current" id="app" v-cloak>
- <div class="ovh-x" ref="wrapper2">
- <van-pull-refresh v-model="isLoading" @refresh="onRefresh" style="height:100%;">
- <van-cell>
- <template #title>
- <div class="df index_userinfo" @click="userinfobtn"><img class="userimg" :src="PublicLib.CachePicture({picUrl:userphoto,domid:'indexuserheadimg'})" id="indexuserheadimg"><span>创业帮001</span></div>
- </template>
- <template #default>
- <div class="df index_userinfo defaultimg" @click="server"><img class="servce" src="./static/images/index-btn1.png" alt=""></div>
- </template>
- </van-cell>
- <van-swipe class="my-swipe" :autoplay="2000" indicator-color="rgba(255,255,255,.8)" v-cloak>
- <van-swipe-item v-for="item,index in banner" :key="index" @click="bannerbtn(item.Url)"><img width="100%" :src="PublicLib.CachePicture({picUrl:item.PicPath,domid:'banner' + index})" :id="'banner' + index" fit="cover" lazy-load></van-swipe-item>
- </van-swipe>
- <van-row class="block-padding bb8f7f7f7">
- <van-col class="mr12" span="6"><img class="toutiao-t fl" src="./static/images/logo-text.png" alt="" width="100%"></van-col>
- <van-col span="16">
- <van-swipe :autoplay="5000" style="height:.533333rem" vertical :show-indicators="false" :touchable="false">
- <van-swipe-item v-for="item,index in toutiao" :key="index">
- <div class="toutiao-txt c333 line1">创客{{item.RealName}}又收到{{item.Amount}}奖励</div>
- </van-swipe-item>
- </van-swipe>
- </van-col>
- </van-row>
- <van-grid class="main-btn bb8f7f7f7" :border="false" :icon-size="20" v-cloak>
- <van-grid-item class="gridicon" v-for="item,index in entrancelist" :text="item.Title" @click="entrance(item.Url)">
- <template v-slot:icon><img :src="item.Icon" :id="'indexIcon' + index"></template>
- </van-grid-item>
- </van-grid>
- <div class="block-padding" v-cloak @click="achievement" style="padding-bottom:50px;">
- <div class="df"><strong class="db f16 flex1">本月团队业绩</strong></div>
- <div class="index-card bgcfff bgimg">
- <div class="title df">
- <button class="view_detail f12 bgcfff rel"> 查看详情
- <van-icon class="abs" name="arrow"></van-icon>
- </button>
- </div>
- <div class="tc detail rel">
- <div class="index-num-b f18 b">15260</div>
- <div class="f12 c333">团队交易额(元)</div>
- <van-row class="pt16 pb8">
- <van-col span="12">
- <div class="index-num-b f16 b">29</div>
- <div class="f12 c333">新增创客</div>
- </van-col>
- <van-col span="12">
- <div class="index-num-b f16 b">37</div>
- <div class="f12 c333">新增活动商户</div>
- </van-col>
- </van-row><img class="abs people_bgimg" src="./static/images/index-bgimgpeople.png" alt="">
- </div>
- </div>
- </div>
- </van-pull-refresh>
- </div>
- <van-tabbar v-model="active" active-color="#333" inactive-color="#999" v-cloak v-if="tabsisshow">
- <van-tabbar-item icon="home-o">首页
- <template #icon="props"><img :src="props.active ? icon1.active : icon1.inactive"></template>
- </van-tabbar-item>
- <van-tabbar-item icon="search" @click="mall">商城
- <template #icon="props"><img :src="props.active ? icon2.active : icon2.inactive"></template>
- </van-tabbar-item>
- <van-tabbar-item icon="friends-o" @click="notice" :dot="isnotice">消息
- <template #icon="props"><img :src="props.active ? icon3.active : icon3.inactive"></template>
- </van-tabbar-item>
- <van-tabbar-item icon="setting-o" @click="user">我的
- <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/appfunc.min.js"></script>
- <script src="./static/js/klm-axios-config.js"></script>
- <script src="./static/js/publicfn.js"></script>
- <script>
- function OnStart(){
- app.getsuerinfo();
- app.verificationrealauth();
- PublicLib.SetStatusBarBgColor({bgcolor:'ffffff'});
- PublicLib.SetStatusBarStyle({type:'default', isShow:1});
- };
- // 通过 CDN 引入时不会自动注册 Lazyload 组件
- // 可以通过下面的方式手动注册
- Vue.use(vant.Lazyload);
- //- PublicLib.SetStatusBarBgColor({bgcolor:'ffffff'});
- //- PublicLib.SetStatusBarStyle({type:'default', isShow:1});
- // 在 #app 标签下渲染一个按钮组件
- let app = new Vue({
- el: '#app',
- data() {
- return {
- isLoading:false,
- topisshow:false,
- realauth:false,
- active: 0,
- username:'',
- rankgrade:1,
- userphoto:'',
- banner: [
- ],
- toutiao: [
- ],
- 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',
- },
- teamperformance: '0',
- addcustomer:'0',
- merchant:'0',
- grade:[
- './static/images/grade-k1.png',
- './static/images/grade-k2.png',
- './static/images/grade-k3.png',
- './static/images/grade-k4.png',
- './static/images/grade-k5.png',
- './static/images/grade-k6.png',
- './static/images/grade-k8.png',
- './static/images/grade-k9.png',
- ],
- entrancelist:[
- ],
- tabsisshow:false,
- warehouse:[],
- };
- },
- created() {
- this.tabsisshow = bottomtabisshow;
- this.getsuerinfo();
- this.getteamachievement();
- this.getquickentrance();
- this.gettopbanner();
- this.getheadline();
- //- this.getwarehouselist();
- this.verificationrealauth();
- },
- mounted(){
- this.$nextTick(() => {
- this.$refs.wrapper2.style.height = `${document.documentElement.clientHeight}px`;
- });
- },
- computed:{
- isnotice:function(){
- return PublicLib.getCookieInfo('noticeiscount') !== "";
- }
- },
- methods: {
- async onRefresh(){
- await this.getsuerinfo();
- await this.getteamachievement();
- await this.getquickentrance();
- await this.gettopbanner();
- await this.getheadline();
- //- await this.getwarehouselist();
- await this.verificationrealauth();
- this.isLoading = false;
- },
- //- 吸顶状态
- sticky(status){
- this.topisshow = status
- },
- //- 获取用户个人信息
- async getsuerinfo(){
- const Id = PublicLib.getCookieInfo('userId');
- const res = await getRequest('api/v1/users/myinfo',JSON.stringify({Id}));
- if(res.status === '1') {
- this.username = res.data.RealName;
- this.rankgrade = res.data.UserLevel;
- this.userphoto = res.data.HeadPhoto;
- };
- },
- //- 获取团队业绩
- async getteamachievement(){
- const UserId = PublicLib.getCookieInfo('userId');
- const res = await getRequest('api/v1/usertradedaysummary/thismonth',JSON.stringify({UserId}));
- if(res.status === '1') {
- this.teamperformance = res.data.DirectTradeAmt;
- this.merchant = res.data.DirectDebitCapNum;
- this.addcustomer = res.data.AddCount;
- };
- },
- //- 获取快捷入口列表
- async getquickentrance(){
- //- PublicLib.ShowLoading({Message:''});
- //- const res = await getRequest('api/v1/indexiconlist/list',JSON.stringify({PageSize:8,PageNum:1}));
- //- if(res.status === '1') {
- //- TODO:动态生成入口
- //- this.entrancelist = res.data;
- this.entrancelist = [
- {Icon:'./static/images/main-btn5@3x.png',Title:'我的创客',Url:'creater-list1'},
- //- {Icon:'./static/images/main-btn6@3x.png',Title:'我的商户',Url:'merchant-list'},
- {Icon:'./static/images/main-btn7@3x.png',Title:'意见反馈',Url:'user-feedback1'},
- {Icon:'./static/images/main-btn1@3x.png',Title:'商户创建',Url:'merchant-establish'},
- {Icon:'./static/images/main-btn8@3x.png',Title:'进件查询',Url:'merchant-incoming1'},
- {Icon:'./static/images/main-btn2@3x.png',Title:'暂存箱',Url:'merchant-temporary-storage1'},
- ];
- //- PublicLib.HideLoading();
- //- }
- },
- //- 获取顶部banner
- async gettopbanner(){
- const res = await getRequest('api/v1/advertisment/indextop',JSON.stringify({PageSize:8,PageNum:1}));
- if(res.status === '1') {
- this.banner = res.data;
- };
- },
- //- 获取创业帮头条信息
- async getheadline(){
- const res = await getRequest('api/v1/sysrechargerecord/headline',JSON.stringify({PageSize:8,PageNum:1}));
- if(res.status === '1') {
- this.toutiao = res.data;
- };
- },
- //- 跳转特训营
- trainingCamp(){
- PublicLib.Goto({Url:'trainingCamp'});
- },
- //- 跳转商城
- mall(){
- PublicLib.Goto({Url:'mall'});
- },
- //- 跳转消息
- notice(){
- PublicLib.Goto({Url:'notice-center'});
- },
- //- 跳转我的
- user(){
- PublicLib.Goto({Url:'user-center'});
- },
- async verificationrealauth(){
- const Id = PublicLib.getCookieInfo('userId');
- const userinfo = await getRequest('api/v1/users/personalinfo',JSON.stringify({Id}));
- //- 是否实名认证完毕
- //- console.log(userinfo)
- if(userinfo.data.AuthFlag !== 1) {
- this.realauth = true;
- }else{
- this.realauth = false;
- };
- },
- entrance(Url){
- if(Url === 'user-feedback'){
- return PublicLib.Goto({Url});
- };
- if(this.realauth){
- PublicLib.ShowDialog({
- Title:'暂未实名认证',
- Message:'是否去实名认证?',
- ConfirmText:'去实名',
- CancelText:'暂不实名',
- ConfirmAction:'app.goAuth()',
- CanelAction:''
- });
- return;
- };
- //- 跳转对应的快捷入口页面
- PublicLib.Goto({Url});
- },
- goAuth(){
- PublicLib.Goto({Url:'user-realauth'});
- },
- bannerbtn(url){
- if(!url){
- return PublicLib.Goto({Url:'welcome'});
- };
- PublicLib.Goto({Url:url});
- },
- //- 跳转业绩
- achievement(){
- PublicLib.Goto({Url:'product-myperformance1'});
- },
- //- 服务中心
- server(){
- PublicLib.Goto({Url:'user-service-list'});
- },
- //- 点击头部个人信息
- userinfobtn(){
- PublicLib.Goto({Url:'user-info1'});
- },
- //- 获取仓库入口
- async getwarehouselist(){
- const UserId = PublicLib.getCookieInfo('userId');
- const res = await getRequest('api/v1/storehouse/indexlist',JSON.stringify({UserId,PageSize:8,PageNum:1}));
- if(res.status === '1') {
- this.warehouse = res.data;
- }
- },
- //- 跳转对应仓库
- gowarehouse(id,name){
- PublicLib.putCookieInfo('warehouseId', id);
- PublicLib.putCookieInfo('warehouseName', name);
- PublicLib.Goto({Url:'warehouse-management'});
- }
- }
- });
- </script>
- </body>
- </html>
|