From 9591844a97590071e857fbcd0712896eed03a35c Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期一, 20 十月 2025 16:39:58 +0800
Subject: [PATCH] 上下刀提示优化

---
 components/mold.vue |   37 +++++++++----------------------------
 1 files changed, 9 insertions(+), 28 deletions(-)

diff --git a/components/mold.vue b/components/mold.vue
index 2aff229..b1139c9 100644
--- a/components/mold.vue
+++ b/components/mold.vue
@@ -274,23 +274,15 @@
                         data: JSON.stringify(payload),
                         headers: { 'Content-Type': 'application/json' }
                     });
-                    if (res.data && res.data.outMsg) {
-                        const isRepeat = res.data.outMsg === '閲嶅涓婁笅鍒�';
+                    if (res.data && res.data.outMsg !== undefined) {
                         uni.showToast({
-                            title: res.data.outMsg,
-                            icon: isRepeat ? 'error' : 'none'
-                        });
-                        if (isRepeat) return; // 鎶ラ敊鏃朵笉鍐嶇户缁�
-                    } else if (res.status === 0) {
-                        uni.showToast({
-                            title: '涓嬪垁鎻愪氦鎴愬姛',
-                            icon: 'success'
-                        });
-                    } else {
-                        uni.showToast({
-                            title: res.message || '涓嬪垁鎻愪氦澶辫触',
+                            title: res.data.outMsg || '',
                             icon: 'error'
                         });
+                        return;
+                    }
+                    if (res.status === 0) {
+                        await this.fetchFormData();
                     }
                     if (res.status === 0) {
                         await this.fetchFormData();
@@ -329,23 +321,12 @@
                         data: JSON.stringify(payload),
                         headers: { 'Content-Type': 'application/json' }
                     });
-                    if (res.data && res.data.outMsg) {
-                        const isRepeat = res.data.outMsg === '閲嶅涓婁笅鍒�';
+                    if (res.data && res.data.outMsg !== undefined) {
                         uni.showToast({
-                            title: res.data.outMsg,
-                            icon: isRepeat ? 'error' : 'none'
-                        });
-                        if (isRepeat) return; // 鎶ラ敊鏃朵笉鍐嶇户缁�
-                    } else if (res.status === 0) {
-                        uni.showToast({
-                            title: '涓嬪垁鎻愪氦鎴愬姛',
-                            icon: 'success'
-                        });
-                    } else {
-                        uni.showToast({
-                            title: res.message || '涓嬪垁鎻愪氦澶辫触',
+                            title: res.data.outMsg || '',
                             icon: 'error'
                         });
+                        return;
                     }
                     if (res.status === 0) {
                         await this.fetchFormData();

--
Gitblit v1.9.3