refactor(PaymentAgreementModal): 移除冗余的return语句并优化loading状态处理
移除handleBindJeePay函数中不必要的return语句,保持代码简洁 优化三个异步函数中的loading状态处理,保持一致性
Showing
1 changed file
with
0 additions
and
3 deletions
| ... | @@ -326,7 +326,6 @@ const handleBindJeePay = async () => { | ... | @@ -326,7 +326,6 @@ const handleBindJeePay = async () => { |
| 326 | } | 326 | } |
| 327 | } | 327 | } |
| 328 | }) | 328 | }) |
| 329 | - return | ||
| 330 | } | 329 | } |
| 331 | 330 | ||
| 332 | // 2. 如果返回 auth_sign_url 非空时,需要跳转到签约网页 | 331 | // 2. 如果返回 auth_sign_url 非空时,需要跳转到签约网页 |
| ... | @@ -345,7 +344,6 @@ const handleBindJeePay = async () => { | ... | @@ -345,7 +344,6 @@ const handleBindJeePay = async () => { |
| 345 | } | 344 | } |
| 346 | } | 345 | } |
| 347 | }) | 346 | }) |
| 348 | - return | ||
| 349 | } | 347 | } |
| 350 | 348 | ||
| 351 | // 3. 如果返回 is_wait_audit 为 true,则提示用户签约正在等待审核 | 349 | // 3. 如果返回 is_wait_audit 为 true,则提示用户签约正在等待审核 |
| ... | @@ -356,7 +354,6 @@ const handleBindJeePay = async () => { | ... | @@ -356,7 +354,6 @@ const handleBindJeePay = async () => { |
| 356 | showCancel: false, | 354 | showCancel: false, |
| 357 | confirmText: '关闭' | 355 | confirmText: '关闭' |
| 358 | }) | 356 | }) |
| 359 | - return | ||
| 360 | } | 357 | } |
| 361 | 358 | ||
| 362 | // 4. 如果返回 is_finish 为 true 则绑定成功,可以卖车 | 359 | // 4. 如果返回 is_finish 为 true 则绑定成功,可以卖车 | ... | ... |
-
Please register or login to post a comment