登录ui和逻辑优化

main
zhangqun 2 years ago
parent 0b9b776eed
commit 4b5f6e6cfc
  1. 2
      App.vue
  2. 5
      pages/home/home.vue
  3. 20
      pages/login/login.vue

@ -45,7 +45,7 @@
onShow: function() {
console.log('App Show')
if(!uni.getStorageSync('satoken')) {
uni.navigateTo({
uni.redirectTo({
url: '/pages/login/login'
})
}

@ -20,6 +20,11 @@
onShow() {
if (uni.getStorageSync('satoken') && this.routeData.length == 0) {
this.getRouters();
}else if (!uni.getStorageSync('satoken')){
console.log('未登录')
uni.redirectTo({
url: '/pages/login/login'
})
}
},
methods: {

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save