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 | 72 ++++++++++++++++++++++++------------
1 files changed, 48 insertions(+), 24 deletions(-)
diff --git a/pages/home/home.js b/pages/home/home.js
index 879e346..54d9a2c 100644
--- a/pages/home/home.js
+++ b/pages/home/home.js
@@ -32,7 +32,9 @@
lastIntakeName: "",
isLogin: false, //鏄惁宸茬粡鐧诲綍
showInfoDialog: false,
-
+ showTipDialog: false,
+ options: '',
+ showUnBind: false
},
openValve: function (e) {
@@ -88,23 +90,15 @@
* 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
*/
onLoad(options) {
- // 浣跨敤 wx.nextTick 绛夊緟椤甸潰娓叉煋瀹屾垚
- wx.nextTick(() => {
- this.calculateScrollViewHeight();
- });
//褰撳紑闃�鎴愬姛鍚庤皟鐢ㄥ埛鏂�
console.log("onLoad锛�" + options.param);
- if (options.param) {
- wx.showToast({
- title: '寮�闃�鎴愬姛',
- icon: 'success',
- duration: 3000
- })
+ if (options.param === "1" || options.param === "2") {
this.setData({
- isLogin: true
+ options: options,
+ isLogin: true,
})
- this.getOpenList();
}
+
},
/**
@@ -130,6 +124,22 @@
} else {
//鏈湴娌℃湁缂撳瓨寰俊鐧诲綍
this.wxLogin();
+ }
+ 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();
}
},
wxLogin() {
@@ -259,13 +269,16 @@
this.setData({
showConfirm: false,
showErrorDialog: false,
- showForceConfirm: false
+ showForceConfirm: false,
+ showTipDialog: false
});
},
cancelDialog() {
this.setData({
showForceConfirm: false,
- showConfirm: false
+ showConfirm: false,
+ showTipDialog: false,
+ showUnBind:false
});
},
/**
@@ -300,14 +313,17 @@
wx.hideLoading();
this.getOpenList();
if (response.content.data.success) {
- wx.showToast({
- title: '鍏抽榾鎴愬姛',
- icon: 'success',
- duration: 3000
+ this.setData({
+ isLogin: true,
+ showTipDialog: true,
+ tipData: "鍏抽榾鍛戒护涓嬪彂鎴愬姛锛岀害20-60绉掑悗鍙埛鏂板揩閫熷叧闃�鍒楄〃鏌ョ湅鎵ц缁撴灉銆�"
})
+ setTimeout(() => {
+ this.getOpenList();
+ }, 40000)
} else {
wx.showToast({
- title: '鍏抽榾澶辫触',
+ title: '鍛戒护鎵ц澶辫触',
icon: 'error',
duration: 3000
})
@@ -594,11 +610,14 @@
},
//瑙g粦
unbind() {
- //娓呯┖鏁版嵁
this.setData({
- userPhone: "璇风櫥褰�",
- userName: "鏈櫥褰�",
- listData: []
+ showUnBind: true
+ })
+ },
+ //纭瑙g粦
+ unBindPost() {
+ this.setData({
+ showUnBind: false
})
wx.showLoading({
title: '姝e湪瑙g粦璇风◢鍊�...', // 鍔犺浇鎻愮ず鏂囧瓧
@@ -637,6 +656,11 @@
wx.hideLoading();
// 澶勭悊閿欒鍝嶅簲
console.error('璇锋眰澶辫触:', error);
+ wx.showToast({
+ title: '瑙g粦澶辫触',
+ icon: 'error',
+ duration: 3000
+ })
});
},
//鐐瑰嚮鎻愮ず鎸夐挳
--
Gitblit v1.8.0