123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252 |
- <!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="train_record pb0 ovh">
- <div id="app">
- <van-nav-bar class="user_rank_explan_title" title="参团记录" @click-left="goback" v-if="toptitleisshow" @click-right="rules" left-arrow v-cloak>
- <template #left> <img src="./static/images/left.png" alt=""></template>
- <template #right>
- <van-icon name="bar-chart-o" size="20" color="#666666"></van-icon>
- </template>
- </van-nav-bar>
- <div class="ovh-x" ref="wrapper1">
- <van-pull-refresh v-model="refreshing" @refresh="onRefresh" v-cloak style="height:100%;">
- <van-tabs class="recordtabs" v-model="active" @click="checktab">
- <van-tab title="组队记录">
- <van-list v-model="loading" :finished="finished0" @load="onLoad" :immediate-check="false" :class="teamInfo.length === 0 ? 'isnodata':''">
- <van-empty class="custom-image" image="./static/images/empty-img.png" description="暂无数据" v-if="isnodata"></van-empty>
- <div class="camp_enrollinfopanel rel recordtop" v-for="item in teamInfo" :key="item.Id" :class="failfn(item.Status)? 'greybg':''">
- <div class="titlepanel df">
- <div class="text c333 f18 b" :class="failfn(item.Status)? 'fail':''">{{item.TeamName}} <img class="iconnotes" src="./static/images/icon-notes.png" alt="" v-if="item.Status === 1 || item.Status === 4">
- <div class="slogan f12 c999 n">{{item.WatchWord}}</div>
- </div><span class="sign recordend tr" v-if="item.Status !== 0">组队待审核
- <div class="begin f12 recordendcolor">离开始还剩:{{item.OverDays}}天</div></span><span class="sign recordend tr" v-if="item.Status === 1">组队审核通过(报名中)
- <div class="begin f12 recordendcolor">离开始还剩:{{item.OverDays}}天</div></span><span class="end recordend tr doing" v-if="item.Status === 2">活动进行中
- <div style="opacity: 0;">这个div是为了布局</div></span><span class="end recordend tr" v-if="item.Status === 3">活动已结束
- <div style="opacity: 0;">这个div是为了布局</div></span><span class="end recordend tr greybg" v-if="item.Status === 4">组队审核失败
- <div style="opacity: 0;">这个div是为了布局</div></span><span class="end recordend tr greybg" v-if="item.Status === 5">组队失败(人数未达标)
- <div style="opacity: 0;">这个div是为了布局</div></span>
- </div>
- <div class="mainpanel f12 c666 rel">
- <div class="info">队长:{{item.TeamLeader}}</div>
- <div class="info">人数:{{item.MemberCount}}人 </div>
- <div class="info">时间:{{item.EffectStartDate}}~{{item.EffectEndDate}}</div>
- <div class="info">地点:{{item.Areas}}
- <button class="f14 cfff" v-if="item.Status !== 0" @click="tipexamine(item.Id)">提醒审核</button>
- </div>
- </div>
- </div>
- <div class="bottomline tc c999 f12 pr16 pl16 rel" v-if="tipsisshow0 && !isnodata">
- <div class="line abs"></div><span>我是有底线的</span>
- </div>
- </van-list>
- </van-tab>
- <van-tab title="报名记录">
- <van-list v-model="loading" :finished="finished1" @load="onLoad" :immediate-check="false" :class="signList.length === 0 ? 'isnodata':''">
- <van-empty class="custom-image" image="./static/images/empty-img.png" description="暂无数据" v-if="isnodata2"></van-empty>
- <div class="camp_enrollinfopanel rel recordtop" v-for="item in signList" :key="item.Id" :class="failfn(item.Status)? 'greybg':''">
- <div class="titlepanel df">
- <div class="text c333 f18 b" :class="failfn(item.Status)? 'fail':''">{{item.TeamName}} <img class="iconnotes" src="./static/images/icon-notes.png" alt="" v-if="item.Status === 1 || item.Status === 2 || item.Status === 4">
- <div class="slogan f12 c999 n">{{item.WatchWord}}</div>
- </div><span class="sign recordend tr" v-if="item.Status !== 0">报名待审核
- <div class="begin f12 recordendcolor">离开始还剩:{{item.OverDays}}天</div></span><span class="sign recordend tr" v-if="item.Status === 1">报名审核通过
- <div class="begin f12 recordendcolor">离开始还剩:{{item.OverDays}}天</div></span><span class="end recordend tr doing" v-if="item.Status === 2">活动进行中
- <div style="opacity: 0;">这个div是为了布局</div></span><span class="end recordend tr" v-if="item.Status === 3">活动已结束
- <div style="opacity: 0;">这个div是为了布局</div></span><span class="end tr greybg" v-if="item.Status === 4">报名失败
- <div style="opacity: 0;">这个div是为了布局</div></span><span class="end tr greybg" v-if="item.Status === 5">报名已取消
- <div style="opacity: 0;">这个div是为了布局</div></span>
- </div>
- <div class="mainpanel f12 c666 rel">
- <div class="info">队长:{{item.TeamLeader}}</div>
- <div class="info">人数:{{item.MemberCount}}人</div>
- <div class="info">时间:2020-01-10~2020-02-02</div>
- <div class="info">地点:{{item.Areas}}
- <button class="f14 c999 cancel signbtn" v-if="item.Status !== 0" @click="cancelsignup(item.Id)">取消报名</button><br>
- <button class="f14 cfff signbtn" v-if="item.Status !== 0" @click="tipsignup(item.Id)">提醒审核</button>
- </div>
- </div>
- </div>
- <div class="bottomline tc c999 f12 pr16 pl16 rel" v-if="tipsisshow1 && !isnodata2">
- <div class="line abs"></div><span>我是有底线的</span>
- </div>
- </van-list>
- </van-tab>
- </van-tabs>
- </van-pull-refresh>
- </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(){
- PublicLib.SetStatusBarStyle({type:'default', isShow:1});
- };
- PublicLib.SetStatusBarBgColor({bgcolor:'ffffff'});
- // 在 #app 标签下渲染一个按钮组件
- let app = new Vue({
- el: '#app',
- data() {
- return {
- isnodata:false,
- isnodata2:false,
- toptitleisshow:true,
- //- 滚动加载
- loading: false,
- finished0: false,
- finished1: false,
- //- 刷新
- refreshing: false,
- //- 是否显示完成
- tipsisshow0:false,
- tipsisshow1:false,
- active: 0,
- teamInfo:[
- ],
- signList:[
- ],
- pageinfo0:{
- PageSize:10,
- PageNum:1
- },
- pageinfo1:{
- PageSize:10,
- PageNum:1
- },
- }
- },
- created() {
- this.getcreatedteamrecord();
- },
- mounted(){
- this.$nextTick(() => {
- this.$refs.wrapper1.style.height = `${document.documentElement.clientHeight - 98}px`;
- });
- },
- methods: {
- goback(){
- PublicLib.GoBack({Level:1});
- },
- failfn(status){
- if(status=== 4 || status === 5) {
- return true;
- };
- return false;
- },
- onLoad() {
- if(this.active === 0) {
- if (this.refreshing) {
- this.teamInfo = [];
- this.refreshing = false;
- this.pageinfo0.PageNum = 0;
- };
- this.pageinfo0.PageNum++;
- this.getcreatedteamrecord();
- } else {
- if (this.refreshing) {
- this.signList = [];
- this.refreshing = false;
- this.pageinfo1.PageNum = 0;
- };
- this.pageinfo1.PageNum++;
- this.getsignuprecord();
- }
- },
- onRefresh() {
- // 清空列表数据
- this.finished0 = false;
- this.finished1 = false;
- //- 隐藏底线完
- this.tipsisshow0=false,
- this.tipsisshow1=false,
-
- // 重新加载数据
- // 将 loading 设置为 true,表示处于加载状态
- this.loading = true;
- this.onLoad();
- },
- checktab(index){
- if(index === 1) {
- this.signList = [];
- this.getsignuprecord();
- }else{
- this.teamInfo = [];
- this.getcreatedteamrecord();
- };
- },
- async getsignuprecord(){
- PublicLib.ShowLoading({Message:''});
- const UserId = PublicLib.getCookieInfo('userId');
- const res = await getRequest('api/v1/teamofferapply/signuplist',JSON.stringify({UserId,...this.pageinfo1}));
- if(res.status !== '1') return tips('获取报名记录失败,请重试!');
- PublicLib.HideLoading();
- if(res.data.length < this.pageinfo0.PageSize) {
- this.finished1 = true;
- this.tipsisshow1 = true;
- };
- this.signList.push(...res.data);
- console.log(this.signList)
- this.loading = false;
- if(this.signList.length === 0) {this.isnodata2 = true}else{this.isnodata2 = false};
- },
- async getcreatedteamrecord(){
- PublicLib.ShowLoading({Message:''});
- const UserId = PublicLib.getCookieInfo('userId');
- const res = await getRequest('api/v1/teamapply/mylist',JSON.stringify({UserId,...this.pageinfo0}));
- if(res.status !== '1') return tips('获取组队记录失败,请重试!');
- PublicLib.HideLoading();
- if(res.data.length < this.pageinfo1.PageSize) {
- this.finished0 = true;
- this.tipsisshow0 = true;
- };
- this.teamInfo.push(...res.data);
- this.loading = false;
- if(this.teamInfo.length === 0) {this.isnodata = true}else{this.isnodata = false};
- },
- //- 提醒审核
- tipexamine:undebounce(async function(Id){
- const res = await postRequest('api/v1/teamapply/ring',JSON.stringify({Id}));
- if(res.status !== '1') return tips('提醒审核失败,请重试!');
- tips('提醒审核成功!');
- }),
- //- async tipexamine(Id){
- //- const res = await postRequest('api/v1/teamapply/ring',JSON.stringify({Id}));
- //- if(res.status !== '1') return tips('提醒审核失败,请重试!');
- //- tips('提醒审核成功!');
- //- },
- //- 取消报名
- async cancelsignup(Id){
- const res = await postRequest('api/v1/teamofferapply/cancelsignup',JSON.stringify({Id}));
- if(res.status !== '1') return tips('取消报名失败,请重试!');
- tips('报名取消成功!');
- this.getsignuprecord();
- },
- //- 取消报名
- tipsignup:undebounce(async function(Id){
- const res = await postRequest('api/v1/teamofferapply/ring',JSON.stringify({Id}));
- if(res.status !== '1') return tips('提醒审核失败,请重试!');
- tips('提醒审核成功!');
- }),
- //- 营训规则
- rules(){
- PublicLib.Goto({Url:'trainingCamp-rules'});
- }
- },
- });
- </script>
- </body>
- </html>
|