fix: 增加流转页面

This commit is contained in:
KuroSago 2024-06-24 21:37:06 +08:00
parent 1ff9d9992c
commit fe46ec9542
6 changed files with 51 additions and 7 deletions

View File

@ -2,12 +2,12 @@
VITE_ENV=development VITE_ENV=development
# 是否使用模拟数据 # 是否使用模拟数据
VITE_USE_MOCK=true VITE_USE_MOCK=false
VITE_PORT=3000 VITE_PORT=3000
# BASE_URL # BASE_URL
VITE_BASE_URL==/api VITE_BASE_URL=http://sdtrapi.qxlms.com:9030/
# 上传域名 # 上传域名
VITE_UPLOAD_URL=/upload VITE_UPLOAD_URL=/upload

4
env/.env.production vendored
View File

@ -2,10 +2,10 @@
VITE_ENV=production VITE_ENV=production
# 是否使用模拟数据 # 是否使用模拟数据
VITE_USE_MOCK=true VITE_USE_MOCK=false
# api域名 # api域名
VITE_BASE_URL=/api/v1 VITE_BASE_URL=http://sdtrapi.qxlms.com:9030/
# 上传域名 # 上传域名

View File

@ -1,13 +1,10 @@
<script setup lang="ts"> <script setup lang="ts">
import { onHide, onLaunch, onShow } from '@dcloudio/uni-app'; import { onHide, onLaunch, onShow } from '@dcloudio/uni-app';
// import { useUserStore } from '@/stores/modules/user';
onLaunch(() => { onLaunch(() => {
console.log('App Launch'); console.log('App Launch');
}); });
onShow(() => { onShow(() => {
// const userStore = useUserStore();
// userStore.initUserInfo();
console.log('App Show'); console.log('App Show');
}); });
onHide(() => { onHide(() => {

View File

@ -1,5 +1,17 @@
{ {
"pages": [ "pages": [
{
"name": "SplashScreen",
"path": "pages/splashScreen/index",
"style": {
"navigationBarTitleText": "SplashScreen",
"navigationStyle": "custom"
},
"meta": {
"tabBar": false,
"ignoreAuth": true
}
},
{ {
"name": "Home", "name": "Home",
"path": "pages/index/index", "path": "pages/index/index",
@ -22,6 +34,7 @@
"ignoreAuth": true "ignoreAuth": true
} }
}, },
{ {
"name": "About", "name": "About",
"path": "pages/about/index", "path": "pages/about/index",

View File

@ -0,0 +1,33 @@
<!--
## File: /src/pages/splashScreen/index.vue
Project: uniapp_vue3_vite_ts
Created Date: 2024-06-24 11:30:88
Author: KuroSago
## Last Modified: 2024-06-24 11:30:88
Modified By: KuroSago
## Copyright (c) 2024 self.
Use To: 启动页面
-->
<script lang="ts" setup>
import { useUserStore } from '@/stores/modules/user';
onMounted(async () => {
const userStore = useUserStore();
const { loginOrNot } = userStore;
console.log('loginOrNot ', loginOrNot);
userStore.initUserInfo();
});
</script>
<template>
<view>
流转
</view>
</template>

View File

@ -51,6 +51,7 @@ export const useUserStore = defineStore({
// 初始化 // 初始化
async initUserInfo() { async initUserInfo() {
// //
console.log('initUserInfo');
}, },
// 登出 // 登出