智慧保安互联网APP
shuishen
2021-07-30 273beff9c110f6c4753b9436d872a9fa8d63b7d3
utils/func.js
@@ -6,6 +6,7 @@
      vm.$u.vuex('userInfo', userInfo)
      vm.$u.vuex('accessToken', userInfo.access_token)
      vm.$u.vuex('isLogin', true)
      console.log(vm)
      uni.switchTab({
         url: '/pages/home/home'
      })
@@ -27,6 +28,7 @@
   // 检查登录状态
   const checkLogin = (e = {}) => {
      if (!vm.isLogin) {
         uni.navigateTo({
            url: '/pages/login/login-account'
@@ -38,6 +40,7 @@
   // 跳转路由前检查登录状态
   const route = (url) => {
      console.log(vm)
      if (!vm.isLogin) {
         uni.showToast({
            title: '请先登录',