From ad5c4cc086a40708e66040574ff1d465b66304b6 Mon Sep 17 00:00:00 2001
From: 祖安之光 <11848914+light-of-zuan@user.noreply.gitee.com>
Date: Thu, 07 Aug 2025 10:36:25 +0800
Subject: [PATCH] 新增
---
pages/tabBar/count/countDetail.js | 77 +++++++++++++++++++-------------------
1 files changed, 39 insertions(+), 38 deletions(-)
diff --git a/pages/tabBar/count/countDetail.js b/pages/tabBar/count/countDetail.js
index a673611..f7f4291 100644
--- a/pages/tabBar/count/countDetail.js
+++ b/pages/tabBar/count/countDetail.js
@@ -37,53 +37,54 @@
getList() {
// cloudApi
- const userId = wx.getStorageSync('user').id
- wx.cloud.callFunction({
- name: 'getHazmatFlowByPage',
- data: {...this.data.examParams,userId: userId}
- }).then(res=>{
- if(res.result && Array.isArray(res.result.list) && res.result.list.length>0){
- let list = cloudApi.changeKey(res.result.list)
- if (this.data.examParams.pageNum != 1) {
- this.setData({
- examList: this.data.examList.concat(list),
- totalPage: Math.ceil(res.result.total / res.result.pageSize)
- });
- } else {
- this.setData({
- examList: list,
- totalPage: Math.ceil(res.result.total / res.result.pageSize)
- });
- }
- }else{
- this.setData({
- examList: [],
- totalPage: 0
- });
- }
- })
-
- // api请求
- // api.getHazmatFlowByUser(this.data.examParams).then(res => {
- // if(res.code == 200) {
- // let list = res.data.list ? res.data.list : [];
+ // const userId = wx.getStorageSync('user').id
+ // wx.cloud.callFunction({
+ // name: 'getHazmatFlowByPage',
+ // data: {...this.data.examParams,userId: userId}
+ // }).then(res=>{
+ // if(res.result && Array.isArray(res.result.list) && res.result.list.length>0){
+ // let list = cloudApi.changeKey(res.result.list)
+ // console.log(list,'list')
// if (this.data.examParams.pageNum != 1) {
// this.setData({
- // examList: this.data.examList.concat(list)
+ // examList: this.data.examList.concat(list),
+ // totalPage: Math.ceil(res.result.total / res.result.pageSize)
// });
// } else {
// this.setData({
- // examList: res.data.list,
- // totalPage: res.data.totalPage
+ // examList: list,
+ // totalPage: Math.ceil(res.result.total / res.result.pageSize)
// });
// }
- // } else {
- // wx.showToast({
- // title: res.message,
- // icon: 'none'
+ // }else{
+ // this.setData({
+ // examList: [],
+ // totalPage: 0
// });
// }
- // });
+ // })
+
+ // api请求
+ api.getHazmatFlowByUser(this.data.examParams).then(res => {
+ if(res.code == 200) {
+ let list = res.data.list ? res.data.list : [];
+ if (this.data.examParams.pageNum != 1) {
+ this.setData({
+ examList: this.data.examList.concat(list)
+ });
+ } else {
+ this.setData({
+ examList: res.data.list,
+ totalPage: res.data.totalPage
+ });
+ }
+ } else {
+ wx.showToast({
+ title: res.message,
+ icon: 'none'
+ });
+ }
+ });
},
upper(e) {
--
Gitblit v1.9.2