trainingCamp-unactive.html 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  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 === 0"> <img src="./static/images/index-camp-unactive.png" alt=""><span class="f12">审核中</span></button>
  36. <div class="begin f12">离开始还剩:{{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 flex1">
  46. <div>人数:{{teaminfo.MinUserNum}}~{{teaminfo.MaxUserNum}}人</div>
  47. <div style="white-space:nowrap;">地点:{{teaminfo.Areas}}</div>
  48. </div>
  49. </div>
  50. </div>
  51. <div class="tips">组队审核备注:加油,组队拍照片拍视频</div>
  52. </div>
  53. </div>
  54. <div class="camp_unactive_member pl16 pr16">
  55. <div class="title f16 b">成员待审核<span class="f12 n">({{membernum}}人)</span></div>
  56. <div class="dpfinish">
  57. <van-list v-model="loading" :finished="finished" finished-text="没有更多数据了" @load="onLoad" :immediate-check="false">
  58. <div class="membercard df" v-for="item,index in memberList" :key="item">
  59. <div class="userinfo"><img :src="item.HeadPhoto" alt="">
  60. <div class="boxcenter dib">
  61. <div class="top f14 c333">{{item.Name}}<span class="ml12">{{item.Code}}</span></div>
  62. <div class="bottom c999 f12">{{item.EnterDate}}</div>
  63. </div>
  64. </div>
  65. <div class="btn">
  66. <button class="refuse c999 f12" @click="refuse(item.Id,index)">拒绝</button>
  67. <button class="agree cfff f12" @click="agree(item.Id,index)">同意</button>
  68. </div>
  69. </div>
  70. </van-list>
  71. </div>
  72. <div class="title f16 b">团队成员<span class="f12 n">({{fullmembernum}}人)</span></div>
  73. <div class="unactivepb">
  74. <van-list v-model="loading1" :finished="finished1" finished-text="没有更多数据了" @load="onLoad" :immediate-check="false">
  75. <div class="membercard df" v-for="item in fullmemberList" :key="item">
  76. <div class="userinfo"><img :src="item.HeadPhoto" alt="">
  77. <div class="boxcenter dib">
  78. <div class="top f14 c333 df">{{item.Name}}
  79. <div class="captain f12" v-if="item.IsTeamLeader === 1">队长</div><span class="ml12">{{item.Code}}</span>
  80. </div>
  81. <div class="bottom c999 f12">报名日期 {{item.EnterDate}}</div>
  82. </div>
  83. </div>
  84. </div>
  85. </van-list>
  86. </div>
  87. <button class="bottombtn fixed f14 cfff" @click="invitfrend">邀请好友加入队伍</button>
  88. </div>
  89. </van-pull-refresh>
  90. </div>
  91. <script src="./static/js/klm-vv.min.js"></script>
  92. <script src="./static/js/klm-axios-config.js"></script>
  93. <script>
  94. // 在 #app 标签下渲染一个按钮组件
  95. let app = new Vue({
  96. el: '#app',
  97. data() {
  98. return {
  99. toptitleisshow:true,
  100. //- 滚动加载
  101. loading: false,
  102. finished: false,
  103. //- 滚动加载
  104. loading1: false,
  105. finished1: false,
  106. //- 刷新
  107. refreshing: false,
  108. teaminfo:{
  109. },
  110. memberList:[
  111. {Name:'谭敏仪',Code:'H00000',EnterDate:'2019-08-01 20:22',HeadPhoto:'./static/images/user-img-color@3x.png',Id:1111},
  112. ],
  113. fullmemberList:[
  114. ],
  115. pageinfo:{
  116. PageSize:10,
  117. PageNum:1
  118. },
  119. membernum:0,
  120. fullmembernum:0,
  121. }
  122. },
  123. created() {
  124. this.getteaminfo();
  125. this.getauditmemberslist();
  126. this.getmemberslist();
  127. },
  128. methods: {
  129. comeback(){
  130. PublicLib.GoBack({Level:1});
  131. },
  132. //- 点击规则
  133. rules(){
  134. PublicLib.Goto({Url:'trainingCamp-rules'});
  135. },
  136. onLoad() {
  137. if (this.refreshing) {
  138. this.fullmemberList = [];
  139. this.memberList= [];
  140. this.refreshing = false;
  141. this.pageinfo.PageNum = 0;
  142. };
  143. this.pageinfo.PageNum++;
  144. if(!this.finished){
  145. this.getauditmemberslist();
  146. }
  147. if(!this.finished1){
  148. this.getmemberslist();
  149. }
  150. },
  151. onRefresh() {
  152. // 清空列表数据
  153. this.finished = false;
  154. this.finished1 = false;
  155. // 重新加载数据
  156. // 将 loading 设置为 true,表示处于加载状态
  157. this.loading = true;
  158. this.loading1 = true;
  159. this.onLoad();
  160. },
  161. invitfrend(){
  162. PublicLib.Goto({Url:'trainingCamp-invitefrend'});
  163. },
  164. //- 拒绝
  165. async refuse(Id,index){
  166. const res = await getRequest('/api/v1/teamapply/detail',JSON.stringify({Id,AuditResult:0}));
  167. if(res.status !== '1') return tips('操作失败,请重试!');
  168. tips('拒绝成功!','middle');
  169. this.memberList.splice(index,1);
  170. },
  171. //- 同意
  172. async agree(Id,index){
  173. const res = await getRequest('/api/v1/teamapply/detail',JSON.stringify({Id,AuditResult:1}));
  174. if(res.status !== '1') return tips('操作失败,请重试!');
  175. tips('成员入队成功!','middle');
  176. this.memberList.splice(index,1);
  177. //- 重新获取一次队员列表
  178. this.pageinfo.PageNum = 1;
  179. this.getmemberslist();
  180. },
  181. //- 获取团队信息
  182. async getteaminfo(){
  183. PublicLib.ShowLoading({Message:''});
  184. const Id = PublicLib.getCookieInfo('trainingCampteamId');
  185. const res = await getRequest('/api/v1/teamapply/detail',JSON.stringify({Id}));
  186. if(res.status !== '1') return tips('获取团队详情失败,请重试!');
  187. PublicLib.HideLoading();
  188. this.teaminfo = res.data;
  189. //- TODO:需要删除模拟数据
  190. //- this.teaminfo.EffectStartDate = '2020-02-17';
  191. //- this.teaminfo.EffectEndDate= '2020-02-17';
  192. },
  193. //- 获取审核列表
  194. async getauditmemberslist(){
  195. const TeamId = PublicLib.getCookieInfo('trainingCampteamId');
  196. const res = await getRequest('/api/v1/teamofferapply/auditmembers',JSON.stringify({TeamId,...this.pageinfo}));
  197. if(res.status !== '1') return tips('获取审核列表失败,请重试!');
  198. if(res.data.length<this.pageinfo.PageSize) {
  199. this.finished = true;
  200. };
  201. this.memberList.push(...res.data);
  202. this.membernum = res.other.Count;
  203. this.loading = false;
  204. },
  205. //- 获取队员列表
  206. async getmemberslist(){
  207. const TeamId = PublicLib.getCookieInfo('trainingCampteamId');
  208. const res = await getRequest('/api/v1/teamofferapply/memberlist',JSON.stringify({TeamId,...this.pageinfo}));
  209. if(res.status !== '1') return tips('获取成员列表失败,请重试!');
  210. if(res.data.length<this.pageinfo.PageSize) {
  211. this.finished1 = true;
  212. };
  213. this.fullmemberList.push(...res.data);
  214. //- this.fullmembernum = res.other.Count
  215. this.loading1 = false;
  216. },
  217. },
  218. });
  219. </script>
  220. </body>
  221. </html>