我的页面

This commit is contained in:
姚亚男
2021-10-11 16:49:22 +08:00
parent e4e2740c0b
commit 224833685d
28 changed files with 216 additions and 5738 deletions
+10 -15
View File
@@ -5,22 +5,17 @@ App({
const logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
wx.setStorage({
key:"key",
data:"登录过,存到了缓存flag,跳转首页"
wx.getStorage({
key: 'X-Access-Token',
success: (res) =>{// 缓存中登录过,直接进小程序
wx.switchTab({
url: 'pages/home/home',
})
},
fail: function(){
// 缓存中没有登录过默认app.json的登录页
}
})
// wx.getStorage({
// key: 'key',
// success (res) {// 缓存中登录过,直接进小程序
// console.log(res.data)
// wx.switchTab({
// url: '../home/home',
// })
// },
// fail: function(){
// // 缓存中没有登录过默认app.json的登录页
// }
// })
// 登录
wx.login({
success: res => {