From c9b04218ebd51d484ee4f662d24edc711ae7b7e6 Mon Sep 17 00:00:00 2001
From: QYF-GitLab1 <1940665526@qq.com>
Date: 星期三, 18 十二月 2024 17:50:00 +0800
Subject: [PATCH] 1

---
 pages/home/home.js |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/pages/home/home.js b/pages/home/home.js
index 75fef81..a70fd1b 100644
--- a/pages/home/home.js
+++ b/pages/home/home.js
@@ -648,10 +648,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