mirror of
https://gitee.com/likeadmin/likeadmin_java.git
synced 2026-05-07 23:57:20 +08:00
修复h5下登录问题
This commit is contained in:
@@ -167,7 +167,6 @@ import { useAppStore } from '@/stores/app'
|
||||
import { useUserStore } from '@/stores/user'
|
||||
import cache from '@/utils/cache'
|
||||
import { isWeixinClient } from '@/utils/client'
|
||||
import { currentPage } from '@/utils/util'
|
||||
// #ifdef H5
|
||||
import wechatOa from '@/utils/wechat'
|
||||
// #endif
|
||||
@@ -285,17 +284,18 @@ const loginHandle = async (data: any) => {
|
||||
await userStore.getUser()
|
||||
uni.$u.toast('登录成功')
|
||||
uni.hideLoading()
|
||||
if (getCurrentPages().length > 1) {
|
||||
const pages = getCurrentPages()
|
||||
if (pages.length > 1) {
|
||||
const prevPage = pages.at(-2)
|
||||
uni.navigateBack({
|
||||
success: () => {
|
||||
// @ts-ignore
|
||||
const { onLoad, options } = currentPage()
|
||||
const { onLoad, options } = prevPage
|
||||
// 刷新上一个页面
|
||||
onLoad && onLoad(options)
|
||||
}
|
||||
})
|
||||
} else if (cache.get(BACK_URL)) {
|
||||
console.log(BACK_URL, cache.get(BACK_URL))
|
||||
uni.redirectTo({ url: cache.get(BACK_URL) })
|
||||
} else {
|
||||
uni.reLaunch({
|
||||
|
||||
Reference in New Issue
Block a user