123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255 |
- <!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>
- .screenroll::-webkit-scrollbar {
- display: none;
- }
-
- .bycloud{
- margin-left:0 !important;
- }
- .detailinfo{
- justify-content:space-between !important;
- }
- /*.mtr{
- text-align:right;
- }
- */
-
- .van-button__content{color:#323232;font-size:.4267rem;font-weight:500;}
- .jcsb{justify-content: space-between;}
- .jcse{justify-content: space-evenly;}
- .jccen{justify-content: center;}
- .performance_toppanel{height:6.32rem;}
-
- .f36{font-size:.96rem}
- .mt20{margin-top:.5333rem;}
- .mt4{margin-top: .1067rem;}
- .f20{font-size:.5333rem;}
- .ml8{margin-left: .2133rem;}
- .mt30{margin-top: .8rem;}
- .performance_panel{width:94%;margin:0;padding:0;left:3%;top:0;height:5.8133rem;}
- .small-title{color:#FD824D;height: .96rem;background-color: #FFEFE9;border-radius: 0.213333rem;}
- .van-button__text{color:#333 important;}
- .btn{width: 4rem;height: 1.0133rem}
- .singleBtn{width:74%;height:1.1733rem;}
- .funds-change{padding: .3733rem .4267rem 0;top:6.3267rem;width:91%}
- .record{padding:.4267rem 0;border-bottom: 1px solid #EEEEEE;}
- .ChangeAmt{color:#FF4C4C;}
- .select{margin:.48rem 0 0 0rem}
- .scorll-list{overflow-y: scroll;height:100%;}
- </style>
- </head>
- <body class="bgc-back pb0 ovh">
- <div class="iphonetitle"> </div>
- <div id="app" v-cloak>
- <van-nav-bar class="camp_title user_title_normal f16" title="盟主中心" @click-left="goback" v-if="toptitleisshow" left-arrow v-cloak>
- <template #left>
- <van-icon name="arrow-left" color="#333" size="20"></van-icon>
- </template>
- </van-nav-bar>
- <div class="rel">
- <div class="performance_toppanel ovh"></div>
- <div class="performance_panel bgcfff abs">
- <div class="small-title df aic jccen" @click="todetail"><img src="./static/images/samll-league-certification.png" alt="认证标签"><span class="f12 ml6" v-if="userInfo.LeaderLevel === 1">创业帮认证小盟主</span><span class="f12 ml6" v-if="userInfo.LeaderLevel === 2">创业帮认证大盟主</span>
- <van-icon class="ml8" name="arrow" color="#FD824D" size="8"></van-icon>
- </div>
- <div class="mt20 f14 c333 tc">盟主储蓄金(元)</div>
- <div class="mt4 f36 c333 tc">{{abs(userInfo.LeaderReserve)}}</div>
- <div class="mt30 df aic jcse">
- <van-button class="btn" @click="levelUp" round plain v-if="userInfo.LeaderLevel === 1">升级</van-button>
- <van-button class="btn" @click="topUp" round color="#FDD500" :class="{singleBtn:userInfo.LeaderLevel === 2}">购买储蓄金</van-button>
- </div>
- </div>
- <div class="funds-change bgcfff abs">
- <div class="f12 c333 select df jcsb aic">
- <div @click="showDate = true"><span class="f20">{{nowdate}}</span>
- <van-icon class="f12" name="arrow"> </van-icon>
- </div>
- <div class="f12 c999">扣减储蓄金提取至盟主的创客余额</div>
- </div>
- <div class="ovh-x" ref="warapper">
- <van-pull-refresh v-model="refreshing" @refresh="onRefresh" style="height:100%;min-height:10vh;">
- <van-empty class="custom-image" image="./static/images/empty-img.png" description="暂无数据" v-if="records.length === 0"></van-empty>
- <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad" error-text="请求失败,点击重新加载" v-else>
- <div class="record" v-for="(item,index) in records" :key="item.Id">
- <div class="df jcsb aic">
- <div class="f16 c333">{{item.Remark}}</div>
- <div class="f16 ChangeAmt"> <span v-if="item.ChangeType === 1">+</span><span v-else>-</span><span>{{abs(item.ChangeAmt)}}</span></div>
- </div>
- <div class="df jcsb aic mt8">
- <div class="f12 c999">{{item.CreateDate}}</div>
- <div class="f12 c999">储蓄金余额:{{abs(item.AfterAmt)}}</div>
- </div>
- </div>
- </van-list>
- </van-pull-refresh>
- </div>
- </div>
- <van-popup v-model="showDate" position="bottom" :style="{ height: '50%' }">
- <van-datetime-picker v-model="currentDate" type="year-month" :min-date="minDate" :max-date="maxDate" :formatter="formatter" @cancel="showDate = false" @confirm="onConfirmDate"></van-datetime-picker>
- </van-popup>
- </div>
- </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.getUserInfo()
- app.onConfirmDate();
- };
- let app = new Vue({
- el: '#app',
- data() {
- return {
- refreshing: false,
- toptitleisshow:true,
-
- isme:false,
- ismelist:[
- 14,1,598
- ],
-
- showDate: false,
- currentDate: new Date(),
- minDate: new Date(new Date().getFullYear(),(new Date().getMonth() - 5)),
- maxDate: new Date(),
- nowdate: '',
- savingFund:66666.00,
- loading:false,
- finished:false,
- error:false,
- currentDate: new Date(),
- userInfo:{
- LeaderReserve:0,
- LeaderLevel:2,
- },
- PageInfo:{
- PageSize:10,
- PageNum:1,
- },
- records:[
- ]
- };
- },
- created(){
- this.getUserInfo()
- this.onConfirmDate();
- },
- mounted(){
- setTimeout(()=>{
- let select = document.getElementsByClassName('select')[0]
- this.$refs.warapper.style.height = `calc(100vh - ${select.getBoundingClientRect().bottom}px)`
- });
- },
- methods: {
- onRefresh() {
- console.log('refresh')
- this.PageInfo.PageNum = 1
- this.getRecordList('refresh');
-
- this.refreshing = false
- //- setTimeout(()=>{
- //- this.records.splice(0,this.records.length)
- //- this.refreshing = false
- //- },1000)
-
- },
- todetail(){
- PublicLib.Goto({Url:'user-leaderLevel-rules'});
- },
- formatter(type, val) {
- if (type === 'year') {
- return `${val}年`;
- } else if (type === 'month') {
- return `${val}月`;
- } else if (type === 'day') {
- return `${val}日`;
- }
- return val;
- },
- onConfirmDate() {
- this.showDate = false;
- this.nowdate = this.currentDate.getFullYear() + '-' + (this.currentDate.getMonth() + 1);
- this.PageInfo.PageNum = 1
- this.getRecordList('refresh')
- },
- onConformateDate(){
- return fillzero(formatDate(this.currentDate.getFullYear(),this.currentDate.getMonth() + 1));
- },
- trendpic(val){
- PublicLib.putCookieInfo('trendtype', val);
- PublicLib.Goto({Url:'product-trendchart'});
- },
- goback(){
- PublicLib.GoBack({Level:1});
- },
- levelUp(){
- PublicLib.putCookieInfo('BuyType',1);
- PublicLib.Goto({Url:'user-leaderLevel-buy'});
- },
- topUp(){
- PublicLib.putCookieInfo('BuyType',2);
- PublicLib.putCookieInfo('LeaderLevel',this.userInfo.LeaderLevel);
- PublicLib.Goto({Url:'user-leaderLevel-buy'});
- },
- onLoad(){
- console.log('onload')
- this.PageInfo.PageNum++
- //- setTimeout(()=>{
- //- //- this.records.push(...this.records)
- //- this.loading = false
- //- },2000)
- this.getRecordList()
- },
- async getUserInfo(){
- const UserId = PublicLib.getCookieInfo('userId');
- const res = await getRequest('api/v1/users/leaderinfo?='+Math.random(6),JSON.stringify({UserId}));
- if(res.status === '1'){
- this.userInfo = res.data
- }else{
- return tips('网络错误,请重试')
- }
- },
- async getRecordList(type='onload'){
- const UserId = PublicLib.getCookieInfo('userId');
- let TradeMonth = this.onConformateDate()
- const res = await getRequest('api/v1/leaderreserverecord/list?='+Math.random(6),JSON.stringify({UserId,TradeMonth,...this.PageInfo}));
- if(res.status === '1'){
- if(type === 'refresh'){
- this.finished = false
- this.records = res.data
- }
- if(type === 'onload'){
- if(res.data.length < this.PageInfo.PageNum){
- this.finished = true
- }
- this.records.push(...res.data)
- this.loading = false
- }
- }else{
- this.error = true
- return tips('网络错误,请重试')
- }
- }
-
- }
- });
- </script>
- </body>
- </html>
|