Lou
2024-04-28 d2f4d757191c4f892135ffcbbe03be6976f9234a
utils/func.js
@@ -11,7 +11,7 @@
const install = (Vue, vm) => {
   // 登录操作 1
   const login = async (userInfo) => {
   const login = async (userInfo, pageType) => {
      vm.$u.vuex('userInfo', userInfo)
      vm.$u.vuex('accessToken', userInfo.access_token)
      vm.$u.vuex('isLogin', true)
@@ -33,11 +33,16 @@
      let appMenu = data.filter(e => e.name == 'app')[0].children
      console.log("当前角色菜单:", appMenu)
      store.commit('SET_MENU', appMenu)
      //跳转到首页
      uni.switchTab({
         url: '/pages/home/index'
      })
      if (pageType == 4 && resDetail.data.roleAlias == "mj") {
         uni.navigateTo({
            url: '/subPackage/school/security'
         })
      } else {
         //跳转到首页
         uni.switchTab({
            url: '/pages/home/index'
         })
      }
   }
@@ -53,7 +58,9 @@
      if (uni.getStorageSync("pageType")) {
         uni.removeStorageSync("pageType")
      }
      if (uni.getStorageSync("houseCode")) {
         uni.removeStorageSync("houseCode")
      }
      uni.redirectTo({
         url: '/pages/login/login-account'
      })