Skip to content

Commit 2a9290c

Browse files
committed
【代码优化】支持通过短信重置后台密码
1 parent 65924bb commit 2a9290c

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/api/login/index.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ export const register = (data: RegisterVO) => {
2222
return request.post({ url: '/system/auth/register', data })
2323
}
2424

25-
// 刷新访问令牌
26-
export const refreshToken = () => {
27-
return request.post({ url: '/system/auth/refresh-token?refreshToken=' + getRefreshToken() })
28-
}
29-
3025
// 使用租户名,获得租户编号
3126
export const getTenantIdByName = (name: string) => {
3227
return request.get({ url: '/system/tenant/get-id-by-name?name=' + name })
@@ -76,17 +71,17 @@ export const socialAuthRedirect = (type: number, redirectUri: string) => {
7671
})
7772
}
7873
// 获取验证图片以及 token
79-
export const getCode = (data) => {
74+
export const getCode = (data: any) => {
8075
debugger
8176
return request.postOriginal({ url: 'system/captcha/get', data })
8277
}
8378

8479
// 滑动或者点选验证
85-
export const reqCheck = (data) => {
80+
export const reqCheck = (data: any) => {
8681
return request.postOriginal({ url: 'system/captcha/check', data })
8782
}
8883

8984
// 通过短信重置密码
90-
export const smsResetPassword = (data) => {
85+
export const smsResetPassword = (data: any) => {
9186
return request.post({ url: '/system/auth/sms-reset-password', data })
9287
}

src/views/Login/components/LoginForm.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,13 @@
5959
</el-checkbox>
6060
</el-col>
6161
<el-col :offset="6" :span="12">
62-
<el-link style="float: right" type="primary" @click="setLoginState(LoginStateEnum.RESET_PASSWORD)">{{
63-
t('login.forgetPassword') }}</el-link>
62+
<el-link
63+
style="float: right"
64+
type="primary"
65+
@click="setLoginState(LoginStateEnum.RESET_PASSWORD)"
66+
>
67+
{{ t('login.forgetPassword') }}
68+
</el-link>
6469
</el-col>
6570
</el-row>
6671
</el-form-item>

0 commit comments

Comments
 (0)