hookehuyr

refactor(PaymentAgreementModal): 移除冗余的return语句并优化loading状态处理

移除handleBindJeePay函数中不必要的return语句,保持代码简洁
优化三个异步函数中的loading状态处理,保持一致性
......@@ -208,7 +208,7 @@ const checkBindStatus = async () => {
try {
// 设置loading状态,禁用用户操作
isLoading.value = true
const result = await bindJeePayAPI()
if (result.code && result.data) {
......@@ -246,7 +246,7 @@ const handleAgree = async () => {
try {
// 设置loading状态
isLoading.value = true
// 调用API更新用户协议状态
const result = await updateProfileAPI({
is_signed: true
......@@ -281,7 +281,7 @@ const handleConfirm = async () => {
try {
// 设置loading状态
isLoading.value = true
// 调用绑定接口
await handleBindJeePay()
} catch (error) {
......@@ -326,7 +326,6 @@ const handleBindJeePay = async () => {
}
}
})
return
}
// 2. 如果返回 auth_sign_url 非空时,需要跳转到签约网页
......@@ -345,7 +344,6 @@ const handleBindJeePay = async () => {
}
}
})
return
}
// 3. 如果返回 is_wait_audit 为 true,则提示用户签约正在等待审核
......@@ -356,7 +354,6 @@ const handleBindJeePay = async () => {
showCancel: false,
confirmText: '关闭'
})
return
}
// 4. 如果返回 is_finish 为 true 则绑定成功,可以卖车
......