Ver código fonte

办理异常提醒

HD_wangm 4 meses atrás
pai
commit
4954b35c7a

+ 5 - 1
pages/order/detail/acceptIndex.uvue

@@ -365,8 +365,12 @@
 				    icon: 'none'
 			    })
 			}
-		} catch (error) {
+		} catch (error: any) {
 		    console.error('请求失败:', error);
+			uni.showToast({
+			    title: error.message ?? '接单失败',
+			    icon: 'none'
+			})
 		} finally {
 			isDealing.value = false // 无论成功失败都解锁
 		}

+ 12 - 4
pages/order/detail/approveIndex.uvue

@@ -312,8 +312,12 @@
 				    icon: 'none'
 			    })
 			}
-		} catch (error) {
-		  console.error('请求失败:', error);
+		} catch (error: any) {
+		    console.error('请求失败:', error);
+			uni.showToast({
+			    title: error.message ?? '审批失败',
+			    icon: 'none'
+			})
 		} finally {
 			isDealing.value = false // 无论成功失败都解锁
 		}
@@ -351,8 +355,12 @@
 				    icon: 'none'
 			    })
 			}
-		} catch (error) {
-		  console.error('请求失败:', error);
+		} catch (error: any) {
+		    console.error('请求失败:', error);
+			uni.showToast({
+			    title: error.message ?? '审批失败',
+			    icon: 'none'
+			})
 		} finally {
 			isDealing.value = false // 无论成功失败都解锁
 		}

+ 6 - 2
pages/order/detail/resumeIndex.uvue

@@ -272,8 +272,12 @@
 				    icon: 'none'
 			    })
 			}
-		} catch (error) {
-		  console.error('请求失败:', error);
+		} catch (error: any) {
+		    console.error('请求失败:', error);
+			uni.showToast({
+			    title: error.message ?? '恢复失败',
+			    icon: 'none'
+			})
 		} finally {
 			isDealing.value = false // 无论成功失败都解锁
 		}

+ 6 - 2
pages/order/detail/suspendIndex.uvue

@@ -330,8 +330,12 @@
 				    icon: 'none'
 			    })
 			}
-		} catch (error) {
-		  console.error('请求失败:', error);
+		} catch (error: any) {
+		    console.error('请求失败:', error);
+			uni.showToast({
+			    title: error.message ?? '挂起失败',
+			    icon: 'none'
+			})
 		} finally {
 			isDealing.value = false // 无论成功失败都解锁
 		}