From 3411c0c6aa044967c57a04030bf90adf039792b9 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期五, 31 十月 2025 17:22:32 +0800
Subject: [PATCH] 优化界面

---
 components/machine.vue |   33 +++++++++++++++++++++++++--------
 1 files changed, 25 insertions(+), 8 deletions(-)

diff --git a/components/machine.vue b/components/machine.vue
index 88cb76d..49de6c8 100644
--- a/components/machine.vue
+++ b/components/machine.vue
@@ -177,14 +177,31 @@
                     if (res && res.data && res.data.tbBillList) {
                         this.$showMessage("鍛煎彨鎴愬姛");
 
-                        // 鏂规2锛氬畬鍏ㄥ埛鏂板綋鍓嶉〉闈�
-                        // 寤惰繜涓�涓嬭鐢ㄦ埛鐪嬪埌鎴愬姛鎻愮ず
-                        setTimeout(() => {
-                            // 鏂规硶1锛氫娇鐢� uni.reLaunch 閲嶆柊鍔犺浇锛堟帹鑽愶級
-                            uni.reLaunch({
-                                url: '/' + getCurrentPages()[0].route
-                            });
-                        }, 1500);
+                        // 鍏抽敭淇敼锛氭竻绌� flag 鐨勫��
+                        this.flag = -1; // 鎴栬�呮牴鎹笟鍔¢渶姹傝缃负鍏朵粬鍒濆鍊�
+
+                        // 鏂规1锛氫娇鐢╱ni-app鐨勯〉闈㈠埛鏂版柟娉�
+                        // 鏂规硶1锛氳Е鍙戜笅鎷夊埛鏂帮紙濡傛灉椤甸潰鏀寔锛�
+                        if (uni.startPullDownRefresh) {
+                            uni.startPullDownRefresh();
+                            // 2绉掑悗鍋滄鍒锋柊
+                            setTimeout(() => {
+                                uni.stopPullDownRefresh();
+                            }, 2000);
+                        }
+
+                        // 鏂规硶2锛氶噸鏂拌皟鐢ㄩ〉闈㈢殑onLoad鏂规硶锛堟帹鑽愶級
+                        const pages = getCurrentPages();
+                        const currentPage = pages[pages.length - 1];
+                        if (currentPage && currentPage.onLoad) {
+                            // 淇濆瓨褰撳墠椤甸潰鍙傛暟
+                            const pageOptions = currentPage.options || {};
+                            // 閲嶆柊鍔犺浇椤甸潰鏁版嵁
+                            currentPage.onLoad(pageOptions);
+                        }
+
+                        // 鏂规硶3锛氬悓鏃跺埛鏂扮粍浠舵暟鎹�
+                        this.findByOrderId();
 
                     } else {
                         this.$showMessage("鍛煎彨澶辫触");

--
Gitblit v1.9.3