123456789101112131415161718192021222324252627 |
- <template>
- <view></view>
- </template>
- <script>
- export default {
- created() {
- if (!uni.getStorageSync('userInfo') || uni.getStorageSync('userInfo').tenant_id == '000000') {
- this.$u.api.token('000000','admin','704b18f7954fd548609134f03f9d5128').then(data=>{
- setTimeout(()=>{
- this.$u.func.login(data)
- }, 1000);
- })
- }else {
- if (uni.getStorageSync('accessToken')) {
- uni.switchTab({
- url: '/pages/tabBar/home'
- })
- } else {
- uni.redirectTo({
- url: '/pages/login/login'
- })
- }
- }
-
- }
- }
- </script>
|