From ddbd8c7ea87b66d5a9c4362ce284d12a4ae970d1 Mon Sep 17 00:00:00 2001
From: zuoxiao <470321431@qq.com>
Date: 星期五, 01 十一月 2024 14:24:50 +0800
Subject: [PATCH] 1绑定相关。2首页修改开关阀提示。3.问题反馈相关功能
---
pages/home/home.js | 44 +++++++++++++++++++++++++-------------------
1 files changed, 25 insertions(+), 19 deletions(-)
diff --git a/pages/home/home.js b/pages/home/home.js
index ce099b8..f9fe2fa 100644
--- a/pages/home/home.js
+++ b/pages/home/home.js
@@ -32,7 +32,8 @@
lastIntakeName: "",
isLogin: false, //鏄惁宸茬粡鐧诲綍
showInfoDialog: false,
-
+ showTipDialog: false,
+ options: '',
},
openValve: function (e) {
@@ -88,19 +89,13 @@
* 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
*/
onLoad(options) {
- // 浣跨敤 wx.nextTick 绛夊緟椤甸潰娓叉煋瀹屾垚
- wx.nextTick(() => {
- this.calculateScrollViewHeight();
- });
//褰撳紑闃�鎴愬姛鍚庤皟鐢ㄥ埛鏂�
console.log("onLoad锛�" + options.param);
if (options.param) {
- wx.showToast({
- title: '寮�闃�鎴愬姛',
- icon: 'success',
- duration: 3000
+ this.setData({
+ options: options,
+ isLogin: true,
})
- this.getOpenList();
}
},
@@ -128,6 +123,14 @@
} else {
//鏈湴娌℃湁缂撳瓨寰俊鐧诲綍
this.wxLogin();
+ }
+ if (this.data.options.param) {
+ this.setData({
+
+ showTipDialog: true,
+ tipData: "寮�闃�鍛戒护涓嬪彂鎴愬姛锛岀◢鍚庤鍒锋柊蹇�熷叧闃�鍒楄〃鏌ョ湅鎵ц缁撴灉銆�"
+ })
+ this.getOpenList();
}
},
wxLogin() {
@@ -257,13 +260,15 @@
this.setData({
showConfirm: false,
showErrorDialog: false,
- showForceConfirm: false
+ showForceConfirm: false,
+ showTipDialog: false
});
},
cancelDialog() {
this.setData({
showForceConfirm: false,
- showConfirm: false
+ showConfirm: false,
+ showTipDialog: false
});
},
/**
@@ -298,14 +303,15 @@
wx.hideLoading();
this.getOpenList();
if (response.content.data.success) {
- wx.showToast({
- title: '鍏抽榾鎴愬姛',
- icon: 'success',
- duration: 3000
+ this.setData({
+ isLogin: true,
+ showTipDialog: true,
+ tipData: "鍏抽榾鍛戒护涓嬪彂鎴愬姛锛岀◢鍚庤鍒锋柊蹇�熷叧闃�鍒楄〃鏌ョ湅鎵ц缁撴灉銆�"
})
+ this.getOpenList();
} else {
wx.showToast({
- title: '鍏抽榾澶辫触',
+ title: '鍛戒护鎵ц澶辫触',
icon: 'error',
duration: 3000
})
@@ -594,8 +600,8 @@
unbind() {
//娓呯┖鏁版嵁
this.setData({
- userPhone: "璇风櫥褰�",
- userName: "鏈櫥褰�",
+ userPhone: "鏈櫥褰�",
+ userName: "璇风櫥褰�",
listData: []
})
wx.showLoading({
--
Gitblit v1.8.0