wx.scanCode在红米5plus中获取不到链接中的参数?
wx.scanCode在红米5plus中获取不到链接中的参数
// 扫码绑定站点
scancode(e) {
const that = this;
wx.scanCode({
scanType: 'QR_CODE',
success(res) {
if (null == app.globalData.UNIQUENUM) {
that.setData({
user_access: true
})
if (res !== undefined) {
let scan_urls = decodeURIComponent(res.result);
that.setData({
shopId: cry.getQueryString(scan_urls, 'shopId'),
})
}
} else {
if (res !== undefined) {
let scan_urls = decodeURIComponent(res.result);
that.setData({
shopId: cry.getQueryString(scan_urls, 'shopId'),
})
console.log(that.data.shopId + '{{}}')
let bidingParam = {
UNIQUENUM: app.globalData.UNIQUENUM,
OAUTHCODE: app.globalData.OAUTHCODE,
phoneNum: app.globalData.phoneNum,
shopId: that.data.shopId
}
api.request(apiName.courierBindingShop, bidingParam).then((res) => {
if (res.data.code == "SUCCESS") {
wx.showToast({
title: '绑定成功',
duration: 2500,
mask: true,
icon: 'none',
success() {
setTimeout(function () {
that.onPullDownRefresh()
}, 1000)
}
})
} else {
wx.showToast({
title: res.data.message,
duration: 2500,
mask: true,
icon: 'none',
})
}
})
// 绑定站点
} else {
wx.showToast({
title: '未获取到站点Id',
duration: 3000,
mask: true,
icon: "none"
})
}
}
},
})
}
res.result返回的一直是null,其他机型正常。