lsc vor 2 Jahren
Ursprung
Commit
f56fd50e63
2 geänderte Dateien mit 14 neuen und 5 gelöschten Zeilen
  1. 1 1
      src/common/axios.config.js
  2. 13 4
      src/components/pages/components/worksDetail3.vue

+ 1 - 1
src/common/axios.config.js

@@ -1,6 +1,6 @@
 import axios from "axios"
 import qs from "qs"
-axios.defaults.timeout = 3000   //响应时间
+axios.defaults.timeout = 30000   //响应时间
 axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';        //配置请求头
 axios.defaults.baseURL = process.env.NODE_HOST;   //配置接口地址
 console.log(process.env)

+ 13 - 4
src/components/pages/components/worksDetail3.vue

@@ -934,7 +934,7 @@ export default {
           this.taskCount = this.dyList2[0].taskList[0].id;
           this.navId =
             this.dyList2[0].id + "-" + this.dyList2[0].taskList[0].id;
-        this.$forceUpdate();
+          this.$forceUpdate();
           // this.sInfo = res.data[0][0];
           // this.chapInfo = JSON.parse(res.data[0][0].chapters);
           // var chapters = JSON.parse(res.data[0][0].chapters);
@@ -1158,6 +1158,7 @@ export default {
           }
           this.dyList = dyList;
           this.userAarray = res.data[1];
+          this.lookWork()
         })
         .catch((err) => {
           console.error(err);
@@ -1544,13 +1545,21 @@ export default {
       // );
     },
   },
-  created() {
-    this.page = 1;
+  watch: {
+    uid(newValue, oldValue) {
+      this.getCourseDetail();
+      this.getClass();
+      this.getGroup();
+      this.getWorks();
+      // this.lookWork();
+    },
+  },
+  mounted() {
     this.getCourseDetail();
     this.getClass();
     this.getGroup();
     this.getWorks();
-    this.lookWork();
+    // this.lookWork();
   },
 };
 </script>