忘记密码,确信(,另外加了个在编译的时候会去掉log,应该能编译成功吧
This commit is contained in:
parent
cf0713bb80
commit
247cfbd0a9
@ -65,14 +65,25 @@
|
||||
<!-- </div>-->
|
||||
<!-- </form>-->
|
||||
<form form class="login-form-container" @submit.prevent="uuid_handleForgetPassword">
|
||||
<!-- <div class="input-container">-->
|
||||
<!-- <label for="username">UUID</label>-->
|
||||
<!-- <input-->
|
||||
<!-- id="username"-->
|
||||
<!-- type="text"-->
|
||||
<!-- placeholder="请输入UUID"-->
|
||||
<!-- v-model="uuid"-->
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
<div class="input-container">
|
||||
<label for="username">UUID</label>
|
||||
<label for="username">QQ号</label>
|
||||
<input
|
||||
id="username"
|
||||
type="text"
|
||||
placeholder="请输入UUID"
|
||||
v-model="uuid"
|
||||
type="text"
|
||||
id="username"
|
||||
v-model="username"
|
||||
placeholder="请输入QQ号"
|
||||
:class="{ 'error': usernameError }"
|
||||
/>
|
||||
<span class="error-message" v-if="usernameError">{{ usernameError }}</span>
|
||||
</div>
|
||||
<div class="login-button">
|
||||
<button type="submit" :disabled="isSubmitting">
|
||||
@ -100,7 +111,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue'
|
||||
import {getCaptcha, forgetPassword, requestResetPassword} from '../api/login'
|
||||
import {getCaptcha, forgetPassword, requestResetPassword, getUserByInfo} from '../api/login'
|
||||
import ErrorDialog from './ErrorDialog.vue'
|
||||
import SuccessDialog from './SuccessDialog.vue'
|
||||
|
||||
@ -207,9 +218,10 @@ const uuid_handleForgetPassword = async () => {
|
||||
if (!uuid_validateForm()) {
|
||||
return
|
||||
}
|
||||
console.log(uuid.value);
|
||||
|
||||
await requestResetPassword(uuid.value)
|
||||
//console.log(uuid.value);
|
||||
const user = await getUserByInfo({qq_code:username.value})
|
||||
console.log(user)
|
||||
await requestResetPassword(user.uuid)
|
||||
isSubmitting.value = true
|
||||
}catch ( error){
|
||||
showErrorMessage(error.message || '不是正确的uuid')
|
||||
@ -221,9 +233,9 @@ const uuid_handleForgetPassword = async () => {
|
||||
|
||||
|
||||
const uuid_validateForm = () =>{
|
||||
uuidError.value = ''
|
||||
if (!uuid.value) {
|
||||
uuidError.value = '请输入uuid'
|
||||
usernameError.value = ''
|
||||
if (!username.value) {
|
||||
usernameError.value = '请输入qq'
|
||||
return false
|
||||
}
|
||||
return true
|
||||
@ -302,7 +314,7 @@ const resetForm = () => {
|
||||
}
|
||||
|
||||
const uuid_resetForm = () =>{
|
||||
uuid.value = ''
|
||||
username.value = ''
|
||||
}
|
||||
|
||||
// 暴露resetForm方法给父组件
|
||||
|
Loading…
x
Reference in New Issue
Block a user