debug 删除

fix login页面没正确跳转的bug
This commit is contained in:
damonyuan 2024-11-18 14:29:54 +08:00
parent 9aef056550
commit b68839128f
2 changed files with 9 additions and 5 deletions

View File

@ -245,6 +245,7 @@ import wechatOa, { UrlScene } from '@/utils/wechat'
// #endif
import { onLoad, onShow } from '@dcloudio/uni-app'
import { computed, reactive, ref, shallowRef, watch } from 'vue'
import { storeToRefs } from 'pinia'
enum LoginWayEnum {
ACCOUNT = 1,
@ -259,6 +260,7 @@ isWeixin.value = isWeixinClient()
const route = useRoute()
const router = useRouter()
const userStore = useUserStore()
const { userInfo, isLogin } = storeToRefs(userStore)
const appStore = useAppStore()
const showModel = ref(false)
const uCodeRef = shallowRef()
@ -331,6 +333,7 @@ const loginFun = async () => {
}
}
const loginHandle = async (data: any) => {
const { token, mobile } = data
if (!mobile && isForceBindMobile.value) {
@ -467,7 +470,6 @@ onLoad(async () => {
const data = await oaLogin(options)
if (data) {
loginData.value = data
loginHandle(loginData.value)
}
}
@ -480,6 +482,9 @@ onLoad(async () => {
}
//#endif
})
if (isLogin.value == true) {
window.location.href = '/mobile/pages/user/user'
}
</script>
<style lang="scss">

View File

@ -41,7 +41,6 @@
uni.setNavigationBarColor({
frontColor: '#000000',
})
console.log(123123)
}
const userStore = useUserStore()
const { userInfo, isLogin } = storeToRefs(userStore)