...
|
...
|
@@ -19,11 +19,7 @@ const startimg = ref<string>('') |
|
|
|
|
|
const { proxy } = getCurrentInstance()
|
|
|
|
|
|
const startUpHandler = async () => {
|
|
|
const { result }: { result: StartType } = await getStart()
|
|
|
|
|
|
![null, undefined, ''].includes(result?.image) && (startimg.value = result?.image)
|
|
|
|
|
|
const jump = () => {
|
|
|
setTimeout(() => {
|
|
|
if (uni.getStorageSync('token')) {
|
|
|
proxy.$h.relaunchUrl('/pages/index/index')
|
...
|
...
|
@@ -35,6 +31,19 @@ const startUpHandler = async () => { |
|
|
}, 3000)
|
|
|
}
|
|
|
|
|
|
const startUpHandler = async () => {
|
|
|
try {
|
|
|
const { result }: { result: StartType } = await getStart()
|
|
|
|
|
|
![null, undefined, ''].includes(result?.image) && (startimg.value = result?.image)
|
|
|
jump()
|
|
|
} catch (error) {
|
|
|
uni.$u.toast('请求错误请联系管理员')
|
|
|
|
|
|
jump()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
onShow(startUpHandler())
|
|
|
</script>
|
|
|
|
...
|
...
|
|