|
@@ -10,21 +10,15 @@
|
|
export default {
|
|
export default {
|
|
// creat by wgy 0619 生命周期 钩子
|
|
// creat by wgy 0619 生命周期 钩子
|
|
onLaunch: function() {
|
|
onLaunch: function() {
|
|
- console.log('App Launch')
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ //console.log('App Launch')
|
|
},
|
|
},
|
|
onShow: function() {
|
|
onShow: function() {
|
|
- console.log('App Show')
|
|
|
|
// #ifdef APP-PLUS
|
|
// #ifdef APP-PLUS
|
|
- if (cacheManager.get('auth')) {
|
|
|
|
- console.log('有auth')
|
|
|
|
|
|
+ if (cacheManager.get('auth')) {
|
|
uni.redirectTo({
|
|
uni.redirectTo({
|
|
url: `/pages/study/index`
|
|
url: `/pages/study/index`
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
- console.log('wuasdasdasdsaauth')
|
|
|
|
cacheManager.clearAll()
|
|
cacheManager.clearAll()
|
|
uni.redirectTo({
|
|
uni.redirectTo({
|
|
url: '/pages/login/index'
|
|
url: '/pages/login/index'
|
|
@@ -32,15 +26,13 @@
|
|
}
|
|
}
|
|
const webview = plus.webview.currentWebview();
|
|
const webview = plus.webview.currentWebview();
|
|
plus.key.addEventListener('backbutton', () => {
|
|
plus.key.addEventListener('backbutton', () => {
|
|
- console.log('12312312312312231231');
|
|
|
|
event.preventDefault();
|
|
event.preventDefault();
|
|
return false
|
|
return false
|
|
});
|
|
});
|
|
// #endif
|
|
// #endif
|
|
-
|
|
|
|
},
|
|
},
|
|
onHide: function() {
|
|
onHide: function() {
|
|
- console.log('App Hide')
|
|
|
|
|
|
+ // console.log('App Hide')
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|