Commit 7cea2594 authored by youjie's avatar youjie

注册

parent ed9626ca
......@@ -100,6 +100,7 @@ onMounted(async () => {
:root {
--primary1-6: #263628!important;
--primary1-5: #4a664d!important;
--primary1-5-hover: #95A997!important;
--primary1-7: #8aaa8a!important;
--primary1-4: #c0ceb3!important;
--primary1-3: #e3e6da!important;
......@@ -114,6 +115,7 @@ onMounted(async () => {
}
.primary1-6{color: var(--primary1-6);}
.primary1-5{color: var(--primary1-5);}
.primary1-5-hover{color: var(--primary1-5-hover);}
.primary1-7{color: var(--primary1-7);}
.primary1-4{color: var(--primary1-4);}
.primary1-3{color: var(--primary1-3);}
......@@ -123,6 +125,7 @@ onMounted(async () => {
.primary1-bg-6{background-color: var(--primary1-6);}
.primary1-bg-5{background-color: var(--primary1-5);}
.primary1-bg-5-hover{background-color: var(--primary1-5-hover);}
.primary1-bg-7{background-color: var(--primary1-7);}
.primary1-bg-4{background-color: var(--primary1-4);}
.primary1-bg-3{background-color: var(--primary1-3);}
......@@ -135,19 +138,25 @@ onMounted(async () => {
.color-text1-3{color: var(--color-text-3);}
@font-face{
font-family:'Source Han Sans CN';
src:url('@/assets/fonts/SOURCEHANSANSCN-MEDIUM.OTF') format('truetype')
}
/* @font-face{
font-family:'Source Han Sans CN';
font-family:'Source Han Sans CN ExtraLight';
src:url('@/assets/fonts/SOURCEHANSANSCN-EXTRALIGHT.OTF') format('truetype')
}
@font-face{
font-family:'Source Han Sans CN';
font-family:'Source Han Sans CN MEDIUM';
src:url('@/assets/fonts/SOURCEHANSANSCN-MEDIUM.OTF') format('truetype')
}
@font-face{
font-family:'Source Han Sans CN BOLD';
src:url('@/assets/fonts/SOURCEHANSANSCN-BOLD.OTF') format('truetype')
} */
}
.SourceHanSansCN{
font-family:'Source Han Sans CN';
font-family:'Source Han Sans CN ExtraLight';
}
.SourceHanSansCNMEDIUM{
font-family:'Source Han Sans CN MEDIUM';
}
.SourceHanSansBOLD{
font-family:'Source Han Sans CN BOLD';
}
#app {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
......
......@@ -58,7 +58,7 @@ export default {
bindingRecommendCodeRequired: '请输入推荐码',
backStep: '上一步',
registerSuccess: '注册成功',
registerSuccessText: '一起奔赴越南的阳光、沙滩与烟火气吧~',
registerSuccessText: '一起奔赴阳光、沙滩与烟火气吧~',
agreementText: '「我同意使用条款与隐私政策」',
forgetPassword: '忘记密码',
newPassword: '新密码',
......
......@@ -5,6 +5,12 @@ import i18n from "@/i18n";
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: "/",
name: "in",
component: () => import("../views/auth/Login.vue"),
meta: { title: "login.loginButton" },
},
{
path: "/login",
name: "login",
......
......@@ -152,7 +152,7 @@ export const useUserStore = defineStore('user', {
},
/**
* 代理商自助注册
* 注册
* @param data 注册信息
*/
async registerDistributorAsync(data: DistributorSelfRegisterDto): Promise<RegisterResult> {
......
<template>
<div class="flex justify-between items-center">
<div class="flex justify-center items-center">
<div class="flex justify-center items-center cursor-pointer"
@click="goHome('/')">
<img v-if="systemConfigStore.config?.logo"
:src="systemConfigStore.config.logo"
:alt="systemConfigStore.config.webSiteName"
......@@ -29,10 +30,15 @@ import { ref,inject } from "vue";
import { useI18n } from "vue-i18n";
import { useSystemConfigStore } from '@/stores/index'
import LanguageSwitcher from "@/components/common/LanguageSwitcher.vue"
import { useRouter } from 'vue-router'
const { t } = useI18n();
const systemConfigStore = useSystemConfigStore()
const currentStep = ref(inject('currentStep'))
const router = useRouter()
const goHome = (path:string)=>{
router.push(path)
}
</script>
\ No newline at end of file
......@@ -3,11 +3,14 @@
<div class="flex justify-center">
<div class="w-[1073px] h-[638px] rounded-[18px] loginForm-bg flex flex-col justify-center items-center">
<icon-check-circle-fill size="68" class="!text-[#34CA51]"></icon-check-circle-fill>
<div class="flex justify-center items-center text-[32px] font-bold text-[#263628] pt-[45px] pb-[31px]">
<span class="">ranjunjun@aliyun.com</span>
<span>{{ t('login.registerSuccess') }}</span>
<div class="flex justify-center items-center text-[32px] font-bold primary1-6 pt-[45px] pb-[31px]">
<span class="" v-if="userInfo?.email">
<!-- ranjunjun@aliyun.com -->
{{ userInfo.email }}
</span>
<span class="ml-[18px]">{{ t('login.registerSuccess') }}</span>
</div>
<div class="text-[20px] text-[#263628] text-center font-thin SourceHanSansCN">
<div class="text-[20px] primary1-6 text-center font-normal SourceHanSansCN">
{{ t('login.registerSuccessText') }}
</div>
<div class="mt-[74px]">
......@@ -17,7 +20,7 @@
:loading="loading"
html-type="submit"
class="w-[222px] flex-1 font-medium !h-[46px] !rounded-[13px] !text-[#FFFFFF] !text-[16px]"
@click="goHome"
@click="goHome('/')"
>
{{ t('login.backToHome') }}
</a-button>
......@@ -28,19 +31,22 @@
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { ref ,computed} from 'vue'
import { onMounted } from 'vue'
import { useRouter } from 'vue-router'
import { useI18n } from 'vue-i18n'
import { useUserStore } from '@/stores/user'
const { t } = useI18n();
const loading = ref(false)
const router = useRouter()
const useStore = useUserStore()
const userInfo = computed(() => useStore.userInfo)
const goHome = () => {
router.push('/')
const goHome = (path: string = '/') => {
router.push(path)
}
......@@ -53,7 +59,7 @@ onMounted(async () => {
background-color: var(--primary1-5);
}
:deep(.arco-btn-primary:hover){
background-color: var(--primary1-7);
background-color: var(--primary1-5);
}
.loginForm-bg{
background: rgba(255, 255, 255, 0.7);
......
......@@ -2,7 +2,7 @@
<div class="h-screen overflow-hidden">
<div ref="loginPage"
class="light-login-bg pl-[85px] pr-[98px] pt-[33px] h-full !overflow-y-auto"
:class="[currentStep<4?'light-login-bg':'light-login-bgActive']">
:class="[currentStep<3?'light-login-bg':'light-login-bgActive']">
<loginHeader />
<div v-if="currentStep!=3" class="w-full h-[125px] mt-[32px] mb-[31px]">
<!-- <div class="absolute left-0 right-0 top-0 flex justify-center items-center"
......@@ -177,7 +177,7 @@
<span class="text-[#008AFF] text-sm">{{ t('login.isReceivePush') }}</span>
</div>
</template>
<div class="mt-[27px] w-full flex flex-col items-center">
<div class="mt-[27px] w-full flex flex-col items-center items-center-button">
<div class="w-full mb-[65px]" v-if="currentStep<2"
:class="[formData.email&&verificationToken&&formData.password&&formData.password.length>=8&&formData.confirmPassword&&formData.confirmPassword.length>=8?'isClick':'']">
<a-button
......@@ -222,7 +222,7 @@
</div>
</div>
<div class="flex justify-center text-white pb-[117px] text-[16px]">
<div class="px-[17px] py-[40px] cursor-pointer" @click="handleClick('/login')">{{ t('login.backToHome') }}</div>
<div class="px-[17px] py-[40px] cursor-pointer" @click="goHome('/')">{{ t('login.backToHome') }}</div>
</div>
</div>
<registerSuccess v-if="currentStep==3" />
......@@ -237,8 +237,7 @@ import { Message } from '@arco-design/web-vue'
import { useSystemConfigStore } from '@/stores/index'
import loginHeader from "./components/header.vue";
import UserService from '@/services/UserService'
import type { DistributorSelfRegisterDto, DistributorApplyDto } from '@/services/UserService'
import OtaAuthService from '@/services/OtaAuthService'
import type { DistributorSelfRegisterDto } from '@/services/UserService'
import CountryService from '@/services/CountryService'
import registerSuccess from "./components/registerSuccess.vue";
import { useUserStore } from '@/stores/user'
......@@ -269,7 +268,7 @@ const formData = reactive({
openId: "",//授权登录 对应的openId
externalName: "",//授权登录 对应的账号名称
distributorCode: "",
email: "2310721242@qq.com",// 必需
email: "",// 必需 2310721242@qq.com
verificationCode: "",// 必需 验证码
name: "",
phoneCode: "",
......@@ -282,8 +281,8 @@ const formData = reactive({
isReceivePush: 0,// 是否同意隐私政策
distributorId: 0,// 分销商ID
parentId: "",// 父分销商ID
password: "yj950815",//密码 必需 >= 6 字符
confirmPassword: "yj950815",//确认密码 必需 与密码一致
password: "",//密码 必需 >= 6 字符 yj950815
confirmPassword: "",//确认密码 必需 与密码一致
scene: 'register',//注册register 登录login 重置密码ResetPassword
isAgreement: 0,// 是否同意隐私政策
})
......@@ -349,7 +348,7 @@ const rules = computed(() => ({
const loginPage = ref(null)
const currentStep = ref(1)
const currentStep = ref(3)
const loading = ref(false)
const isFromOta = ref(false) // 是否从 OTA 授权进入
......@@ -441,7 +440,7 @@ const handleEmailBlur = async () => {
}, 500)
}
const handleClick = (path: string) => {
const goHome = (path: string) => {
router.push(path)
}
......@@ -655,8 +654,8 @@ const handleSubmit = async () => {
result = await userStore.registerDistributorAsync(registerData)
if (result.success) {
Message.success(result.message)
router.push('/login')
// await handleAccountLogin()
// router.push('/login')
await handleAccountLogin()
} else {
Message.error(result.message)
}
......@@ -684,6 +683,7 @@ const handleAccountLogin = async () => {
'',
)
console.log('登录成功:', result)
currentStep.value = 3
if (result.status === 'SUCCESS') {
}
......@@ -752,18 +752,18 @@ getSimples()
background: url('../../assets/images/login_formbg.png')no-repeat white;
background-size: 100% 100%;
}
:deep(.arco-btn-primary){
:deep(.items-center-button .arco-btn-primary){
box-shadow: rgba(74,102,77,0.15) 0px 5px 15px;
background-color: var(--primary1-7);
background-color: var(--primary1-5-hover);
}
:deep(.arco-btn-primary:hover){
:deep(.items-center-button .arco-btn-primary:hover){
box-shadow: rgba(74,102,77,0.15) 0px 5px 15px;
background-color: var(--primary1-7);
background-color: var(--primary1-5-hover);
}
:deep(.isClick .arco-btn-primary){
:deep(.items-center-button .isClick .arco-btn-primary){
background-color: var(--primary1-5);
}
:deep(.isClick .arco-btn-primary:hover){
:deep(.items-center-button .isClick .arco-btn-primary:hover){
background-color: var(--primary1-5);
}
// :deep(.arco-btn-primary:hover){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment