From e609ca28af867e7a208b4c78cda300cb254d52ba Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期五, 20 十二月 2024 17:33:17 +0800 Subject: [PATCH] 教学互动隐藏 --- 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