mirror of
https://github.com/yangzongzhuan/RuoYi-App.git
synced 2025-09-27 14:42:41 +00:00
优化H5刷新后页面跳转不正确问题(IC92FN)
This commit is contained in:
@@ -38,10 +38,12 @@
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
<script setup>
|
||||
import { ref, getCurrentInstance } from "vue"
|
||||
import { onLoad } from "@dcloudio/uni-app"
|
||||
import { getToken } from '@/utils/auth'
|
||||
import { getCodeImg } from '@/api/login'
|
||||
import { useConfigStore, useUserStore } from '@/store'
|
||||
import { ref, getCurrentInstance } from "vue"
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const globalConfig = useConfigStore().config
|
||||
@@ -117,7 +119,15 @@
|
||||
useUserStore().getInfo().then(res => {
|
||||
proxy.$tab.reLaunch('/pages/index')
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
//#ifdef H5
|
||||
if (getToken()) {
|
||||
proxy.$tab.reLaunch('/pages/index')
|
||||
}
|
||||
//#endif
|
||||
})
|
||||
|
||||
getCode()
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user