浏览代码

提交测试

1
mo 4 年之前
父节点
当前提交
491b69680d

+ 1 - 0
src/views/resetTeaming/components/resetPayList.vue

@@ -577,6 +577,7 @@ export default {
   // },
   methods: {
     async init() {
+
       this.team_status = this.$route.query.team_status;
       try {
         const res = await getMusicGroupStu({

+ 1 - 0
src/views/resetTeaming/index.vue

@@ -319,6 +319,7 @@ export default {
     checkGoTo() {
       var p = new Promise(async (resolve, reject) => {
         if (this.activeIndex == 1 && this.$refs.teamBaseInfo) {
+
           if (await this.$refs.teamBaseInfo.setStore('go')) {
             resolve();
           }

+ 16 - 9
src/views/teamBuild/components/teamBaseInfo.vue

@@ -719,10 +719,11 @@ export default {
     chioseSchool(val) {},
     async gotoNext(str) {
       let tempStatus
-      await this.$refs["topinfo"].validate(async (valid, object) => {
+    return new Promise((resolve, reject)=>{
+       this.$refs["topinfo"].validate(async (valid, object) => {
         if (!valid) {
           this.$message.error("请填写建团必要参数");
-          tempStatus = false
+         reject()
         } else {
           // 判断一下是否勾选了课程类型而没有输入金额
           // 验证通过
@@ -732,18 +733,22 @@ export default {
             this.$emit("handleClick", { name: "2" });
           } else {
                this.$emit("getName", this.topFrom.name);
-               console.log(str)
+
                tempStatus = await this.resetSubmit(str);
+               console.log(tempStatus,'tempStatus')
+           resolve(tempStatus)
 
           }
         }
       });
-      return tempStatus
+    })
     },
     async resetSubmit(str) {
-      this.$refs["topinfo"].validate(async (valid, object) => {
+      return new Promise((resolve, reject)=>{
+           this.$refs["topinfo"].validate(async (valid, object) => {
         if (!valid) {
           this.$message.error("请填写必要参数");
+          reject()
         } else {
           let status = null;
           // 1.resetTeam 乐团修改
@@ -805,7 +810,7 @@ export default {
           // obj.musicGroupPaymentEntities = [];
           // createTeam
           if (this.teamStatus != "newTeam") {
-            await resetTeamBaseInfo(obj).then((res) => {
+           return await resetTeamBaseInfo(obj).then(async(res) => {
               if (res.code == 200) {
 
                 localStorage.setItem(
@@ -818,14 +823,15 @@ export default {
                   if(!str){
                      this.$emit("handleClick", { name: "2" });
                   }
-                  return true
+                      resolve(true)
+
                   // 跳到第二页
                 } else {
                   this.$message.success("修改乐团成功");
 
                   // this.$router.push({ path: '/teamLists', query: { id: this.teamid, name: this.topFrom.name } })
                 }
-                return true
+                 resolve(true)
               }
             });
           } else {
@@ -890,7 +896,8 @@ export default {
           // 发请求
         }
       });
-      return true
+      })
+
     },
     changeApplyTime(val) {
       this.$set(this.topFrom, "paymentValidStartDate", "");