feat: 开发中...

This commit is contained in:
2023-03-31 15:22:02 +08:00
parent 0675cdc58a
commit eaf234d062
14 changed files with 123 additions and 39 deletions

View File

@@ -6,7 +6,7 @@
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="叁只仓鼠的个人博客">
<title>Vite App</title>
<title>网站标题</title>
</head>
<body>

View File

@@ -3,7 +3,7 @@ import { ref, onMounted } from 'vue';
import { RouterLink, RouterView } from 'vue-router'
import { SettingControllerApiFactory, UserControllerApiFactory, UserInfoResponseVORoleEnum, type UserInfoResponseVO } from '@/api-base';
let title = ref<string>()
let title = ref<string>("网站标题")
let navigationMenu = ref([{
url: "/about",
text: "关于我"
@@ -14,10 +14,9 @@ onMounted(() => {
SettingControllerApiFactory().getSettingContent("site.title")
.then(response => {
let vo = response.data;
title.value = vo.data ?? "网站标题"
})
.catch(err => {
console.error(err);
let siteTitle: string = vo.data ?? "网站标题"
title.value = siteTitle
document.title = siteTitle
})
SettingControllerApiFactory().getSettingContent("site.navigation.menus")
@@ -28,14 +27,6 @@ onMounted(() => {
navigationMenu.value = navigationMenuObject
}
})
UserControllerApiFactory().getCurrentUserInfo()
.then(response => {
let vo = response.data;
if (vo.code === 200) {
console.log(vo.data);
}
})
});
</script>

View File

@@ -13,6 +13,11 @@ const router = createRouter({
name: 'register',
component: () => import('@/views/RegisterView.vue')
},
{
path: '/tags',
name: 'tags',
component: () => import('@/views/TagsView.vue')
},
{
path: '/login',
name: 'login',

View File

@@ -2,6 +2,7 @@
import { UserControllerApiFactory } from '@/api-base';
import type UserLoginRequireVO from '@/api-base';
import { reactive } from 'vue';
const form = reactive({
email: '',
password: ''
@@ -13,15 +14,14 @@ const onSubmit = () => {
let vo = resp.data;
if (vo.data === 200) {
console.log('login success!')
}else{
} else {
console.log('login failed!')
}
})
}
</script>
<template>
<el-alert title="error alert" type="error" show-icon />
<div class="login-div">
<el-card>
<el-form :model="form" label-width="60px">

View File

@@ -0,0 +1,13 @@
<template>
<div>
</div>
</template>
<script setup lang="ts">
</script>
<style scoped>
</style>