trainingCamp-active.html 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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 activetitle">
  28. <div class="tips abs df">
  29. <div class="business df cm"><img src="./static/images/training-more.png" alt="">
  30. <div class="boxcenter dib">
  31. <div class="text c333 f12 tr df"><span>团队参与</span><span class="num f14">9</span></div>
  32. <div class="text c333 f12 tr df"> <span>团队排名</span><span class="num f14">9</span></div>
  33. </div>
  34. </div>
  35. <div class="business cm"><img src="./static/images/training-only.png" alt="">
  36. <div class="boxcenter dib">
  37. <div class="text c333 f12 tr df"><span>个人参与</span><span class="num f14">9</span></div>
  38. <div class="text c333 f12 tr df"> <span>个人排名</span><span class="num f14">9</span></div>
  39. </div>
  40. </div>
  41. </div>
  42. <div class="panel bgcfff abs">
  43. <div class="title df">
  44. <div>
  45. <div class="camp f18 c333 b">{{teaminfo.TeamName}}</div>
  46. <div class="slogan f12 c999">{{teaminfo.WatchWord}}</div>
  47. </div>
  48. <div class="tr vt">
  49. <button class="sign activelogo" v-if="teaminfo.Status === 1"> <img src="./static/images/index-camp-conduct.png" alt=""><span class="f12">进行中</span></button>
  50. <div style="opacity: 0;">这个div是为了布局</div>
  51. </div>
  52. </div>
  53. <div class="info">
  54. <div class="df dfsb ovh">
  55. <div class="f12 c666 flex2 mr12">
  56. <div>队长:{{teaminfo.captain}} {{teaminfo.makerCode}}</div>
  57. <div style="white-space:nowrap;">时间:{{teaminfo.EffectStartDate}}~{{teaminfo.EffectEndDate}}</div>
  58. </div>
  59. <div class="f12 c666">
  60. <div>人数:{{teaminfo.MinUserNum}}~{{teaminfo.MaxUserNum}}人</div>
  61. <div style="white-space:nowrap;">地点:{{teaminfo.Areas}}</div>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. <van-list v-model="loading" :finished="finished" finished-text="没有更多数据了" @load="onLoad" :immediate-check="false">
  68. <div class="camp_unactive_member pl16 pr16 activetitle_camp_title">
  69. <div class="title f16 b">团队成员<span class="f12 n">({{fullmembernum}}人)</span></div>
  70. <div>
  71. <div class="membercard df" v-for="item in fullmemberList" :key="item">
  72. <div class="userinfo"><img :src="item.HeadPhoto" alt="">
  73. <div class="boxcenter dib">
  74. <div class="top f14 c333 df">{{item.Name}}
  75. <div class="captain f12" v-if="item.IsTeamLeader === 1">队长</div><span class="ml12">{{item.Code}}</span>
  76. </div>
  77. <div class="bottom c999 f12">报名日期 {{item.EnterDate}}</div>
  78. </div>
  79. </div>
  80. <div class="usernum f14 c666">参与20户</div>
  81. </div>
  82. </div>
  83. </div>
  84. </van-list>
  85. </van-pull-refresh>
  86. </div>
  87. <script src="./static/js/klm-vv.min.js"></script>
  88. <script src="./static/js/klm-axios-config.js"></script>
  89. <script>
  90. // 在 #app 标签下渲染一个按钮组件
  91. let app = new Vue({
  92. el: '#app',
  93. data() {
  94. return {
  95. toptitleisshow:true,
  96. //- 滚动加载
  97. loading: false,
  98. finished: false,
  99. //- 刷新
  100. refreshing: false,
  101. fullmembernum:0,
  102. teaminfo:{
  103. },
  104. fullmemberList:[
  105. ],
  106. pageinfo:{
  107. PageSize:10,
  108. PageNum:1
  109. },
  110. }
  111. },
  112. created() {
  113. this.getteaminfo();
  114. this.getmemberslist();
  115. },
  116. methods: {
  117. comeback(){
  118. PublicLib.GoBack({Level:1});
  119. },
  120. //- 点击规则
  121. rules(){
  122. PublicLib.Goto({Url:'trainingCamp-rules'});
  123. },
  124. onLoad() {
  125. if (this.refreshing) {
  126. this.fullmemberList = [];
  127. this.refreshing = false;
  128. this.pageinfo.PageNum = 0;
  129. };
  130. this.pageinfo.PageNum++;
  131. this.getmemberslist();
  132. },
  133. onRefresh() {
  134. // 清空列表数据
  135. this.finished = false;
  136. // 重新加载数据
  137. // 将 loading 设置为 true,表示处于加载状态
  138. this.loading = true;
  139. this.onLoad();
  140. },
  141. //- 获取团队信息
  142. async getteaminfo(){
  143. PublicLib.ShowLoading({Message:''});
  144. const Id = PublicLib.getCookieInfo('trainingCampteamId');
  145. const res = await getRequest('/api/v1/teamapply/detail',JSON.stringify({Id}));
  146. if(res.status !== '1') return tips('获取团队详情失败,请重试!');
  147. PublicLib.HideLoading();
  148. this.teaminfo = res.data;
  149. //- this.teaminfo.EffectStartDate = '2020-02-17';
  150. //- this.teaminfo.EffectEndDate= '2020-02-17';
  151. },
  152. //- 获取队员列表
  153. async getmemberslist(){
  154. const TeamId = PublicLib.getCookieInfo('trainingCampteamId');
  155. const res = await getRequest('/api/v1/teamofferapply/memberlist',JSON.stringify({TeamId,...this.pageinfo}));
  156. if(res.status !== '1') return tips('获取成员列表失败,请重试!');
  157. if(res.data.length<this.pageinfo.PageSize) {
  158. this.finished = true;
  159. };
  160. this.fullmemberList.push(...res.data);
  161. //- this.fullmembernum = res.other.Count
  162. this.loading = false;
  163. console.log(res)
  164. },
  165. },
  166. });
  167. </script>
  168. </body>
  169. </html>