lsc 2 years ago
parent
commit
8977c3ebfa

+ 1 - 1
dist/index.html

@@ -18,7 +18,7 @@
       border-radius: 10px;
       -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
       background-color: rgba(0, 0, 0, 0.1);
-    }</style><link href=./static/css/app.03375c2262343fd733553a0c1200a8f3.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.b9b15ae4f82d2f85be9d.js></script><script type=text/javascript src=./static/js/app.71754730ea2858c4af58.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.d6011e32c275c1e5a0419a33eb4d894e.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.b9b15ae4f82d2f85be9d.js></script><script type=text/javascript src=./static/js/app.bfb746116e557a95bda6.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.d6011e32c275c1e5a0419a33eb4d894e.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.d6011e32c275c1e5a0419a33eb4d894e.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.71754730ea2858c4af58.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.bfb746116e557a95bda6.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.bfb746116e557a95bda6.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


+ 53 - 2
src/components/courseDetail.vue

@@ -870,7 +870,54 @@ export default {
           console.error(err);
         });
     },
-    getCourseDetail() {
+    getCourseDetail1() {
+      const loading = this.$loading.service({
+        background: "rgba(255, 255, 255, 0.7)",
+        target: document.querySelector(".student_table"),
+      });
+      let params = {
+        courseId: this.id,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectCourseDetail2", params)
+        .then((res) => {
+          loading.close();
+          // this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
+          this.courseDetail = res.data[0][0];
+          var a = res.data[0];
+          var b = res.data[1];
+          var c = res.data[2];
+          for (var i = 0; i < b.length; i++) {
+            // if (!this.id) {
+            //   this.courseType[b[i].id] = [];
+            // }
+            for (var j = 0; j < a.length; j++) {
+              if (b[i].id == a[j].pid) {
+                if (!this.courseTypeJson[b[i].name]) {
+                  this.courseType.push(b[i].name);
+                  this.courseTypeJson[b[i].name] = [];
+                }
+                this.courseTypeJson[b[i].name].push(a[j].name);
+              }
+            }
+          }
+          for (var k = 0; k < c.length; k++) {
+            this.Tname.push(c[k].name);
+          }
+          console.log(this.courseTypeJson.length);
+          this.aStudentName = res.data[2];
+          this.chapInfo = JSON.parse(this.courseDetail.chapters);
+          for (var z = 0; z < this.chapInfo.length; z++) {
+            this.rw += this.chapInfo[z].chapterInfo[0].taskJson.length;
+          }
+          // debugger
+        })
+        .catch((err) => {
+          loading.close();
+          console.error(err);
+        });
+    },
+    getCourseDetail2() {
       const loading = this.$loading.service({
         background: "rgba(255, 255, 255, 0.7)",
         target: document.querySelector(".student_table"),
@@ -1057,7 +1104,11 @@ export default {
     // },
   },
   created() {
-    this.getCourseDetail();
+    if(this.tType == 1 || this.tType == 4){
+      this.getCourseDetail2();
+    }else{
+      this.getCourseDetail1();
+    }
     this.getUser();
     document.scrollingElement.scrollTop = 0;
     // this.getSName();

Some files were not shown because too many files changed in this diff