From 7513caed505efa2be0dfb0dafd168dd5af78f92d Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期四, 13 二月 2025 10:52:32 +0800
Subject: [PATCH] 云学习试读资源查看器处理

---
 pages/home/home.js |   28 +++++++++++++++++++++++-----
 1 files changed, 23 insertions(+), 5 deletions(-)

diff --git a/pages/home/home.js b/pages/home/home.js
index 75fef81..106412b 100644
--- a/pages/home/home.js
+++ b/pages/home/home.js
@@ -39,6 +39,7 @@
       value: false
     },
     loading: true,
+    showStateMenu: false, // 鏂板勾鍏憡寮圭獥
   },
   onShow() {
     this.setData({
@@ -50,8 +51,19 @@
       this.getShoppingCartList()
     }
     this.init();
+    // const stateMenu = wx.getStorageSync('stateMenu')
+    // if (stateMenu == 'true') {
+    //   this.setData({
+    //     showStateMenu: true
+    //   })
+    //   wx.setStorageSync('stateMenu', 'false')
+    // }
   },
-
+  closeStateMenu() {
+    this.setData({
+      showStateMenu: false
+    })
+  },
   onLoad() {
     this.getBannerList()
     const systInfo = wx.getSystemInfoSync();
@@ -648,10 +660,16 @@
       success(res) {
         console.log(res);
         if (res.errMsg == "scanCode:ok" && res.path || res.result) {
-          let path = res.path || res.result
-          wx.redirectTo({
-            url: '/' + path,
-          })
+          if (res.path) {
+            let path = res.path || res.result
+            wx.redirectTo({
+              url: '/' + path,
+            })
+          } else {
+            wx.redirectTo({
+              url: '/pages/scanResult/index?result=' + res.result,
+            })
+          }
         }
       }
     })

--
Gitblit v1.9.1