From c6c73b7d709322052b9cd6777b3d6657e0d43d30 Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期六, 07 九月 2024 14:37:32 +0800
Subject: [PATCH] bug

---
 pages/digitalCourses/index.js |   29 ++++++++++++++++++++---------
 1 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/pages/digitalCourses/index.js b/pages/digitalCourses/index.js
index 4abba99..27075df 100644
--- a/pages/digitalCourses/index.js
+++ b/pages/digitalCourses/index.js
@@ -45,7 +45,8 @@
         },
       ],
     },
-    sortActive: ''
+    sortActive: '',
+    otherType: null
   },
 
   /**
@@ -132,10 +133,10 @@
     })
     const data = {
       path: '*',
-      filterList: [{
-        value: 'Normal',
-        field: 'state'
-      }],
+      // filterList: [{
+      //   value: 'Normal',
+      //   field: 'state'
+      // }],
       queryType: '\\',
       searchList: [],
       size: '20',
@@ -148,7 +149,15 @@
     }
     app.MG.store.getStoreChannelList(data).then((res) => {
       // 鍘婚櫎鏁扮粍鏈�鍚庝竴涓厓绱�
+      // 鎵惧嚭鍏朵粬鍒嗙被鐨刾ath锛岀敤浜庢帓闄ゅ叾浠栧垎绫婚噷鐨勬暟鎹�
+      this.data.otherType = res.datas.find(item => item.refCode == "jsek_dCOther")
+      res.datas = res.datas.filter(item => item.state == 'Normal')
       const newData = res.datas.slice(0, res.datas.length - 1)
+      newData.unshift({
+        name: "鍏ㄩ儴",
+        pathList: newData[0].pathList[0],
+        id: ""
+      })
       this.setData({
         tabList: newData,
         loading: false
@@ -197,7 +206,9 @@
     //     // 缁勫悎鐨勫啓娉� 瑕佹煡璇㈢殑瀛楁:鍗囧簭鍜岄檷搴�
     const obj = {
       storeInfo: app.config.goodsStore,
-      path: item.pathList + '\\' + item.id,
+      // path: item.pathList + '\\' + item.id,
+      path: item.id ? item.pathList + '\\' + item.id : item.pathList,
+      queryType: "*",
       coverSize: {
         width: 260
       },
@@ -222,12 +233,12 @@
     app.MG.store.getProductList(obj).then((res) => {
       res.datas.forEach(item => {
         item.price = item.price.toFixed(2)
+        item.productLinkInfo = JSON.parse(item.productLinkInfo)
       })
-
+      // 鎺掗櫎鍏朵粬鍒嗙被閲岀殑鏁版嵁
       this.setData({
-        courseList: res.datas
+        courseList: res.datas.filter(item => item.productLinkInfo[0].LinkPath != this.data.otherType.pathList[0] + '\\' + this.data.otherType.id)
       })
-
     })
   },
   searchBook() {

--
Gitblit v1.9.1