From d4956f577b35428c833d133ded402f00576b299c Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期一, 20 十月 2025 14:23:28 +0800
Subject: [PATCH] 报错优化

---
 components/mold.vue |   40 ++++++++++++++++++++++++++++++++--------
 1 files changed, 32 insertions(+), 8 deletions(-)

diff --git a/components/mold.vue b/components/mold.vue
index b00a15d..1888d7e 100644
--- a/components/mold.vue
+++ b/components/mold.vue
@@ -276,14 +276,26 @@
                     });
                     if (res.data && res.data.outMsg) {
                         if (res.data.outMsg.includes('閲嶅涓婁笅鍒�')) {
-                            this.$showMessage(res.data.outMsg, { type: 'error' });
+                            uni.showToast({
+                                title: res.data.outMsg,
+                                icon: 'error'
+                            });
                         } else {
-                            this.$showMessage(res.data.outMsg);
+                            uni.showToast({
+                                title: res.data.outMsg,
+                                icon: 'none'
+                            });
                         }
                     } else if (res.status === 0) {
-                        this.$showMessage('涓婂垁鎻愪氦鎴愬姛');
+                        uni.showToast({
+                            title: '涓婂垁鎻愪氦鎴愬姛',
+                            icon: 'success'
+                        });
                     } else {
-                        this.$showMessage(res.message || '涓婂垁鎻愪氦澶辫触');
+                        uni.showToast({
+                            title: res.message || '涓婂垁鎻愪氦澶辫触',
+                            icon: 'error'
+                        });
                     }
                     if (res.status === 0) {
                         await this.fetchFormData();
@@ -324,14 +336,26 @@
                     });
                     if (res.data && res.data.outMsg) {
                         if (res.data.outMsg.includes('閲嶅涓婁笅鍒�')) {
-                            this.$showMessage(res.data.outMsg, { type: 'error' });
+                            uni.showToast({
+                                title: res.data.outMsg,
+                                icon: 'error'
+                            });
                         } else {
-                            this.$showMessage(res.data.outMsg);
+                            uni.showToast({
+                                title: res.data.outMsg,
+                                icon: 'none'
+                            });
                         }
                     } else if (res.status === 0) {
-                        this.$showMessage('涓嬪垁鎻愪氦鎴愬姛');
+                        uni.showToast({
+                            title: '涓婂垁鎻愪氦鎴愬姛',
+                            icon: 'success'
+                        });
                     } else {
-                        this.$showMessage(res.message || '涓嬪垁鎻愪氦澶辫触');
+                        uni.showToast({
+                            title: res.message || '涓婂垁鎻愪氦澶辫触',
+                            icon: 'error'
+                        });
                     }
                     if (res.status === 0) {
                         await this.fetchFormData();

--
Gitblit v1.9.3