|
@ -41,6 +41,14 @@ Page({ |
|
|
infoCompleted: 0, //是否完善了用户信息
|
|
|
infoCompleted: 0, //是否完善了用户信息
|
|
|
completeInfoDialogVisible: false, |
|
|
completeInfoDialogVisible: false, |
|
|
tabRightList: [], //拼团购和顺道捎
|
|
|
tabRightList: [], //拼团购和顺道捎
|
|
|
|
|
|
volunteerTagId: '',//志愿者标签id
|
|
|
|
|
|
tagList: [ |
|
|
|
|
|
{ |
|
|
|
|
|
tagName: '全部', |
|
|
|
|
|
id: '' |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
|
|
|
isLoading: false, //防止标签切换加载数据时点击切换标签
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -48,6 +56,7 @@ Page({ |
|
|
*/ |
|
|
*/ |
|
|
onLoad: function () { |
|
|
onLoad: function () { |
|
|
this.bannerListV2() |
|
|
this.bannerListV2() |
|
|
|
|
|
this.getVolunteerTags() |
|
|
this.getImgUrl()//获取配置图片
|
|
|
this.getImgUrl()//获取配置图片
|
|
|
this.setData({ |
|
|
this.setData({ |
|
|
statusHeight: app.globalData.deviceInfo.statusHeight, |
|
|
statusHeight: app.globalData.deviceInfo.statusHeight, |
|
@ -96,7 +105,8 @@ Page({ |
|
|
let parms = { |
|
|
let parms = { |
|
|
pageIndex: this.data.indexPage, |
|
|
pageIndex: this.data.indexPage, |
|
|
pageSize: this.data.pageSize, |
|
|
pageSize: this.data.pageSize, |
|
|
nickname: this.data.searchName |
|
|
nickname: this.data.searchName, |
|
|
|
|
|
volunteerTagId: this.data.volunteerTagId |
|
|
} |
|
|
} |
|
|
this.volunteerlist(parms) |
|
|
this.volunteerlist(parms) |
|
|
} |
|
|
} |
|
@ -157,7 +167,8 @@ Page({ |
|
|
let parms = { |
|
|
let parms = { |
|
|
pageIndex: this.data.indexPage, |
|
|
pageIndex: this.data.indexPage, |
|
|
pageSize: this.data.pageSize, |
|
|
pageSize: this.data.pageSize, |
|
|
nickname: this.data.searchName |
|
|
nickname: this.data.searchName, |
|
|
|
|
|
volunteerTagId: this.data.volunteerTagId |
|
|
} |
|
|
} |
|
|
this.volunteerlist(parms) |
|
|
this.volunteerlist(parms) |
|
|
} else if (e.currentTarget.dataset.tab == "tab2") { |
|
|
} else if (e.currentTarget.dataset.tab == "tab2") { |
|
@ -229,7 +240,8 @@ Page({ |
|
|
that.setData({ |
|
|
that.setData({ |
|
|
listLength:res.data.volunteerList.length, |
|
|
listLength:res.data.volunteerList.length, |
|
|
volunteerlist:that.data.volunteerlist.concat(res.data.volunteerList), |
|
|
volunteerlist:that.data.volunteerlist.concat(res.data.volunteerList), |
|
|
volunteerCount: res.data.volunteerCount |
|
|
volunteerCount: res.data.volunteerCount, |
|
|
|
|
|
isLoading: false |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
@ -288,7 +300,8 @@ Page({ |
|
|
let parms = { |
|
|
let parms = { |
|
|
pageIndex: this.data.indexPage, |
|
|
pageIndex: this.data.indexPage, |
|
|
pageSize: this.data.pageSize, |
|
|
pageSize: this.data.pageSize, |
|
|
nickname: this.data.searchName |
|
|
nickname: this.data.searchName, |
|
|
|
|
|
volunteerTagId: this.data.volunteerTagId |
|
|
} |
|
|
} |
|
|
this.volunteerlist(parms) |
|
|
this.volunteerlist(parms) |
|
|
}, |
|
|
}, |
|
@ -324,6 +337,20 @@ Page({ |
|
|
wx.stopPullDownRefresh(); |
|
|
wx.stopPullDownRefresh(); |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 获取志愿者标签列表
|
|
|
|
|
|
getVolunteerTags () { |
|
|
|
|
|
api.getVolunteerTags().then(res => { |
|
|
|
|
|
if (res.code == 0 && res.msg == 'success') { |
|
|
|
|
|
const tagList = this.data.tagList.concat(res.data) |
|
|
|
|
|
console.log('志愿者标签列表: ', tagList) |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
tagList |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
// 获取配置图片
|
|
|
// 获取配置图片
|
|
|
getImgUrl:function (){//0:咨询热线
|
|
|
getImgUrl:function (){//0:咨询热线
|
|
|
let that = this |
|
|
let that = this |
|
@ -372,7 +399,8 @@ Page({ |
|
|
let parms = { |
|
|
let parms = { |
|
|
pageIndex: this.data.indexPage, |
|
|
pageIndex: this.data.indexPage, |
|
|
pageSize: this.data.pageSize, |
|
|
pageSize: this.data.pageSize, |
|
|
nickname: this.data.searchName |
|
|
nickname: this.data.searchName, |
|
|
|
|
|
volunteerTagId: this.data.volunteerTagId |
|
|
} |
|
|
} |
|
|
this.volunteerlist(parms) |
|
|
this.volunteerlist(parms) |
|
|
} else if (this.data.selectedTab == "tab2") { |
|
|
} else if (this.data.selectedTab == "tab2") { |
|
@ -475,4 +503,28 @@ Page({ |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
//选择志愿者标签筛选
|
|
|
|
|
|
changeTag (e) { |
|
|
|
|
|
if (this.data.isLoading) { |
|
|
|
|
|
wx.showToast({ |
|
|
|
|
|
title: '正在加载...', |
|
|
|
|
|
icon: 'loading', |
|
|
|
|
|
}) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
const id = e.currentTarget.dataset.id |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
volunteerTagId: id, |
|
|
|
|
|
volunteerlist: [], |
|
|
|
|
|
indexPage: 1, |
|
|
|
|
|
isLoading: true |
|
|
|
|
|
}) |
|
|
|
|
|
let parms = { |
|
|
|
|
|
pageIndex: this.data.indexPage, |
|
|
|
|
|
pageSize: this.data.pageSize, |
|
|
|
|
|
nickname: this.data.searchName, |
|
|
|
|
|
volunteerTagId: this.data.volunteerTagId |
|
|
|
|
|
} |
|
|
|
|
|
this.volunteerlist(parms) |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |