From f3058f900e3143c0245c9b1686397b6e6e561422 Mon Sep 17 00:00:00 2001
From: zuoxiao <470321431@qq.com>
Date: 星期五, 08 十一月 2024 10:09:48 +0800
Subject: [PATCH] 1.解绑添加二次确认。2.接口返回的金额都是元

---
 pages/home/home.js |   38 +++++++++++++++++++++++++++++---------
 1 files changed, 29 insertions(+), 9 deletions(-)

diff --git a/pages/home/home.js b/pages/home/home.js
index e311702..54d9a2c 100644
--- a/pages/home/home.js
+++ b/pages/home/home.js
@@ -34,6 +34,7 @@
     showInfoDialog: false,
     showTipDialog: false,
     options: '',
+    showUnBind: false
   },
 
   openValve: function (e) {
@@ -91,7 +92,7 @@
   onLoad(options) {
     //褰撳紑闃�鎴愬姛鍚庤皟鐢ㄥ埛鏂�
     console.log("onLoad锛�" + options.param);
-    if (options.param) {
+    if (options.param === "1" || options.param === "2") {
       this.setData({
         options: options,
         isLogin: true,
@@ -124,11 +125,19 @@
       //鏈湴娌℃湁缂撳瓨寰俊鐧诲綍
       this.wxLogin();
     }
-    if (this.data.options.param) {
+    if (this.data.options.param === "1") {
       this.setData({
-
         showTipDialog: true,
         tipData: "寮�闃�鍛戒护涓嬪彂鎴愬姛锛岀害20-60绉掑悗鍙埛鏂板揩閫熷叧闃�鍒楄〃鏌ョ湅鎵ц缁撴灉銆�"
+      })
+      setTimeout(() => {
+        this.getOpenList();
+      }, 20000)
+
+    } else if (this.data.options.param === "2") {
+      this.setData({
+        showTipDialog: true,
+        tipData: "棰勭害寮�闃�鍛戒护涓嬪彂鎴愬姛锛屽綋鍒拌揪棰勭害鏃堕棿骞朵笖鎴愬姛寮�闃�鍚庡揩閫熷叧闃�鍒楄〃浼氭樉绀烘湭鍏抽榾璁板綍"
       })
       this.getOpenList();
     }
@@ -268,7 +277,8 @@
     this.setData({
       showForceConfirm: false,
       showConfirm: false,
-      showTipDialog: false
+      showTipDialog: false,
+      showUnBind:false
     });
   },
   /**
@@ -308,7 +318,9 @@
           showTipDialog: true,
           tipData: "鍏抽榾鍛戒护涓嬪彂鎴愬姛锛岀害20-60绉掑悗鍙埛鏂板揩閫熷叧闃�鍒楄〃鏌ョ湅鎵ц缁撴灉銆�"
         })
-        this.getOpenList();
+        setTimeout(() => {
+          this.getOpenList();
+        }, 40000)
       } else {
         wx.showToast({
           title: '鍛戒护鎵ц澶辫触',
@@ -598,11 +610,14 @@
   },
   //瑙g粦
   unbind() {
-    //娓呯┖鏁版嵁
     this.setData({
-      userPhone: "鏈櫥褰�",
-      userName: "璇风櫥褰�",
-      listData: []
+      showUnBind: true
+    })
+  },
+  //纭瑙g粦
+  unBindPost() {
+    this.setData({
+      showUnBind: false
     })
     wx.showLoading({
       title: '姝e湪瑙g粦璇风◢鍊�...', // 鍔犺浇鎻愮ず鏂囧瓧
@@ -641,6 +656,11 @@
       wx.hideLoading();
       // 澶勭悊閿欒鍝嶅簲
       console.error('璇锋眰澶辫触:', error);
+      wx.showToast({
+        title: '瑙g粦澶辫触',
+        icon: 'error',
+        duration: 3000
+      })
     });
   },
   //鐐瑰嚮鎻愮ず鎸夐挳

--
Gitblit v1.8.0