wx.scanCode扫码成功后跳转问题
wx.scanCode扫码成功后应直接跳转指定页面,而不是先返回扫描入口页再跳转指定页面
wx.scanCode({
success: (res) => {
const result = res.result;
wx.navigateTo({
url: '/pages/store/stock/stock?id=' + id + '&tiaoma=' + result
})
},
fail: (res) => {
wx.showToast({
title: '扫描失败',
icon: 'fail',
duration: 2000
})
},
})