扫描二维码时效fix

This commit is contained in:
limqhz
2020-08-30 21:31:11 +08:00
parent 4d11ab9c79
commit 798893e65d
3 changed files with 14 additions and 2 deletions

View File

@@ -1,4 +1,7 @@
// pages/home/index.js
import {
getCurrentPageUrl
} from './../../utils/util.js'
const app = getApp();
let s = '';
let m = 0;
@@ -206,6 +209,13 @@ Page({
//扫描二维码
sacnQRCode() {
if (!wx.getStorageSync('accessToken')) {
wx.setStorageSync('history', getCurrentPageUrl());
wx.redirectTo({
url: '/pages/login/index',
})
return
}
wx.scanCode({
success (res) {
// wx.showToast({