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