|
| xqd
@@ -19,31 +19,34 @@ Page({
|
|
|
// this.userLogin()
|
|
|
this.getInfo()
|
|
|
var that = this
|
|
|
- wx.getStorage({
|
|
|
- key: 'logDate',
|
|
|
- success: function (res) {
|
|
|
- console.log('prelogDate:' + res.data)
|
|
|
- var nowDate = new Date()
|
|
|
- if (nowDate - res.data < 30 * 60 * 1000) {
|
|
|
- console.log(nowDate - res.data)
|
|
|
- wx.getStorage({
|
|
|
- key: 'userid',
|
|
|
- success: function (res) {
|
|
|
- wx.showLoading({
|
|
|
- title: '正在自动登录',
|
|
|
- })
|
|
|
- var app = getApp()
|
|
|
- app.userinfo.userid = res.data
|
|
|
- console.log(getApp().userinfo.userid)
|
|
|
- wx.navigateTo({
|
|
|
- url: "info/info",
|
|
|
- })
|
|
|
- },
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
- })
|
|
|
-
|
|
|
+ try{
|
|
|
+ wx.getStorage({
|
|
|
+ key: 'logDate',
|
|
|
+ success: function (res) {
|
|
|
+ console.log('prelogDate:' + res.data)
|
|
|
+ var nowDate = new Date()
|
|
|
+ if (nowDate - res.data < 30 * 60 * 1000) {
|
|
|
+ console.log(nowDate - res.data)
|
|
|
+ wx.getStorage({
|
|
|
+ key: 'userid',
|
|
|
+ success: function (res) {
|
|
|
+ wx.showLoading({
|
|
|
+ title: '正在自动登录',
|
|
|
+ })
|
|
|
+ var app = getApp()
|
|
|
+ app.userinfo.userid = res.data
|
|
|
+ console.log(getApp().userinfo.userid)
|
|
|
+ wx.navigateTo({
|
|
|
+ url: "info/info",
|
|
|
+ })
|
|
|
+ },
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ })
|
|
|
+ }catch(e){
|
|
|
+
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
/**
|