fix kungalgamer page, change server port

This commit is contained in:
KUN1007 2023-06-01 15:40:03 +08:00
parent e91e4f9757
commit e1ca1e52fe
7 changed files with 75 additions and 53 deletions

View file

@ -7,7 +7,7 @@ const app = express()
app.use(cors())
app.use(bodyParser.json())
const port = 1007 // 端口号
const port = 10007 // 端口号
// 模拟一个 topics 数组
const topics = [

View file

@ -1,4 +1,8 @@
lockfileVersion: '6.0'
lockfileVersion: '6.1'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
dependencies:
body-parser:

View file

@ -10,6 +10,35 @@ const kungalgamer: KUNRouteType[] = [
permission: 'kungalgamer',
title: '用户页',
},
children: [
{
name: 'Info',
path: 'info',
component: () => import('@/views/kungalgamer/content/Info.vue'),
meta: {
title: 'KUN',
permission: 'kun',
},
},
{
name: 'Password',
path: 'password',
component: () => import('@/views/kungalgamer/content/Password.vue'),
meta: {
title: 'KUN',
permission: 'kun',
},
},
{
name: 'CreatedTopic',
path: 'created',
component: () => import('@/views/kungalgamer/content/Topic.vue'),
meta: {
title: 'KUN',
permission: 'kun',
},
},
],
},
]

View file

@ -18,6 +18,7 @@ export interface KUNRouteType extends Omit<RouteRecordRaw, 'props'> {
component?: Component | string
components?: Component
children?: KUNRouteType[]
fullPath?: string
meta?: MetaType
redirect?: string
}

View file

@ -39,15 +39,6 @@ import BackToPrevious from '@/components/BackToPrevious.vue'
</template>
<style lang="scss" scoped>
* {
list-style: none;
padding: 0;
margin: 0;
text-decoration: none;
}
*::-webkit-scrollbar {
display: none;
}
/* 根容器 */
.root {
height: 100vh;
@ -109,29 +100,27 @@ import BackToPrevious from '@/components/BackToPrevious.vue'
font-style: italic;
font-family: serif;
cursor: pointer;
}
.kungalgame:hover {
color: $kungalgame-blue-4;
transition: 0.1s;
&:hover {
color: $kungalgame-blue-4;
transition: 0.1s;
}
}
/* 联系方式容器 */
.content {
display: flex;
font-size: 20px;
}
/* 单个项目 */
.content > div {
/* 固定宽度 */
width: 110px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
/* 文字提示 */
.content span {
margin-bottom: 20px;
cursor: pointer;
& > div {
/* 固定宽度 */
width: 110px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
span {
margin-bottom: 20px;
cursor: pointer;
}
}
/* 图标字体 */
.icon {
@ -140,10 +129,10 @@ import BackToPrevious from '@/components/BackToPrevious.vue'
color: $kungalgame-blue-4;
cursor: pointer;
text-align: center;
}
.icon:hover {
color: $kungalgame-red-4;
transform: scale(1.2);
transition: 0.1s;
&:hover {
color: $kungalgame-red-4;
transform: scale(1.2);
transition: 0.1s;
}
}
</style>

View file

@ -101,23 +101,22 @@ import { currBackground } from '@/hooks/useBackgroundPicture'
/* 头部的颜色 */
background-color: $kungalgame-trans-blue-0;
align-items: center;
}
/* 用户名字的位置 */
.kungalgamer-name span:nth-child(1) {
position: absolute;
font-size: 22px;
/* 相对于 header 定位信息 */
margin-left: 200px;
margin-top: 60px;
z-index: 1;
}
.kungalgamer-name span:nth-child(2) {
position: absolute;
right: 0;
font-size: 100px;
color: $kungalgame-trans-white-6;
font-style: italic;
text-shadow: 2px 2px 2px $kungalgame-trans-white-8;
span:nth-child(1) {
position: absolute;
font-size: 22px;
/* 相对于 header 定位信息 */
margin-left: 200px;
margin-top: 60px;
z-index: 1;
}
span:nth-child(2) {
position: absolute;
right: 0;
font-size: 100px;
color: $kungalgame-trans-white-6;
font-style: italic;
text-shadow: 2px 2px 2px $kungalgame-trans-white-8;
}
}
/* 用户头像 */
.kungalgamer-avatar {

View file

@ -19,7 +19,7 @@ const router = useRouter()
//
const loginMutation = useMutation(async (data: any) => {
const res = await request('http://127.0.0.1:1007/api/login', {
const res = await request('http://127.0.0.1:10007/api/login', {
method: 'POST',
body: JSON.stringify(data),
headers: { 'Content-Type': 'application/json' },
@ -29,7 +29,7 @@ const loginMutation = useMutation(async (data: any) => {
//
const registerMutation = useMutation(async (data: any) => {
const res = await request('http://127.0.0.1:1007/api/register', {
const res = await request('http://127.0.0.1:10007/api/register', {
method: 'POST',
body: JSON.stringify(data),
headers: { 'Content-Type': 'application/json' },