Commit 924f2d51 authored by 肖健's avatar 肖健

扫一扫逻辑完善

parent 4be25f2d
...@@ -200,24 +200,13 @@ export default { ...@@ -200,24 +200,13 @@ export default {
}, },
}, },
onLoad(e) { //默认加载 onLoad(e) { //默认加载
this.wechatLogin() this.wechatLogin()
var pages = getCurrentPages();
var page = pages[pages.length - 1];
const res= decodeURIComponent(page.options);
console.log(res.scene);
uni.showToast({
title:'授权123' + res.scene,
icon:'none',
})
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
if(e.query) { if(e.scene) {
//获取二维码携带的参数 //获取二维码携带的参数
//扫码后得到的参数 //扫码后得到的参数
let scene = decodeURIComponent(e.query) let scene = decodeURIComponent(e.scene)
// scene = scene.split('&') // scene = scene.split('&')
// let data = { // let data = {
// //场景值 // //场景值
...@@ -225,7 +214,7 @@ export default { ...@@ -225,7 +214,7 @@ export default {
// } // }
this.scene = scene; this.scene = scene;
} }
let userToken = uni.getStorageSync('userToken') let userToken = uni.getStorageSync('userToken')
......
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