From 6c5373689bf48280094b7b1b0c8490a07b570d1d Mon Sep 17 00:00:00 2001 From: rd <1344903914@qq.com> Date: Mon, 8 Sep 2025 16:02:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=99=BB=E5=BD=95=E6=B3=A8=E5=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/all/login.ts | 25 ++ src/assets/img/login/icon-close.png | Bin 0 -> 738 bytes src/assets/img/login/icon-open.png | Bin 0 -> 977 bytes src/styles/components/ant-input.scss | 22 +- .../login/components/login-form/index.vue | 337 ++++++++++++++++ .../login/components/login-form/style.scss | 34 ++ .../login/components/register-form/index.vue | 364 ++++++++++++++++++ .../login/components/register-form/style.scss | 0 .../components/select-account-modal/index.vue | 171 ++++++++ src/views/components/login/index.vue | 334 +--------------- src/views/components/login/style.scss | 75 +++- 11 files changed, 1018 insertions(+), 344 deletions(-) create mode 100644 src/assets/img/login/icon-close.png create mode 100644 src/assets/img/login/icon-open.png create mode 100644 src/views/components/login/components/login-form/index.vue create mode 100644 src/views/components/login/components/login-form/style.scss create mode 100644 src/views/components/login/components/register-form/index.vue create mode 100644 src/views/components/login/components/register-form/style.scss create mode 100644 src/views/components/login/components/select-account-modal/index.vue diff --git a/src/api/all/login.ts b/src/api/all/login.ts index fa0a154..d54db76 100644 --- a/src/api/all/login.ts +++ b/src/api/all/login.ts @@ -47,3 +47,28 @@ export const fetchBindPhone = (params = {}) => { export const fetchEnterpriseInfo = (id: number) => { return Http.get(`/v1/enterprises/${id}`); }; + +// 手机密码登录 +export const postLoginPassword = (params = {}) => { + return Http.post('/v1/authorizations/password', params); +}; + +// 用户注册 +export const postRegister = (params = {}) => { + return Http.post('/v1/users/register', params); +}; + +// 发送注册验证码 +export const postRegisterCaptcha = (params = {}) => { + return Http.post('/v1/sms/register-captcha', params); +}; + +// 发送忘记密码验证码 +export const postForgetPasswordCaptcha = (params = {}) => { + return Http.post('/v1/sms/forget-password-captcha', params); +}; + +// 忘记密码 +export const postForgetPassword = (params = {}) => { + return Http.post('/v1/users/forget-password', params); +}; \ No newline at end of file diff --git a/src/assets/img/login/icon-close.png b/src/assets/img/login/icon-close.png new file mode 100644 index 0000000000000000000000000000000000000000..a7a1be5858ad50fd57705fccf400503b7382d4b2 GIT binary patch literal 738 zcmV<80v-K{P)W`mExw-uUGj_$V8fCaQ^HOXm*6dw0Zsu-(jchFj5Y}w!f_0V zm4=0`?b)&$e}4PH%QuJnypr#uM-@WQuU;Si<##?jqGVfnL3(`qB89`N?>%E|9~N~! zX`UMdZ08;aY`^N~23S{e5O`-U!AhqHuFG&b@5i!%PMVq_sa^0Y;LF1)4)5>58w|_{ z7N}m=mEB#2K{_G@+TKnJ!|=o}iuxAHBIBcl2;NVN=(W_fpU+v`^O{#bGa)0J9-2?HR!mNEJ_-Tm7e z^HIizG*CrihYXp1k>tovkbdRiIB`4qV4qsLu84kE!R~zjd7BC*m%lkOjJ2*Qu zF;QkEx8vu0E%5VgCQY-WPjxKqgWA;fD4#BLS2p9sk4X7GQM|T=-=nNb-dDaaiUhd&RhqlpI(9 zIljYvVd(Wt5I^6xO;Jr-Sl1@G0;|#zGpF$$40i6|Yuw)13%Aac`HO0*f;EM9sX_4V z+0F$tW@Mjud_b968&GmJ4mzD!Wuip_`xCm87mb)2f-bX4tR@gK%3nI z!Rd6u0+N}`MBj`CaXRgO_ucN^3Lr<096A1PAgqCE)hiW?;1Yrx5^c|n5)9D6pZwcv zxBV`xft3i>YTn)$sLpR!fuID7Jq&nGPylSLLUt*FQ(`B4y9cYG&n}y{ZQsxOLMDPt ztjxqNA&r=*1lVV#dWcXWQ5DHupsvq~Hd)a=tV{6ltbX9HVEku;KU}K4Zls>AXsgW2Hd2W0DhWzEK(NK?)>1 z4r=vFb6nz1Y@&+8Xf@!9Z{d(iP;IM84zOa&Hrdu#e5!iKNyAsnF)!c)&o$o{n-1Gf zkeq~8lAt66#AB{Me8QcyQZSCkky82go8OR298XG5ge@R%2`zWV`YXjt^-CKrX`7N0oSvRK9{=} zmFeVgW@{ycPoj$Lw2_6FuPm>8LXt%ei@C4ELAq=@hYI z_=OM~W>+L3U{g60K|xv+_e##o;=5EwOg7aYZnrCrkYi5 z#nipa(Oph&Sg~6GIQkSP69%@V`D+Aq2-$*s zc807f!rN%vL3kYVwsYs*Tc-2Qkt0Wr9C7>xG*H-A+xK)#00000NkvXXu0mjfY3scL literal 0 HcmV?d00001 diff --git a/src/styles/components/ant-input.scss b/src/styles/components/ant-input.scss index aee10b0..a35bcab 100644 --- a/src/styles/components/ant-input.scss +++ b/src/styles/components/ant-input.scss @@ -6,12 +6,7 @@ background-color: #fff !important; padding: 0 12px; } -.ant-input-affix-wrapper { - @include box; - &.ant-input-affix-wrapper-disabled { - background-color: var(--BG-200, #f2f3f5) !important; - } -} + .ant-input, .ant-input-password { @include box; @@ -44,7 +39,9 @@ } &.ant-input-status-error, &.ant-input-affix-wrapper-status-error { - border-color: $color-error !important; + &:not(.ant-input-disabled) { + border-color: $color-error !important; + } } } input.ant-input { @@ -62,9 +59,20 @@ textarea.ant-input { .ant-input-affix-wrapper { padding-top: 0; padding-bottom: 0; + @include box; + &.ant-input-affix-wrapper-disabled { + background-color: var(--BG-200, #f2f3f5) !important; + } + + &.ant-input-affix-wrapper-status-error { + &:not(.ant-input-affix-wrapper-disabled) { + border-color: $color-error !important; + } + } &:focus, &-focused { box-shadow: none !important; + border-color: rgb(var(--primary-6)) !important; } .ant-input { height: 30px; diff --git a/src/views/components/login/components/login-form/index.vue b/src/views/components/login/components/login-form/index.vue new file mode 100644 index 0000000..77fc2ae --- /dev/null +++ b/src/views/components/login/components/login-form/index.vue @@ -0,0 +1,337 @@ + + + + + + diff --git a/src/views/components/login/components/login-form/style.scss b/src/views/components/login/components/login-form/style.scss new file mode 100644 index 0000000..49a0e69 --- /dev/null +++ b/src/views/components/login/components/login-form/style.scss @@ -0,0 +1,34 @@ +:deep(.ant-tabs) { + .ant-tabs-nav { + padding: 0; + &::before { + display: none; + } + .ant-tabs-nav-list { + .ant-tabs-tab { + padding: 0 0 4px; + .ant-tabs-tab-btn { + color: #939499; + font-size: 18px; + font-style: normal; + font-weight: 500; + line-height: 26px; + font-family: $font-family-medium; + } + &.ant-tabs-tab-active { + .ant-tabs-tab-btn { + color: #211f24; + } + } + } + .ant-tabs-ink-bar { + border-radius: 4px; + background: var(--Brand-6, #6d4cfe); + width: 24px !important; + height: 4px; + margin-left: 24px; + } + } + } +} + diff --git a/src/views/components/login/components/register-form/index.vue b/src/views/components/login/components/register-form/index.vue new file mode 100644 index 0000000..3035cb2 --- /dev/null +++ b/src/views/components/login/components/register-form/index.vue @@ -0,0 +1,364 @@ + + + + + + diff --git a/src/views/components/login/components/register-form/style.scss b/src/views/components/login/components/register-form/style.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/views/components/login/components/select-account-modal/index.vue b/src/views/components/login/components/select-account-modal/index.vue new file mode 100644 index 0000000..32717d8 --- /dev/null +++ b/src/views/components/login/components/select-account-modal/index.vue @@ -0,0 +1,171 @@ + + + + + diff --git a/src/views/components/login/index.vue b/src/views/components/login/index.vue index d3f1270..0b011bc 100644 --- a/src/views/components/login/index.vue +++ b/src/views/components/login/index.vue @@ -8,335 +8,31 @@
-
- - - AI营销工具 - - - - - -
- - {{ countdown > 0 ? `${countdown}s` : hasGetCode ? '重新发送' : '发送验证码' }} -
-
- - - {{ isLogin ? '登录' : '注册并开通企业账号' }} - - -
- - - {{ isLogin ? '登录' : '注册' }}即代表同意 - 用户协议 - - 隐私政策 - -
-
- - - - - - - -