|
@@ -51,13 +51,12 @@ export function initFormState(): FormState {
|
|
|
export function handleApply() {
|
|
export function handleApply() {
|
|
|
const loading = ref<boolean>(false);
|
|
const loading = ref<boolean>(false);
|
|
|
function applyAction(param: AddUserInfoApplyReq) {
|
|
function applyAction(param: AddUserInfoApplyReq) {
|
|
|
|
|
+ loading.value = true;
|
|
|
QueryAddUserInfoApply(param).then(res => {
|
|
QueryAddUserInfoApply(param).then(res => {
|
|
|
console.log('res', res);
|
|
console.log('res', res);
|
|
|
- loading.value = true;
|
|
|
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
|
- loading.value = false;
|
|
|
|
|
message.error(err)
|
|
message.error(err)
|
|
|
- })
|
|
|
|
|
|
|
+ }).finally(() => loading.value = false)
|
|
|
}
|
|
}
|
|
|
return { loading, applyAction }
|
|
return { loading, applyAction }
|
|
|
}
|
|
}
|