trainingCamp-signup.html 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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 style="padding:0;">
  18. <div id="app" v-cloak>
  19. <van-nav-bar class="training_sign_title" title="我要报名" @click-left="backrank" v-if="toptitleisshow" left-arrow>
  20. <template #left> <img src="./static/images/left.png" alt=""></template>
  21. </van-nav-bar>
  22. <div class="training_camp cm">
  23. <div class="signcard bgcfff df">
  24. <div class="title c333 f18">{{campinfo.TeamName}}</div>
  25. <div class="slogan f12 c999">{{campinfo.WatchWord}}</div>
  26. <div class="teaminfo f12 c666 firstinfo">队长: {{campinfo.RealName}} {{campinfo.MakerCode}}</div>
  27. <div class="teaminfo f12 c666">人数: {{campinfo.MinUserNum}}~{{campinfo.MaxUserNum}}人</div>
  28. <div class="teaminfo f12 c666">地点: {{campinfo.Areas}}</div>
  29. <div class="teaminfo f12 c666">时间: {{campinfo.EnterStartDate}}~{{campinfo.EnterEndDate}}</div>
  30. <div class="tips tc f12">报名通过后将无法取消~</div>
  31. <div class="df agreen">
  32. <van-checkbox v-model="ischecked">我已阅读并同意</van-checkbox>
  33. <div class="rules f12" @click="rules">营训规则</div>
  34. </div>
  35. <van-button class="sign f14 cfff" :disabled="ischecked ? false : true" @click="sign">立即报名</van-button>
  36. </div>
  37. </div>
  38. </div>
  39. <script src="./static/js/klm-vv.min.js"></script>
  40. <script src="./static/js/klm-axios-config.js"></script>
  41. <script>
  42. // 在 #app 标签下渲染一个按钮组件
  43. let app = new Vue({
  44. el: '#app',
  45. data() {
  46. return {
  47. toptitleisshow:false,
  48. campinfo:{
  49. },
  50. ischecked:false
  51. };
  52. },
  53. created() {
  54. this.toptitleisshow = toptitleisshow;
  55. this.campinfo = JSON.parse(PublicLib.getCookieInfo('signupiteminfo'));
  56. },
  57. methods: {
  58. //- 返回我的职级
  59. backrank(){
  60. PublicLib.GoBack({Level:1});
  61. },
  62. //- 立即报名
  63. async sign(){
  64. if(!this.ischecked) {
  65. return this.$toast.fail('请同意营训规则');
  66. };
  67. const UserId = PublicLib.getCookieInfo('userId');
  68. const res = await postRequest('/api/v1/teamapply/signup',JSON.stringify({UserId,Id:this.campinfo.Id}));
  69. if(res.status !== '1') return tips('报名失败,请重试!');
  70. this.$toast.success('报名成功!');
  71. //- 1s之后返回主页
  72. setTimeout(()=>{
  73. this.backrank();
  74. },1000);
  75. },
  76. rules(){
  77. PublicLib.Goto({Url:'trainingCamp-rules'});
  78. },
  79. }
  80. });
  81. </script>
  82. </body>
  83. </html>