From cffa8483980c943ee1ca6ff4546ba9b6b887739e Mon Sep 17 00:00:00 2001
From: 123456 <17862666717>
Date: Fri, 22 Jul 2022 14:03:01 +0800
Subject: [PATCH] =?UTF-8?q?feat:=E5=BF=97=E6=84=BF=E8=80=85=E5=8E=BB?=
=?UTF-8?q?=E5=93=AA=E5=BF=97=E5=8F=8B=E6=9C=B5=E6=9C=B5=E6=96=B0=E5=A2=9E?=
=?UTF-8?q?tab?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.json | 5 +-
pages/heartNew/heartNew.js | 67 ++-
pages/heartNew/heartNew.wxml | 68 +--
pages/heartNew/heartNew.wxss | 37 +-
pages/toRegister/toRegister.js | 2 +-
project.config.json | 22 +-
project.private.config.json | 27 +-
yarn.lock | 932 +++++++++++++++++++++++++++++++++
8 files changed, 1086 insertions(+), 74 deletions(-)
create mode 100644 yarn.lock
diff --git a/app.json b/app.json
index 5de6a9f..b877083 100644
--- a/app.json
+++ b/app.json
@@ -207,5 +207,8 @@
"desc": "e锦水将获取您的位置信息"
}
},
- "sitemapLocation": "sitemap.json"
+ "sitemapLocation": "sitemap.json",
+ "requiredPrivateInfos":[
+ "getLocation"
+ ]
}
\ No newline at end of file
diff --git a/pages/heartNew/heartNew.js b/pages/heartNew/heartNew.js
index 878a3cf..0b64858 100644
--- a/pages/heartNew/heartNew.js
+++ b/pages/heartNew/heartNew.js
@@ -42,12 +42,15 @@ Page({
infoCompleted: 0, //是否完善了用户信息
completeInfoDialogVisible: false,
volunteerTagId: '',//志愿者标签id
- tagList: [
- {
- tagName: '全部',
- id: ''
- }
- ],
+ // tagList: [
+ // {
+ // tagName: '全部',
+ // id: ''
+ // }
+ // ],
+ tagList: [],
+ tagGroupList:[],
+ tagTeamList:[],
isLoading: false, //防止标签切换加载数据时点击切换标签
btnTop: 0,
btnLeft: 0,
@@ -56,6 +59,7 @@ Page({
applyBtn: {}, // 申请发单按钮改为可配置,
searchActive: '', //
searchJingcai: '',
+ volunteerlistType:'expend',
},
/**
@@ -118,7 +122,8 @@ Page({
dingdan: true,
jingcai: true,
volunteerlist:[],//列表置空
- listLength:0
+ listLength:0,
+ volunteerTagId:this.data.tagGroupList[0].id
})
let parms = {
pageIndex: this.data.indexPage,
@@ -184,7 +189,8 @@ Page({
jingcai: true,
volunteerlist:[],//列表置空
listLength:0,
- searchName: ''
+ searchName: '',
+ volunteerTagId:this.data.tagGroupList[0].id
})
let parms = {
pageIndex: this.data.indexPage,
@@ -252,6 +258,43 @@ Page({
actId: ""
})
},
+ // 志愿者tab切换
+ handleType(event) {
+ const volunteerlistType = event.currentTarget.dataset.type;
+ this.setData({
+ volunteerlistType: volunteerlistType,
+ });
+ let params;
+ this.setData({
+ volunteerlist: [],
+ });
+ if(volunteerlistType === 'expend'){
+ params={
+ indexPage: 1,
+ pageIndex: 1,
+ pageSize: 10,
+ isLoading: true,
+ nickname: this.data.searchName,
+ volunteerTagId: this.data.tagGroupList[0].id
+ }
+ this.setData({
+ volunteerTagId: this.data.tagGroupList[0].id,
+ });
+ }else{
+ params={
+ indexPage: 1,
+ pageIndex: 1,
+ pageSize: 10,
+ isLoading: true,
+ nickname: this.data.searchName,
+ volunteerTagId: this.data.tagTeamList[0].id
+ }
+ this.setData({
+ volunteerTagId: this.data.tagTeamList[0].id,
+ });
+ }
+ this.volunteerlist(params)
+ },
// 志愿者列表
volunteerlist (params){
let that = this
@@ -391,10 +434,14 @@ Page({
getVolunteerTags () {
api.getVolunteerTags().then(res => {
if (res.code == 0 && res.msg == 'success') {
- const tagList = this.data.tagList.concat(res.data)
+ const tagList = res.data
+ const tagGroupList = res.data[0].lists
+ const tagTeamList = res.data[1].lists
console.log('志愿者标签列表: ', tagList)
this.setData({
- tagList
+ tagList,
+ tagGroupList,
+ tagTeamList,
})
}
}).catch(err => {
diff --git a/pages/heartNew/heartNew.wxml b/pages/heartNew/heartNew.wxml
index 5f2822e..95745b7 100644
--- a/pages/heartNew/heartNew.wxml
+++ b/pages/heartNew/heartNew.wxml
@@ -55,13 +55,13 @@
-
+
-
+
@@ -96,7 +96,7 @@
-
+
@@ -114,13 +114,40 @@
-
+
+
+
+
+ 服务团
+ 服务队
+
-
-
- {{item.tagName}}
-
-
+
+
+
+
+ {{item.tagName}}
+
+
+
+
+
+
+
+
+ {{item.tagName}}
+
+
+
+
@@ -146,27 +173,8 @@
-
-
-
+
+