谢杰标 2 yıl önce
ebeveyn
işleme
b7c02751a1
2 değiştirilmiş dosya ile 24 ekleme ve 5 silme
  1. 1 1
      pages/learn/index.vue
  2. 23 4
      pages3/polyv/detail.vue

+ 1 - 1
pages/learn/index.vue

@@ -1189,7 +1189,7 @@ export default {
                 if (res.data.total > 1) {
                   // this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
                   uni.navigateTo({
-                    url: `/pages3/polyv/detail?id=''&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}&gradeId=${item.gradeId}`,
+                    url: `/pages3/polyv/detail?goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}&gradeId=${item.gradeId}`,
                   });
                 } else if (res.data.total == 1) {
                   uni.navigateTo({

+ 23 - 4
pages3/polyv/detail.vue

@@ -967,23 +967,25 @@ export default {
       return;
     }
     !this.userInfo && this.$api.refreshUserInfo();
+    option.informId && this.clickOfficial(option.informId);
+
     this.courseId = Number(option.id) || "";
     this.goodsId = Number(option.goodsId);
     this.orderGoodsId = Number(option.orderGoodsId) || "";
     this.gradeId = option.gradeId;
     this.option = option;
-    // 公众号模板消息的数据埋点
-    option.informId && this.clickOfficial(option.informId);
+    
     if (this.option.skipPort) {
       await this.$method.skipLogin(this.option.skipPort);
     }
     if (this.$method.isGoLogin()) {
       return;
     }
+    await getPlaySection()
     this.courseCourseList();
   },
   async onShow() {
-    console.log('12123123')
+    console.log("12123123");
   },
   onUnload() {
     console.log("onUnloadonUnloadonUnloadonUnload");
@@ -1024,7 +1026,8 @@ export default {
         })
         .then((res) => {
           if (res.data.code == 200) {
-            this.courseList.push.apply(this.courseList, res.data.rows);
+            console.log(res.data,res.data.rows)
+            this.courseList = res.data.rows;
             // 科目
             let allItem = [{ subjectId: 0, subjectName: "所有" }];
             let ids = [];
@@ -1059,6 +1062,21 @@ export default {
       });
     },
     // 查询用户最后一次看的录播的信息
+    getPlaySection() {
+     return this.$http({
+        url: "/study/record/getUserWatchLast",
+        method: "get",
+        data: {
+          orderGoodsId: this.orderGoodsId,
+        },
+      }).then((res) => {
+        if (res.data.code == 200) {
+          this.sectionItem = res.data.data || {};
+        }
+        return Promise.resolve()
+      });
+    },
+    // 查询用户最后一次看的录播的信息
     getUserWatchLast() {
       this.$http({
         url: "/study/record/getUserWatchLast",
@@ -1068,6 +1086,7 @@ export default {
         },
       }).then((res) => {
         if (res.data.code == 200) {
+          console.log(res.data)
           this.sectionItem = res.data.data || {};
           if (res.data.data && Object.keys(res.data.data).length) {
             //有最后一次看的录播的信息