Commit 852e0600 authored by sjf1256754123's avatar sjf1256754123

Update index.vue

parent c8bac2dd
...@@ -116,13 +116,19 @@ ...@@ -116,13 +116,19 @@
// 允许从相机和相册扫码 // 允许从相机和相册扫码
wx.scanCode({ wx.scanCode({
success: (res) => { success: (res) => {
console.log(res) if(res.result.indexOf('userId')>-1){
_this.userId = res.result; _this.userId = res.result;
if(_this.securityFlag&&_this.userId){ if(_this.securityFlag&&_this.userId){
uni.navigateTo({ uni.navigateTo({
url: `/pages/security/security?userId=${_this.userId}` url: `/pages/security/security?userId=${_this.userId}`
}) })
} }
}else{
uni.showToast({
icon: 'none',
title: '请扫描小程序首页内的二维码!'
})
}
} }
}) })
}else{ }else{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment