lsc 1 year ago
parent
commit
62e86efb80
2 changed files with 37 additions and 19 deletions
  1. 19 19
      src/components/courseDetail.vue
  2. 18 0
      src/components/studyStudent.vue

+ 19 - 19
src/components/courseDetail.vue

@@ -964,25 +964,25 @@ export default {
     // },
     async getInviteCode(cid) {
       let code = this.randomNumber();
-      let params = {
-        code: code,
-        oid: this.oid,
-      }
-      let type = 1
-      for (var i = 0; i < this.inviteCode.length; i++) {
-        if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
-          type = 2
-        }
-      }
-      if (type == 2) {
-        this.getInviteCode(cid)
-        return;
-      }
-      const res = await this.ajax.get(this.$store.state.api + "selectInviteCode2", params)
-      if (res.data.length && res.data[0].length && res.data[0][0].courseId != this.cid) {
-        this.getInviteCode(cid)
-        return;
-      }
+      // let params = {
+      //   code: code,
+      //   oid: this.oid,
+      // }
+      // let type = 1
+      // for (var i = 0; i < this.inviteCode.length; i++) {
+      //   if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
+      //     type = 2
+      //   }
+      // }
+      // if (type == 2) {
+      //   this.getInviteCode(cid)
+      //   return;
+      // }
+      // const res = await this.ajax.get(this.$store.state.api + "selectInviteCode2", params)
+      // if (res.data.length && res.data[0].length && res.data[0][0].courseId != this.cid) {
+      //   this.getInviteCode(cid)
+      //   return;
+      // }
 
       let array = []
       for (var i = 0; i < this.inviteCode.length; i++) {

+ 18 - 0
src/components/studyStudent.vue

@@ -7975,6 +7975,7 @@ export default {
           if(this.courseDetail.userid == this.userid && this.IsFollow){
             this.setCTask();
           }
+          this.setoTime();
           let _this = this;
           if (_this.timer) {
             clearInterval(_this.timer);
@@ -8021,6 +8022,23 @@ export default {
           console.error(err);
         });
     },
+    setoTime(){
+      let params = [
+        {
+          uid: this.userid,
+          cid: this.id,
+          type: '2',
+          time: '5',
+        },
+      ];
+      this.ajax
+        .post(this.$store.state.api + "addOperationTime2", params)
+        .then((res) => {
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
     addPz(type, content) {
       if (type == "1" && this.pzConText == "") {
         this.$message.error("批注不能为空!");