|
@@ -60,7 +60,7 @@
|
|
<script setup>
|
|
<script setup>
|
|
defineOptions({ name: 'editPasswordEnt'})
|
|
defineOptions({ name: 'editPasswordEnt'})
|
|
import { ref, reactive, computed } from 'vue'
|
|
import { ref, reactive, computed } from 'vue'
|
|
-import { updatePassword, resetPassword } from '@/api/common/index'
|
|
|
|
|
|
+import { resetPassword } from '@/api/common/index'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import { checkEmail } from '@/utils/validate'
|
|
import { checkEmail } from '@/utils/validate'
|
|
|
|
|
|
@@ -78,10 +78,10 @@ const props = defineProps({
|
|
type: Boolean,
|
|
type: Boolean,
|
|
default: true
|
|
default: true
|
|
},
|
|
},
|
|
- isReset: {
|
|
|
|
- type: Boolean,
|
|
|
|
- default: false
|
|
|
|
- }
|
|
|
|
|
|
+ // isReset: {
|
|
|
|
+ // type: Boolean,
|
|
|
|
+ // default: true
|
|
|
|
+ // }
|
|
})
|
|
})
|
|
|
|
|
|
let query = reactive({
|
|
let query = reactive({
|
|
@@ -132,9 +132,9 @@ const handleSubmit = async () => {
|
|
password: query.password,
|
|
password: query.password,
|
|
}
|
|
}
|
|
loading.value = true
|
|
loading.value = true
|
|
- const api = props.isReset ? resetPassword : updatePassword
|
|
|
|
|
|
+ // const api = props.isReset ? resetPassword : updatePassword
|
|
try {
|
|
try {
|
|
- await api(data)
|
|
|
|
|
|
+ await resetPassword(data)
|
|
Snackbar.success('修改成功')
|
|
Snackbar.success('修改成功')
|
|
} finally {
|
|
} finally {
|
|
loading.value = false
|
|
loading.value = false
|