From 32986b54a0e2661f7ad6ed79f3ef12c4289eace9 Mon Sep 17 00:00:00 2001 From: zhongshujie <2862698242@qq.com> Date: 星期五, 20 十二月 2024 17:52:52 +0800 Subject: [PATCH] Merge refs/remotes/origin/master into refs/heads/master --- 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