Browse Source

Merge branch '04/19-newPermission' into test

mo 4 years ago
parent
commit
2178917701
1 changed files with 19 additions and 3 deletions
  1. 19 3
      src/views/teamBuild/signupList.vue

+ 19 - 3
src/views/teamBuild/signupList.vue

@@ -58,10 +58,10 @@
             延长报名
           </div>
           <div class="newBand" @click="onCreateQRCode('payment')"   v-show="
-              status == 'PAY' ||
+              (status == 'PAY' ||
               status == 'APPLY' ||
               status == 'PROGRESS' ||
-              status == 'PREPARE'
+              status == 'PREPARE')&&ischeckCanReg
             ">报名链接</div>
           <div class="newBand" @click="onCreateQRCode('detail')">缴费详情</div>
           <div
@@ -94,6 +94,12 @@
             class="newBand"
             style="background-color: #f97215; border: 1px solid #f97215"
             @click="onCreateQRCode('rePayment')"
+             v-show="
+              (status == 'PAY' ||
+              status == 'APPLY' ||
+              status == 'PROGRESS' ||
+              status == 'PREPARE')&&ischeckCanReg
+            "
           >
             报名链接(无乐器)
           </div>
@@ -692,6 +698,7 @@ import {
   studentApplyDetailExport,
   StudentQuit,
   getMusicGroupGradeList,
+  checkCanReg
 } from "@/api/buildTeam";
 import mergeMusic from "./components/merge-music";
 import forecastList from "./components/forecast-list";
@@ -844,6 +851,7 @@ export default {
       applyDates: this.applyDate(),
       detail: null,
       gradeList: [],
+      ischeckCanReg:false
     };
   },
   created() {},
@@ -858,13 +866,21 @@ export default {
     permission(str) {
       return permission(str);
     },
-    init() {
+   async init() {
       this.status = this.$route.query.team_status;
       // 通过乐团id 获取乐团招生状态
       this.id = this.$route.query.id;
       this.teamName = this.$route.query.name;
       // 判断是否带缓存参数
       this.pickerOptions = this.beginDate(new Date());
+      // checkCanReg
+      try{
+       this.ischeckCanReg = await (await checkCanReg({musicGroupId:this.id})).data
+       console.log(this.ischeckCanReg)
+      }catch(e){
+        console.log(e)
+      }
+
 
       getMusicGroupGradeList({ musicGroupId: this.id }).then((res) => {
         let result = res.data;