trainingCamp-examine.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>首页-特训营-爽客邦</title>
  6. <meta name="keywords" content="首页-特训营-爽客邦">
  7. <meta name="description" content="首页-特训营-爽客邦">
  8. <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
  9. <meta name="apple-mobile-web-app-capable" content="yes">
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  11. <meta content="telephone=no" name="format-detection">
  12. <meta content="email=no" name="format-detection">
  13. <meta name="apple-mobile-web-app-title" content="首页-特训营-爽客邦">
  14. <meta http-equiv="Cache-Control" content="no-siteapp">
  15. <link rel="stylesheet" href="./static/css/main.css">
  16. </head>
  17. <body class="train">
  18. <div id="app">
  19. <van-sticky>
  20. <van-nav-bar class="camp_unactive_title f16" :title="teaminfo.TeamName" v-if="toptitleisshow" right-text="营训规则" @click-right="rules" left-arrow @click-left="comeback">
  21. <template #left>
  22. <van-icon name="arrow-left" color="#fff" size="20"></van-icon>
  23. </template>
  24. </van-nav-bar>
  25. </van-sticky>
  26. <van-pull-refresh v-model="refreshing" @refresh="onRefresh" v-cloak>
  27. <div class="camp_unactive_titlebox rel">
  28. <div class="panel bgcfff abs">
  29. <div class="title df">
  30. <div>
  31. <div class="camp f18 c333 b">{{teaminfo.TeamName}}</div>
  32. <div class="slogan f12 c999">{{teaminfo.WatchWord}}</div>
  33. </div>
  34. <div class="tr">
  35. <button class="sign" v-if="teaminfo.Status === 3"><img src="./static/images/index-camp-unactive.png" alt=""><span class="f12">审核中</span></button>
  36. <div class="begin f12" style="opacity: 0;">离开始还剩:{{teaminfo.OverDays}}天</div>
  37. </div>
  38. </div>
  39. <div class="info">
  40. <div class="df dfsb ovh">
  41. <div class="f12 c666 flex2 mr12">
  42. <div>队长:{{teaminfo.captain}} {{teaminfo.makerCode}}</div>
  43. <div style="white-space:nowrap;">时间:{{teaminfo.EffectStartDate}}~{{teaminfo.EffectEndDate}}</div>
  44. </div>
  45. <div class="f12 c666">
  46. <div>人数:{{teaminfo.MinUserNum}}~{{teaminfo.MaxUserNum}}人</div>
  47. <div style="white-space:nowrap;">地点:{{teaminfo.Areas}}</div>
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. </div>
  53. <div class="camp_unactive_member pl16 pr16" style="margin-top:3.04rem">
  54. <div class="title f16 b">团队成员<span class="f12 n">({{fullmemberList.length}}人)</span></div>
  55. <van-list v-model="loading" :finished="finished" finished-text="没有更多数据了" @load="onLoad" :immediate-check="false">
  56. <div class="membercard df" v-for="item in fullmemberList" :key="item">
  57. <div class="userinfo"><img :src="item.HeadPhoto" alt="">
  58. <div class="boxcenter dib">
  59. <div class="top f14 c333 df">{{item.Name}}
  60. <div class="captain f12" v-if="item.IsTeamLeader === 1">队长</div><span class="ml12">{{item.Code}}</span>
  61. </div>
  62. <div class="bottom c999 f12">报名日期 {{item.EnterDate}}</div>
  63. </div>
  64. </div>
  65. </div>
  66. </van-list>
  67. </div>
  68. </van-pull-refresh>
  69. </div>
  70. <script src="./static/js/klm-vv.min.js"></script>
  71. <script src="./static/js/klm-axios-config.js"></script>
  72. <script>
  73. // 在 #app 标签下渲染一个按钮组件
  74. let app = new Vue({
  75. el: '#app',
  76. data() {
  77. return {
  78. toptitleisshow:true,
  79. //- 滚动加载
  80. loading: false,
  81. finished: false,
  82. //- 刷新
  83. refreshing: false,
  84. teaminfo:{
  85. },
  86. fullmemberList:[
  87. ],
  88. pageinfo:{
  89. PageSize:10,
  90. PageNum:1
  91. },
  92. }
  93. },
  94. created() {
  95. this.getteaminfo();
  96. this.getmemberslist();
  97. },
  98. methods: {
  99. comeback(){
  100. PublicLib.GoBack({Level:1});
  101. },
  102. //- 点击规则
  103. rules(){
  104. PublicLib.Goto({Url:'trainingCamp-rules'});
  105. },
  106. onLoad() {
  107. if (this.refreshing) {
  108. this.fullmemberList = [];
  109. this.refreshing = false;
  110. this.pageinfo.PageNum = 0;
  111. }
  112. this.pageinfo.PageNum++;
  113. this.getmemberslist();
  114. },
  115. onRefresh() {
  116. // 清空列表数据
  117. this.finished = false;
  118. // 重新加载数据
  119. // 将 loading 设置为 true,表示处于加载状态
  120. this.loading = true;
  121. this.onLoad();
  122. },
  123. //- 获取团队信息
  124. async getteaminfo(){
  125. PublicLib.ShowLoading({Message:''});
  126. const Id = PublicLib.getCookieInfo('trainingCampteamId');
  127. const res = await getRequest('/api/v1/teamapply/detail',JSON.stringify({Id}));
  128. if(res.status !== '1') return tips('获取团队详情失败,请重试!');
  129. PublicLib.HideLoading();
  130. this.teaminfo = res.data;
  131. //- this.teaminfo.EffectStartDate = '2020-02-17';
  132. //- this.teaminfo.EffectEndDate= '2020-02-17';
  133. },
  134. //- 获取队员列表
  135. async getmemberslist(){
  136. const TeamId = PublicLib.getCookieInfo('trainingCampteamId');
  137. const res = await getRequest('/api/v1/teamofferapply/memberlist',JSON.stringify({TeamId,...this.pageinfo}));
  138. if(res.status !== '1') return tips('获取成员列表失败,请重试!');
  139. if(res.data.length<this.pageinfo.PageSize) {
  140. this.finished = true;
  141. };
  142. this.fullmemberList.push(...res.data);
  143. //- this.fullmembernum = res.other.Count
  144. this.loading = false;
  145. console.log(res)
  146. },
  147. },
  148. });
  149. </script>
  150. </body>
  151. </html>