|
@@ -1,13 +1,16 @@
|
|
|
-<route lang="yaml">
|
|
|
+<route lang="yaml" type="home">
|
|
|
style:
|
|
|
- navigationBarTitleText: 登录
|
|
|
+ navigationBarTitleText: ''
|
|
|
+ navigationBarBackgroundColor: '#ffffff'
|
|
|
</route>
|
|
|
<script lang="ts" setup>
|
|
|
+import { storeToRefs } from 'pinia'
|
|
|
import { login } from '../../core/libs/requests'
|
|
|
import { useUserStore } from '../../store'
|
|
|
import { loginAccountIcon, loginPswIcon } from '@designer-hub/assets/src/svgs'
|
|
|
|
|
|
const userStore = useUserStore()
|
|
|
+const { isLogined } = storeToRefs(userStore)
|
|
|
const { setUserInfo } = userStore
|
|
|
const formData = ref({
|
|
|
mobile: '',
|
|
@@ -26,6 +29,11 @@ const handleLogin = async () => {
|
|
|
uni.reLaunch({ url: '/pages/home/index' })
|
|
|
}
|
|
|
}
|
|
|
+onLoad(() => {
|
|
|
+ if (isLogined.value) {
|
|
|
+ uni.reLaunch({ url: '/pages/home/index' })
|
|
|
+ }
|
|
|
+})
|
|
|
</script>
|
|
|
<template>
|
|
|
<div class="flex-grow flex flex-col items-center justify-start px-7.5 bg-[#ffffff] pt-[100px]">
|
|
@@ -35,14 +43,26 @@ const handleLogin = async () => {
|
|
|
欢迎来到筑巢荟
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="w-full form">
|
|
|
- <div class="bg-[#F6F6F6] item mb-[10px] flex items-center">
|
|
|
- <wd-img :src="loginAccountIcon" mode="widthFix" width="19px" class="mr-[16px]" />
|
|
|
- <wd-input type="number" placeholder="请输入手机号" v-model="formData.mobile" />
|
|
|
+ <div class="w-full flex flex-col gap-6.5">
|
|
|
+ <div class="bg-[#F6F6F6] flex items-center h-12.5 px-5 rounded-full gap-4">
|
|
|
+ <wd-img :src="loginAccountIcon" mode="widthFix" width="19" />
|
|
|
+ <wd-input
|
|
|
+ no-border
|
|
|
+ type="number"
|
|
|
+ placeholder="请输入手机号"
|
|
|
+ v-model="formData.mobile"
|
|
|
+ custom-class="bg-transparent!"
|
|
|
+ />
|
|
|
</div>
|
|
|
- <div class="bg-[#F6F6F6] item flex items-center">
|
|
|
- <wd-img :src="loginPswIcon" mode="widthFix" width="19px" class="mr-[16px]" />
|
|
|
- <wd-input type="number" placeholder="请输入密码" v-model="formData.password" />
|
|
|
+ <div class="bg-[#F6F6F6] flex items-center h-12.5 px-5 rounded-full gap-4">
|
|
|
+ <wd-img :src="loginPswIcon" mode="widthFix" width="19" />
|
|
|
+ <wd-input
|
|
|
+ no-border
|
|
|
+ type="number"
|
|
|
+ placeholder="请输入密码"
|
|
|
+ v-model="formData.password"
|
|
|
+ custom-class="flex-1 bg-transparent!"
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="w-full flex items-center justify-between mt-[19px]">
|
|
@@ -67,17 +87,4 @@ const handleLogin = async () => {
|
|
|
.title {
|
|
|
width: 100%;
|
|
|
}
|
|
|
-.form {
|
|
|
- .item {
|
|
|
- // height: 50px;
|
|
|
- padding: 10px;
|
|
|
- border-radius: 10px;
|
|
|
- :deep(.wd-input) {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- background: transparent;
|
|
|
- border: none;
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
</style>
|