From 1a0abf4788e8b1ee17d5a3a9834385bbc6b8f14b Mon Sep 17 00:00:00 2001
From: hailu <962012470@qq.com>
Date: 星期四, 07 十二月 2023 17:38:53 +0800
Subject: [PATCH] 备份
---
GoldC/pages/problemListwx/problemListwx.js | 71 +++++++++++++++++++++++++----------
1 files changed, 50 insertions(+), 21 deletions(-)
diff --git a/GoldC/pages/problemListwx/problemListwx.js b/GoldC/pages/problemListwx/problemListwx.js
index 749240b..51bd5a2 100644
--- a/GoldC/pages/problemListwx/problemListwx.js
+++ b/GoldC/pages/problemListwx/problemListwx.js
@@ -59,20 +59,18 @@
}
},
- // 璇︽儏灞曠ず
- toxiangqin(e) {
- console.log(e.target.dataset.id)
- var id = e.target.dataset.id
- wx.navigateTo({
- url: '/pages/xiangqing/xiangqing?id=' + id,
- })
- },
/**
* 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
*/
onLoad: function (options) {
+ },
+ goTop() { // 涓�閿洖鍒伴《閮�
+ wx.pageScrollTo({
+ scrollTop: 0,
+ duration: 300
+ });
},
// 璁剧疆寮傛璇锋眰涔嬪悗鐨勯〉闈€�佹�昏褰曟暟
setPage(index, total) {
@@ -84,14 +82,11 @@
//姣忔鏀瑰彉椤电爜灏辫皟鐢ㄨ鍑芥暟
triggerParent: function () {
-
// 閫氱煡鐖剁粍浠跺綋鍓嶅姞杞界殑椤垫暟
-
// 鑷畾涔夌粍浠跺悜鐖剁粍浠朵紶鍊�
const option = {
currentIndex: this.data.index
};
-
// pagingChange 鑷畾涔夊悕绉颁簨浠讹紝鐖剁粍浠朵腑浣跨敤
this.triggerEvent('pagingChange', option)
@@ -111,30 +106,54 @@
//鏇存敼椤电爜鐐瑰嚮浜嬩欢
onChangePage: function (e) {
//console.log("鏇存敼椤电爜浜嬩欢锛�",e);
+
this.setData({
pageMask: false,
index: e.currentTarget.dataset.index //鐐瑰嚮鐨勯〉鏁�
})
this.getList()
// 鍏堝垽鏂綋鍓嶉〉鏁帮紝鏄惁闇�瑕佹洿鏂癲isabled鐨勭姸鎬�
- this.updateBtnDis();
+
this.triggerParent();
},
//涓婁竴椤电偣鍑讳簨浠�
prevPage: function () {
- if (this.data.index <= 1) return;
+
+ if (this.data.index <= 1) {
+ this.setData({
+ prevBtnDis: false,
+ })
+ return false
+ }
+ if (this.data.index <= this.data.total) {
+ this.setData({
+ nextBtnDis: false,
+ })
+ }
let num = this.data.index - 1;
this.setData({
index: num
})
this.getList()
this.triggerParent();
- 鏇存柊鎸夐挳鐘舵��
- this.updateBtnDis();
+
},
//涓嬩竴椤电偣鍑讳簨浠�
nextPage: function () {
- if (this.data.index >= this.data.total) return;
+ if (this.data.index >= this.data.total) {
+ this.setData({
+ nextBtnDis: false,
+ })
+ return false
+ }
+ this.setData({
+ nextBtnDis: true,
+ })
+ if (this.data.index >= 1) {
+ this.setData({
+ prevBtnDis: false
+ })
+ }
let num = this.data.index + 1;
this.setData({
index: num
@@ -143,7 +162,7 @@
this.triggerParent();
// 鏇存柊鎸夐挳鐘舵��
- this.updateBtnDis();
+
},
changeActive1(e) {
console.log(e.detail.index);
@@ -184,7 +203,7 @@
var roleKey = wx.getStorageSync('roleKey')
let data = {
pageNum: this.data.index,
- pageSize: 10,
+ pageSize: 5,
state: this.data.state,
orderType: '2',
}
@@ -216,14 +235,14 @@
if (res.data.code == 200 && res.data.rows.length > 0) {
let data = res.data
- let total = Math.ceil(res.data.total / 10)
+ let total = Math.ceil(res.data.total / 5)
this.setData({
listdata: data.rows,
total: total,
showPage: true,
showNull: false
})
- console.log(this.data.listdata)
+ this.goTop()
wx.hideLoading()
} else {
this.setData({
@@ -232,6 +251,7 @@
showPage: false,
showNull: true
})
+ this.goTop()
wx.hideLoading()
}
}
@@ -246,6 +266,7 @@
pageSize: 10000,
deptId: wx.getStorageSync('deptId'),
roleKey: 'tenanthelper',
+ isAuthentication: 1
}
console.log(data);
wx.request({
@@ -368,6 +389,12 @@
url: '/pages/prorepwx/prorepwx?info=' + JSON.stringify(item),
})
},
+ yetstatements(e) {
+ let item = JSON.parse(JSON.stringify(e.currentTarget.dataset.base))
+ wx.navigateTo({
+ url: '/pages/yetWX/yetWX?info=' + JSON.stringify(item),
+ })
+ },
goAddress(e) {
var address = e.currentTarget.dataset.base.address
console.log(e.currentTarget.dataset);
@@ -446,6 +473,7 @@
index: 1,
modalHidden: true
})
+ this.getNumInfo()
this.getList()
} else {
this.setData({
@@ -473,7 +501,7 @@
},
DelChange() {
wx.request({
- url: `https://puyue.yhupai.com/prod-api/iot/deviceOrder/${this.data.form.id}`,
+ url: `https://puyue.yhupai.com/prod-api/iot/deviceOrder/${this.data.form.id}/${this.data.form.deviceId}`,
method: "DELETE",
header: {
"Access-Control-Allow-Headers": 'token',
@@ -485,6 +513,7 @@
index: 1,
delModal: true
})
+ this.getNumInfo()
this.getList()
} else {
this.setData({
--
Gitblit v1.8.0