From 3411c0c6aa044967c57a04030bf90adf039792b9 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期五, 31 十月 2025 17:22:32 +0800
Subject: [PATCH] 优化界面
---
components/machine.vue | 32 +++++++++++++++++++++++++-------
1 files changed, 25 insertions(+), 7 deletions(-)
diff --git a/components/machine.vue b/components/machine.vue
index 4c8c2bc..49de6c8 100644
--- a/components/machine.vue
+++ b/components/machine.vue
@@ -177,13 +177,31 @@
if (res && res.data && res.data.tbBillList) {
this.$showMessage("鍛煎彨鎴愬姛");
- 鎴栬�呮柟娉�3锛氫娇鐢� uni.navigateBack 鍐嶈烦杞洖鏉ワ紙濡傛灉鏄粠鍏朵粬椤甸潰璺宠浆杩囨潵鐨勶級
- uni.navigateBack({
- delta: 1,
- success: () => {
- // 鍙互鍦ㄨ繖閲岄噸鏂拌烦杞埌褰撳墠椤甸潰
- }
- });
+ // 鍏抽敭淇敼锛氭竻绌� 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