feat: 初始化
This commit is contained in:
26
pages/index/index.vue
Normal file
26
pages/index/index.vue
Normal file
@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<view></view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getToken } from '@/utils/const.ts';
|
||||
export default {
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
computed: {},
|
||||
onLoad() {},
|
||||
onShow() {
|
||||
const token = getToken();
|
||||
if (token) {
|
||||
uni.redirectTo({ url: '/pages/home/index' });
|
||||
} else {
|
||||
uni.redirectTo({ url: '/pages/login/index' });
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
components: {}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style></style>
|
Reference in New Issue
Block a user