diff --git a/app.json b/app.json
index c7e1403..333bfaf 100644
--- a/app.json
+++ b/app.json
@@ -63,7 +63,11 @@
"pages/dropByPublish/dropByPublish",
"pages/noticeNewDetail/noticeNewDetail",
"pages/noticeNewList/noticeNewList",
- "pages/scanCodeSignin/scanCodeSignin"
+ "pages/scanCodeSignin/scanCodeSignin",
+ "pages/allianceList/allianceList",
+ "pages/volunteerTeam/volunteerTeam",
+ "pages/teamIntroduction/teamIntroduction",
+ "pages/allianceDetail/allianceDetail"
]
},
{
diff --git a/pages/heartNew/heartNew.js b/pages/heartNew/heartNew.js
index 6d6cbaa..6a58907 100644
--- a/pages/heartNew/heartNew.js
+++ b/pages/heartNew/heartNew.js
@@ -547,6 +547,14 @@ Page({
wx.navigateTo({
url: `/subpages/heart/pages/dropByList/dropByList?title=${e.currentTarget.dataset.title}`
})
+ } else if (e.currentTarget.dataset.code == 'zyzqn_zytd') {
+ wx.navigateTo({
+ url: `/subpages/heart/pages/volunteerTeam/volunteerTeam`
+ })
+ } else if (e.currentTarget.dataset.code == 'zyzqn_gjlm') {
+ wx.navigateTo({
+ url: `/subpages/heart/pages/allianceList/allianceList`
+ })
} else if (e.currentTarget.dataset.code == 'volunteer_sqfd') {
this.myApply()
} else if (e.currentTarget.dataset.code == 'shouye') {
diff --git a/subpages/heart/images/join-team.png b/subpages/heart/images/join-team.png
new file mode 100644
index 0000000..604f526
Binary files /dev/null and b/subpages/heart/images/join-team.png differ
diff --git a/subpages/heart/images/team-top-bar.png b/subpages/heart/images/team-top-bar.png
new file mode 100644
index 0000000..38530d3
Binary files /dev/null and b/subpages/heart/images/team-top-bar.png differ
diff --git a/subpages/heart/images/team-top-bg.png b/subpages/heart/images/team-top-bg.png
new file mode 100644
index 0000000..7c5d2a2
Binary files /dev/null and b/subpages/heart/images/team-top-bg.png differ
diff --git a/subpages/heart/pages/allianceDetail/allianceDetail.js b/subpages/heart/pages/allianceDetail/allianceDetail.js
new file mode 100644
index 0000000..c62caaa
--- /dev/null
+++ b/subpages/heart/pages/allianceDetail/allianceDetail.js
@@ -0,0 +1,23 @@
+const api = require("../../utils/api")
+import util from "../../../../utils/util"
+Page({
+ data: {
+ noticeObj: '',
+ noticeObjContent: ''
+ },
+ onLoad: function (options) {
+ if (options.id) {
+ this.getVolunteerUnionDetail(options.id)
+ }
+ },
+ getVolunteerUnionDetail (id) {
+ api.getVolunteerUnionDetail({ id }).then(res => {
+ this.setData({
+ noticeObj: res.data,
+ noticeObjContent: util.formatRichText(res.data.content)
+ })
+ }).catch(err => {
+ console.log(err)
+ })
+ }
+})
\ No newline at end of file
diff --git a/subpages/heart/pages/allianceDetail/allianceDetail.json b/subpages/heart/pages/allianceDetail/allianceDetail.json
new file mode 100644
index 0000000..1a0bac0
--- /dev/null
+++ b/subpages/heart/pages/allianceDetail/allianceDetail.json
@@ -0,0 +1,6 @@
+{
+ "navigationBarTitleText": "详情",
+ "usingComponents": {
+ "parser": "../../../../components/parser/parser"
+ }
+}
\ No newline at end of file
diff --git a/subpages/heart/pages/allianceDetail/allianceDetail.wxml b/subpages/heart/pages/allianceDetail/allianceDetail.wxml
new file mode 100644
index 0000000..f4f67c1
--- /dev/null
+++ b/subpages/heart/pages/allianceDetail/allianceDetail.wxml
@@ -0,0 +1,3 @@
+
+
+
diff --git a/subpages/heart/pages/allianceDetail/allianceDetail.wxss b/subpages/heart/pages/allianceDetail/allianceDetail.wxss
new file mode 100644
index 0000000..67a8f9a
--- /dev/null
+++ b/subpages/heart/pages/allianceDetail/allianceDetail.wxss
@@ -0,0 +1,4 @@
+.alliance-detail {
+ padding: 20rpx;
+ box-sizing: border-box;
+}
\ No newline at end of file
diff --git a/subpages/heart/pages/allianceList/allianceList.js b/subpages/heart/pages/allianceList/allianceList.js
new file mode 100644
index 0000000..6e3fe56
--- /dev/null
+++ b/subpages/heart/pages/allianceList/allianceList.js
@@ -0,0 +1,67 @@
+const api = require("../../utils/api")
+Page({
+ data: {
+ pageIndex: 1,
+ pageSize: 10,
+ nodata: false,
+ loadMoreType: 'none',
+ loadMoreVisible: false,
+ allianceList: [], // 联盟列表
+ },
+ onLoad: function (options) {
+ this.setData({
+ pageIndex: 1,
+ dropbylist: []
+ })
+ this.getVolunteerUnionList()
+ },
+ onReachBottom: function () {
+ this.setData({
+ loadMoreVisible: true
+ })
+ if (this.data.loadMoreType === "loading") {
+ this.setData({
+ pageIndex: this.data.pageIndex + 1
+ })
+ this.getVolunteerUnionList()
+ }
+ },
+ // 前往联盟详情
+ toAllianceDetail (e) {
+ let id = e.currentTarget.dataset.id
+ wx.navigateTo({
+ url: `../allianceDetail/allianceDetail?id=${id}`
+ })
+ },
+ //
+ getVolunteerUnionList () {
+ const para = {
+ pageIndex: this.data.pageIndex,
+ pageSize: this.data.pageSize
+ }
+ api.getVolunteerUnionList(para).then(res => {
+ console.log(res)
+ this.setData({
+ allianceList: [...this.data.allianceList,...res.data],
+ loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none',
+ loadMoreVisible: res.data.length === this.data.pageSize ? false : true,
+ nodata: false,
+ })
+ if (this.data.allianceList.length == 0) {
+ this.setData({
+ nodata: true,
+ loadMoreType: 'none',
+ loadMoreVisible: false,
+ })
+ }
+ }).catch(err => {
+ this.setData({
+ allianceList: [],
+ nodata: true,
+ loadMoreType: 'none',
+ loadMoreVisible: false,
+ })
+ console.log(err)
+ })
+ },
+})
\ No newline at end of file
diff --git a/subpages/heart/pages/allianceList/allianceList.json b/subpages/heart/pages/allianceList/allianceList.json
new file mode 100644
index 0000000..4c2bf0a
--- /dev/null
+++ b/subpages/heart/pages/allianceList/allianceList.json
@@ -0,0 +1,7 @@
+{
+ "navigationBarTitleText": "共建联盟",
+ "usingComponents": {
+ "load-more": "/components/loadMore/loadMore",
+ "no-data": "/components/nodata/nodata"
+ }
+}
\ No newline at end of file
diff --git a/subpages/heart/pages/allianceList/allianceList.wxml b/subpages/heart/pages/allianceList/allianceList.wxml
new file mode 100644
index 0000000..cdf8679
--- /dev/null
+++ b/subpages/heart/pages/allianceList/allianceList.wxml
@@ -0,0 +1,13 @@
+
+
+
+ {{item.unionName}}
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/subpages/heart/pages/allianceList/allianceList.wxss b/subpages/heart/pages/allianceList/allianceList.wxss
new file mode 100644
index 0000000..95c4eab
--- /dev/null
+++ b/subpages/heart/pages/allianceList/allianceList.wxss
@@ -0,0 +1,37 @@
+page {
+ background-color: #f7f7f7;
+}
+.alliance-list {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ background-color: #fff;
+ margin-top: 20rpx;
+}
+.alliance-list .alliance-item {
+ width: 690rpx;
+ height: 110rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+.alliance-list .alliance-item .alliance-title {
+ width: 650rpx;
+ font-size: 34rpx;
+ color: #333333;
+ overflow: hidden;
+ text-overflow:ellipsis;
+ white-space: nowrap;
+}
+.alliance-list .alliance-item .alliance-icon {
+ width: 22rpx;
+ height: 22rpx;
+}
+.alliance-list .list-line {
+ width: 690rpx;
+ height: 1px;
+ background-color: #eeeeee;
+ border-radius: 1px;
+ opacity: 0.5;
+}
\ No newline at end of file
diff --git a/subpages/heart/pages/leaderboardNew/leaderboardNew.js b/subpages/heart/pages/leaderboardNew/leaderboardNew.js
index 2ffaf9a..7581d29 100644
--- a/subpages/heart/pages/leaderboardNew/leaderboardNew.js
+++ b/subpages/heart/pages/leaderboardNew/leaderboardNew.js
@@ -62,7 +62,8 @@ Page({
id: '3',
label: '公益积分记录'
}
- ]
+ ],
+ pioneerList: []
},
// tab 切换
onTabChange (e) {
@@ -71,12 +72,18 @@ Page({
pageNo: 1
})
- if (e.currentTarget.dataset.tab == "tab2") {
+ if (e.currentTarget.dataset.tab == "tab3") {
this.setData({
jilu: false,
signedList: []
})
this.getSignedList()
+ } else if (e.currentTarget.dataset.tab == 'tab2') {
+ this.setData({
+ jilu: true,
+ pioneerList: []
+ })
+ this.getVolunteerPioneerList()
} else {
this.setData({
jilu: true,
@@ -156,12 +163,32 @@ Page({
})
},
+ // 获取志愿先锋 列表
+ getVolunteerPioneerList() {
+ let params = {
+ pageIndex: this.data.pageNo,
+ pageSize: this.data.pageSize
+ }
+ api.getVolunteerPioneerList(params).then(res => {
+ this.setData({
+ pioneerList: [ ...this.data.pioneerList, ...res.data ],
+ loadMoreType: res.data.length === 10 ? "loading" : "none",
+ preloadVisible: false
+ })
+ }).catch(() => {
+ this.setData({
+ pioneerList: [],
+ loadMoreType: "none",
+ preloadVisible: false
+ })
+ })
+ },
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
- if(this.data.selectTab == "tab2"){
+ if(this.data.selectTab == "tab3"){
this.pulldownRefresh()
}
if (!app.globalData.previewImage) {
@@ -214,7 +241,7 @@ Page({
/**
* 页面上拉触底事件的处理函数
*/
- onReachBottom: function () {
+ onReachBottom: function () {
this.setData({
loadMoreVisible: true
})
@@ -222,10 +249,12 @@ Page({
this.setData({
pageNo: this.data.pageNo + 1
})
- if(this.data.selectTab == "tab2"){
+ if(this.data.selectTab == "tab3") {
this.getSignedList()
- } else {
+ } else if(this.data.selectTab == 'tab1') {
this.loadLoveRanking()
+ } else if(this.data.selectTab == 'tab2') {
+ this.getVolunteerPioneerList()
}
}
},
diff --git a/subpages/heart/pages/leaderboardNew/leaderboardNew.wxml b/subpages/heart/pages/leaderboardNew/leaderboardNew.wxml
index 99d1553..2734a6d 100644
--- a/subpages/heart/pages/leaderboardNew/leaderboardNew.wxml
+++ b/subpages/heart/pages/leaderboardNew/leaderboardNew.wxml
@@ -1,3 +1,4 @@
+
@@ -10,10 +11,35 @@
志愿者银行
- 参与记录
+ 志愿先锋
-
+ 参与记录
+
+
+
+
+
+
+
+
+
+ {{item.realName}}
+ {{filter.getHtmlContent(item.content)}}
+
+
+
+
+
+
+
+ {{item.realName}}
+ {{filter.getHtmlContent(item.content)}}
+
+
+
+
+
diff --git a/subpages/heart/pages/leaderboardNew/leaderboardNew.wxss b/subpages/heart/pages/leaderboardNew/leaderboardNew.wxss
index e44b9bb..7832c4d 100644
--- a/subpages/heart/pages/leaderboardNew/leaderboardNew.wxss
+++ b/subpages/heart/pages/leaderboardNew/leaderboardNew.wxss
@@ -39,15 +39,19 @@ page {
}
.tab-bar .select-bar.tab1 {
- left: calc(25% - 15rpx);
+ left: calc(16% - 15rpx);
transition: left linear 0.4s;
}
.tab-bar .select-bar.tab2 {
- left: calc(75% - 15rpx);
+ left: calc(50% - 15rpx);
transition: left linear 0.4s;
}
+.tab-bar .select-bar.tab3 {
+ left: calc(82% - 15rpx);
+ transition: left linear 0.4s;
+}
/* 参与记录 */
.tab-item {
background: #fff;
@@ -342,4 +346,48 @@ button::after {
}
.bottom .list-item-2 .act-desc .option-red {
color: #da433d;
- }
\ No newline at end of file
+ }
+
+/* 志愿先锋 start */
+.pioneer-list {
+ display: flex;
+ padding: 0 25rpx;
+}
+.pioneer-item {
+ width: 320rpx;
+ min-height: 282rpx;
+ margin: 20rpx 15rpx;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ background-color: #fff;
+ border-radius: 20rpx;
+}
+.pioneer-item .pioneer-img {
+ width: 110rpx;
+ height: 110rpx;
+ background-color: #909090;
+ margin-top: 40rpx;
+ border-radius: 50%;
+}
+.pioneer-item .pioneer-name {
+ font-size: 30rpx;
+ color: #333333;
+ margin-top: 20rpx;
+}
+.pioneer-item .pioneer-intro {
+ font-size: 26rpx;
+ color: #c1c1c1;
+ margin: 18rpx 0 36rpx;
+ width: 85%;
+ text-align: center;
+ /* overflow: hidden;
+ text-overflow: ellipsis;
+ word-wrap:break-word;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 3;
+ display: -webkit-box; */
+}
+/* 志愿先锋 end */
\ No newline at end of file
diff --git a/subpages/heart/pages/teamIntroduction/teamIntroduction.js b/subpages/heart/pages/teamIntroduction/teamIntroduction.js
new file mode 100644
index 0000000..fa92c77
--- /dev/null
+++ b/subpages/heart/pages/teamIntroduction/teamIntroduction.js
@@ -0,0 +1,205 @@
+const api = require('../../utils/api')
+import { getTimestamp } from "../../../../utils/common"
+const app = getApp()
+Page({
+ data: {
+ statusHeight: 0, // 自定义头部状态栏高度
+ navigationHeight: 0, // 自定义头部导航栏高度
+ selectTab: "tab1",
+ pageIndex: 1,
+ pageSize: 10,
+ loadMoreVisible: false,
+ loadMoreType: "none",
+ list: [], // 团队成员列表
+ teamDetail: {},
+ teamId: '',
+ dialogVisible: false,
+ dialogTitle: "",
+ dialogContent: "",
+ dialogConfirmText: "",
+ dialogCancelText: "",
+ },
+ onLoad: function (options) {
+ this.setData({
+ statusHeight: app.globalData.deviceInfo.statusHeight,
+ navigationHeight: app.globalData.deviceInfo.navigationHeight
+ })
+ if (options.id) {
+ this.setData({
+ teamId: options.id
+ })
+ this.getAppTeamDetail()
+ }
+ let params = {
+ pageIndex: 1,
+ pageSize: 10,
+ timestamp: getTimestamp(),
+ actType: 0,
+ qkdat: true,
+ selectedTab: 'tab0',
+ teamId: this.data.teamId
+ }
+ this.selectComponent("#state-0").getActivityList(params)
+ },
+ onShow: function () {
+
+ },
+ onReachBottom: function () {
+ this.setData({
+ loadMoreVisible: true
+ })
+ if (this.data.loadMoreType === "loading") {
+ this.setData({
+ pageIndex: this.data.pageIndex + 1
+ })
+ this.getTeamVolunteerList()
+ }
+ },
+ // 返回上一级
+ goback () {
+ wx.navigateBack({
+ delta: 1
+ })
+ },
+ // 志愿者认证
+ confirmDialog () {
+ wx.navigateTo({
+ url: "/subpages/heart/pages/volunteer/volunteer"
+ })
+ },
+ // 加入团队
+ joinTeam () {
+ let that = this
+ api.getVolunteerVerify().then(res => {
+ if (res.code == 0) {
+ if (res.data && res.data.id) {
+ let param = {
+ volunteerId: this.data.teamDetail.volunteerId,
+ teamId: this.data.teamId
+ }
+ wx.showModal({
+ content: '请确认加入团队',
+ confirmColor: '#04BCA0',
+ success (res) {
+ if (res.confirm) {
+ console.log('用户点击确定')
+ api.joinTeam(param).then(res => {
+ if (res.code == 0 && res.msg == 'success') {
+ wx.showToast({
+ title: '加入成功',
+ icon: 'none',
+ durantion: 2000
+ })
+ that.getAppTeamDetail()
+ } else {
+ wx.showToast({
+ title: res.msg,
+ icon: 'none',
+ durantion: 2000
+ })
+ }
+ })
+ } else if (res.cancel) {
+ console.log('用户点击取消')
+ }
+ }
+ })
+ } else {
+ this.setData({
+ dialogVisible: !this.data.dialogVisible,
+ dialogTitle: "志愿者认证",
+ dialogContent: ["是否前往认证志愿者"],
+ dialogConfirmText: "是",
+ dialogCancelText: "否"
+ })
+ }
+ }
+ }).catch(err => {
+ console.log(err)
+ })
+ },
+ // tab 切换
+ onTabChange (e) {
+ this.setData({
+ selectTab: e.currentTarget.dataset.tab,
+ pageIndex: 1
+ })
+
+ if (e.currentTarget.dataset.tab == "tab1") {
+ this.setData({
+ list: [],
+ nodata: false
+ })
+ let params = {
+ pageIndex: 1,
+ pageSize: 10,
+ timestamp: getTimestamp(),
+ actType: 0,
+ qkdat: true,
+ sponsor: '',
+ selectedTab: 'tab0',
+ teamId: this.data.teamId
+ }
+ this.selectComponent("#state-0").getActivityList(params)
+ } else {
+ this.setData({
+ list: [],
+ })
+ this.getTeamVolunteerList()
+ }
+ },
+ // 通过判断列表的长度断定是否显示加载中
+ toActDetailDown (e) {
+ if (e.detail.listLength !== this.data.pageSize) {
+ this.setData({
+ loadMoreVisible: true,
+ loadMoreType: "none",
+ })
+ }
+ this.setData({
+ actId: e.detail.actId,
+ listLength: e.detail.listLength
+ })
+ },
+ // 团队详情
+ getAppTeamDetail () {
+ api.getAppTeamDetail({ id: this.data.teamId }).then(res => {
+ this.setData({
+ teamDetail: res.data
+ })
+ })
+ },
+ // 团队成员列表
+
+ // 获取团队列表
+ getTeamVolunteerList () {
+ const para = {
+ pageIndex: this.data.pageIndex,
+ pageSize: this.data.pageSize,
+ id: this.data.teamId
+ }
+ api.getTeamVolunteerList(para).then(res => {
+ this.setData({
+ list: [...this.data.list,...res.data],
+ loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none',
+ loadMoreVisible: res.data.length === this.data.pageSize ? false : true,
+ nodata: false,
+ })
+ if (this.data.list.length == 0) {
+ this.setData({
+ nodata: true,
+ loadMoreType: 'none',
+ loadMoreVisible: false,
+ })
+ }
+ }).catch(err => {
+ this.setData({
+ list: [],
+ nodata: true,
+ loadMoreType: 'none',
+ loadMoreVisible: false,
+ })
+ console.log(err)
+ })
+ }
+})
\ No newline at end of file
diff --git a/subpages/heart/pages/teamIntroduction/teamIntroduction.json b/subpages/heart/pages/teamIntroduction/teamIntroduction.json
new file mode 100644
index 0000000..daa2c17
--- /dev/null
+++ b/subpages/heart/pages/teamIntroduction/teamIntroduction.json
@@ -0,0 +1,11 @@
+{
+ "navigationBarTitleText": "团队介绍",
+ "navigationStyle": "custom",
+ "navigationBarTextStyle": "white",
+ "usingComponents": {
+ "activity": "/components/activity/activity",
+ "coverview-dialog": "../../components/coverViewDialog/coverViewDialog",
+ "load-more": "/components/loadMore/loadMore",
+ "no-data": "/components/nodata/nodata"
+ }
+}
\ No newline at end of file
diff --git a/subpages/heart/pages/teamIntroduction/teamIntroduction.wxml b/subpages/heart/pages/teamIntroduction/teamIntroduction.wxml
new file mode 100644
index 0000000..7c75af9
--- /dev/null
+++ b/subpages/heart/pages/teamIntroduction/teamIntroduction.wxml
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+ {{teamDetail.teamName}}
+ {{filter.getHtmlContent(teamDetail.content)}}
+
+
+
+
+
+
+
+ 团队活动
+ 团队成员
+
+
+
+
+
+
+
+
+
+
+
+ {{item.realName}}
+ {{item.introduce}}
+
+
+
+
+
+
+
+ {{item.realName}}
+ {{item.introduce}}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/subpages/heart/pages/teamIntroduction/teamIntroduction.wxss b/subpages/heart/pages/teamIntroduction/teamIntroduction.wxss
new file mode 100644
index 0000000..fac9526
--- /dev/null
+++ b/subpages/heart/pages/teamIntroduction/teamIntroduction.wxss
@@ -0,0 +1,193 @@
+page {
+ background-color: #f7f7f7;
+}
+/* 自定义标题栏 start */
+.header {
+ position: fixed;
+ width: 100%;
+ top: 0;
+ left: 0;
+ z-index: 999;
+}
+.header .header-bg {
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ z-index: 10;
+ left: 0;
+ top: 0;
+}
+.header .navigation {
+ display: flex;
+ align-items: center;
+ position: relative;
+ z-index: 100;
+}
+.header .navigation .goback {
+ width: 40rpx;
+ padding-left: 14rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ height: 100%;
+}
+.header .navigation .goback image {
+ width: 16rpx;
+ height: 28rpx;
+}
+.header .navigation .title {
+ display: flex;
+ align-items: center;
+ width: calc(100% - 46rpx);
+ margin-left: 46rpx;
+ color: rgba(255, 255, 255, 0.9);
+ font-size: 32rpx;
+ letter-spacing: 2rpx;
+}
+/* 自定义标题栏 end */
+.top {
+ width: 100%;
+}
+.top-bg {
+ width: 100%;
+ height: 280rpx;
+ box-sizing: border-box;
+ padding-top: 16rpx;
+ position: relative;
+}
+.top-bg .top-bg-img {
+ width: 100%;
+ height: 110%;
+ position: absolute;
+ top: 0;
+ left: 0;
+}
+.top-bg .top-text {
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 10;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ padding: 0 30rpx;
+ box-sizing: border-box;
+}
+.top-bg .top-text .top-text-title {
+ font-size: 52rpx;
+ color: #ffffff;
+ margin-bottom: 48rpx;
+}
+.top-bg .top-text .top-text-desc {
+ font-size: 30rpx;
+ color: #ffffff;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ word-wrap:break-word;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 3;
+ display: -webkit-box;
+}
+.top-bg .top-button {
+ width: 140rpx;
+ height: 60rpx;
+ position: absolute;
+ right: 0;
+ z-index: 11;
+}
+/* tab bar start */
+
+.tab-bar {
+ width: 100%;
+ height: 90rpx;
+ background: #fff;
+ display: flex;
+ justify-content: space-around;
+ position: relative;
+ padding: 0 40rpx;
+ box-sizing: border-box;
+ border-radius: 16rpx 16rpx 0rpx 0rpx;
+ margin-bottom: 18rpx;
+}
+
+.tab-bar .tab {
+ flex: 1;
+ height: 90rpx;
+ line-height: 90rpx;
+ text-align: center;
+ width: 50%;
+ font-size: 32rpx;
+ font-weight: 500;
+ color: rgba(153, 153, 153, 1);
+}
+
+.tab-bar .select-tab {
+ color: #E50F00;
+ font-size: 32rpx;
+ font-weight: bold;
+}
+
+.tab-bar .select-bar {
+ width: 40rpx;
+ height: 8rpx;
+ border-radius: 5rpx;
+ background: #E50F00;
+ position: absolute;
+ bottom: 0rpx;
+}
+
+.tab-bar .select-bar.tab1 {
+ left: 25%;
+ transition: left linear 0.4s;
+}
+
+.tab-bar .select-bar.tab2 {
+ left: calc(75% - 35rpx);
+ transition: left linear 0.4s;
+}
+/* tab bar end */
+.content .team-member-list {
+ display: flex;
+ padding: 0 25rpx;
+}
+.team-member-list .member-item {
+ width: 320rpx;
+ min-height: 282rpx;
+ margin: 20rpx 15rpx;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ background-color: #fff;
+ border-radius: 20rpx;
+}
+.member-item .member-img {
+ width: 110rpx;
+ height: 110rpx;
+ background-color: #909090;
+ margin-top: 40rpx;
+ border-radius: 50%;
+}
+.member-item .member-name {
+ font-size: 30rpx;
+ color: #333333;
+ margin-top: 20rpx;
+}
+.member-item .member-intro {
+ font-size: 26rpx;
+ color: #c1c1c1;
+ margin: 18rpx 0 36rpx;
+ width: 85%;
+ text-align: center;
+ /* overflow: hidden;
+ text-overflow: ellipsis;
+ word-wrap:break-word;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 3;
+ display: -webkit-box; */
+}
\ No newline at end of file
diff --git a/subpages/heart/pages/volunteer/volunteer.js b/subpages/heart/pages/volunteer/volunteer.js
index 0106d9a..f2dbdad 100644
--- a/subpages/heart/pages/volunteer/volunteer.js
+++ b/subpages/heart/pages/volunteer/volunteer.js
@@ -1,4 +1,5 @@
const api = require("../../../../utils/api")
+const new_api = require('../../utils/api')
const app = getApp()
import { $wuxActionSheet } from "../../../../dist/index"
const config = require("../../../../utils/config")
@@ -51,6 +52,21 @@ Page({
id: ''
}],
deptIndex: 0,
+ teamNames: [], //
+ teamType: {}, //志愿者团队分类
+ teamTypeList: [{
+ typeName: '请选择',
+ typeCode: '',
+ id: ''
+ }],
+ teamTypeIndex: 0,
+ team: {}, //志愿者团队名称
+ teamList: [{
+ teamName: '请选择',
+ teamType: '',
+ id: ''
+ }],
+ teamIndex: 0,
},
onLoad: function () {
this.setData({
@@ -60,8 +76,13 @@ Page({
this.getImgUrl()
this.getPrepareComplete().then(() => {
this.getGridList()
- this.getVolunteerTags()
- this.getVolunteerDepts()
+ // this.getVolunteerTags()
+ // this.getVolunteerDepts()
+ // this.getTeamTypeList().then(res => {
+ // if (this.data.team.id) {
+ // this.getTeamTypeName()
+ // }
+ // })
})
this.checkWxUnionId()
this.getWxCode()
@@ -235,7 +256,9 @@ Page({
volunteerSignature:res.data.volunteerSignature,
volunteerFaceImg:res.data.volunteerFaceImg,
'volunteerTag.id': res.data.volunteerTagId || '0',
- 'volunteerDept.id': res.data.volunteerDeptId || '0'
+ 'volunteerDept.id': res.data.volunteerDeptId || '0',
+ 'team.id': res.data.teamId || '',
+ teamNames: res.data.teamNames
// introduce:res.data.introduce
})
resolve(true)
@@ -350,8 +373,9 @@ Page({
volunteerFaceImg:this.data.volunteerFaceImg,
volunteerNickname:this.data.volunteerNickname.trim(''),
volunteerSignature:this.data.volunteerSignature,
- volunteerTagId: this.data.volunteerTag.id,
- volunteerDeptId: this.data.volunteerDept.id,
+ // volunteerTagId: this.data.volunteerTag.id,
+ // volunteerDeptId: this.data.volunteerDept.id,
+ // teamId: this.data.team.id || '',
wxCode: this.data.unionIdStatus === "1" ? "" : this.data.wxCode,
encryptedData: this.data.unionIdStatus === "1" ? "" : this.data.encryptedData,
iv: this.data.unionIdStatus === "1" ? "" : this.data.iv
@@ -608,4 +632,113 @@ Page({
'volunteerDept.dept': this.data.deptList[index].deptName
})
},
+ //
+ chooseTeamType (e) {
+ let index = e.detail.value
+ this.setData({
+ teamTypeIndex: index,
+ 'teamType.typeName': this.data.teamTypeList[index].typeName,
+ 'teamType.typeCode': this.data.teamTypeList[index].typeCode,
+ 'teamType.id': this.data.teamTypeList[index].id,
+ teamList: [],
+ teamIndex: 0,
+ team: {}
+ })
+ this.getAppTeamListByType()
+ },
+ //
+ chooseTeamName (e) {
+ let index = e.detail.value
+ this.setData({
+ teamIndex: index,
+ 'team.teamName': this.data.teamList[index].teamName,
+ 'team.teamType': this.data.teamList[index].teamType,
+ 'team.id': this.data.teamList[index].id
+ })
+ },
+ // 获取团队类别列表
+ getTeamTypeList () {
+ let param = {
+ pageSize : 99,
+ pageIndex : 1,
+ teamId: ''
+ }
+ return new Promise((resolve, reject) => {
+ new_api.getTeamTypeList(param).then(res => {
+ if (res.code == 0 && res.msg == 'success') {
+ this.setData({
+ teamTypeList: this.data.teamTypeList.concat(res.data)
+ })
+ }
+ resolve()
+ }).catch(err => { reject() })
+ })
+ },
+ getTeamTypeName () {
+ let param = {
+ pageSize : 99,
+ pageIndex : 1,
+ teamId: this.data.team.id
+ }
+ new_api.getTeamTypeList(param).then(res => {
+ if (res.code == 0 && res.msg == 'success') {
+ console.log(this.data.teamTypeList)
+ this.data.teamTypeList.forEach((item, key) => {
+ if (item.id == res.data[0].id) {
+ this.setData({
+ 'teamType.typeName': item.typeName,
+ 'teamType.typeCode': item.typeCode,
+ teamTypeIndex: parseInt(key),
+ 'teamType.id': item.id
+ })
+ this.getAppTeamListByType()
+ }
+ })
+ }
+ }).catch(err => {})
+ },
+ // 获取团队列表
+ getAppTeamListByType () {
+ if (!this.data.teamType.typeCode) {
+ this.setData({
+ teamList: [{
+ teamName: '请选择',
+ teamType: '',
+ id: ''
+ }]
+ })
+ return
+ }
+ const para = {
+ pageIndex: 1,
+ pageSize: 99,
+ typeCode: this.data.teamType.typeCode
+ }
+ new_api.getAppTeamListByType(para).then(res => {
+ if (this.data.team.id) {
+ res.data.forEach((item, key) => {
+ if (this.data.team.id == item.id) {
+ this.setData({
+ teamList: this.data.teamList.concat(res.data),
+ 'team.teamName': item.teamName,
+ 'team.teamType': item.teamType,
+ teamIndex: parseInt(key)+1,
+ })
+ }
+ })
+ } else {
+ this.setData({
+ teamList: this.data.teamList.concat(res.data),
+ 'team.teamName': res.data[0].teamName,
+ 'team.teamType': res.data[0].teamType,
+ 'team.id': res.data[0].id,
+ })
+ }
+ }).catch(err => {
+ this.setData({
+ teamList: []
+ })
+ console.log(err)
+ })
+ }
})
\ No newline at end of file
diff --git a/subpages/heart/pages/volunteer/volunteer.wxml b/subpages/heart/pages/volunteer/volunteer.wxml
index 18d1648..a7e75f5 100644
--- a/subpages/heart/pages/volunteer/volunteer.wxml
+++ b/subpages/heart/pages/volunteer/volunteer.wxml
@@ -89,24 +89,38 @@
-
+
{{tagList[tagIndex].tagName}}
-
+
选择部门
-
{{deptList[deptIndex].deptName}}
+ -->
+
格言
@@ -118,7 +132,21 @@
-
+
+
+
+
+
+
+
+
+ {{item}}
+
+
+
+
diff --git a/subpages/heart/pages/volunteerTeam/volunteerTeam.js b/subpages/heart/pages/volunteerTeam/volunteerTeam.js
new file mode 100644
index 0000000..d7fc74c
--- /dev/null
+++ b/subpages/heart/pages/volunteerTeam/volunteerTeam.js
@@ -0,0 +1,142 @@
+const api = require('../../utils/api')
+const typePageSize = 99
+const typePageIndex = 1
+Page({
+ data: {
+ pageIndex: 1,
+ pageSize: 10,
+ nodata: false,
+ loadMoreType: 'none',
+ loadMoreVisible: false,
+ selectBarLeft: 0,
+ teamCategoryList: [],
+ volunteerTeamList: [],
+ typeCode: '', // 当前类别code
+ },
+ onLoad: function (options) {
+
+ },
+ onShow: function () {
+ this.setData({
+ pageIndex: 1,
+ volunteerTeamList: []
+ })
+ const _this = this
+ const query = wx.createSelectorQuery().in(this)
+ this.getTeamTypeList().then(getType => {
+ if (getType) {
+ query.select('#item1').boundingClientRect()
+ query.exec(function(res){
+ _this.setData({
+ selectBarLeft: res[0].width/2
+ })
+ console.log(_this.data.selectBarLeft)
+ })
+ this.getAppTeamListByType()
+ } else {
+
+ }
+ })
+ },
+ onReachBottom: function () {
+ this.setData({
+ loadMoreVisible: true
+ })
+ if (this.data.loadMoreType === "loading") {
+ this.setData({
+ pageIndex: this.data.pageIndex + 1
+ })
+ this.getAppTeamListByType()
+ }
+ },
+ // 前往团队介绍
+ toTeamDetail (e) {
+ let id = e.currentTarget.dataset.id
+ wx.navigateTo({
+ url: `../teamIntroduction/teamIntroduction?id=${id}`
+ })
+ },
+ // 分类导航切换
+ onChangeClassifyTab (e) {
+ let code = e.currentTarget.dataset.code
+ this.data.teamCategoryList.forEach((item, index) => {
+ if (index === e.currentTarget.dataset.tab) {
+ item.select = true
+ const _this = this
+ const query = wx.createSelectorQuery().in(this)
+ query.select(`#item${index + 1}`).boundingClientRect()
+ query.exec(function(res){
+ _this.setData({
+ selectBarLeft: res[0].width/2
+ })
+ console.log(_this.data.selectBarLeft)
+ })
+ } else {
+ item.select = false
+ }
+ })
+ this.setData({
+ teamCategoryList: this.data.teamCategoryList,
+ typeCode: code,
+ pageIndex: 1,
+ volunteerTeamList: []
+ }, () => {
+ this.getAppTeamListByType()
+ })
+ },
+ // 获取团队类别列表
+ getTeamTypeList () {
+ let param = {
+ pageSize : typePageSize,
+ pageIndex : typePageIndex,
+ teamId: ''
+ }
+ return new Promise ((resolve, reject) => {
+ api.getTeamTypeList(param).then(res => {
+ if (res.code == 0 && res.msg == 'success') {
+ res.data[0].select = true
+ this.setData({
+ teamCategoryList: res.data,
+ typeCode: res.data[0].typeCode
+ })
+ resolve(true)
+ }
+ reject(false)
+ }).catch(err => {
+ reject(false)
+ })
+ })
+ },
+ // 获取团队列表
+ getAppTeamListByType () {
+ const para = {
+ pageIndex: this.data.pageIndex,
+ pageSize: this.data.pageSize,
+ typeCode: this.data.typeCode
+ }
+ api.getAppTeamListByType(para).then(res => {
+ console.log(res)
+ this.setData({
+ volunteerTeamList: [...this.data.volunteerTeamList,...res.data],
+ loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none',
+ loadMoreVisible: res.data.length === this.data.pageSize ? false : true,
+ nodata: false,
+ })
+ if (this.data.volunteerTeamList.length == 0) {
+ this.setData({
+ nodata: true,
+ loadMoreType: 'none',
+ loadMoreVisible: false,
+ })
+ }
+ }).catch(err => {
+ this.setData({
+ volunteerTeamList: [],
+ nodata: true,
+ loadMoreType: 'none',
+ loadMoreVisible: false,
+ })
+ console.log(err)
+ })
+ }
+})
\ No newline at end of file
diff --git a/subpages/heart/pages/volunteerTeam/volunteerTeam.json b/subpages/heart/pages/volunteerTeam/volunteerTeam.json
new file mode 100644
index 0000000..9925176
--- /dev/null
+++ b/subpages/heart/pages/volunteerTeam/volunteerTeam.json
@@ -0,0 +1,7 @@
+{
+ "navigationBarTitleText": "志愿团队",
+ "usingComponents": {
+ "load-more": "/components/loadMore/loadMore",
+ "no-data": "/components/nodata/nodata"
+ }
+}
\ No newline at end of file
diff --git a/subpages/heart/pages/volunteerTeam/volunteerTeam.wxml b/subpages/heart/pages/volunteerTeam/volunteerTeam.wxml
new file mode 100644
index 0000000..d3c2102
--- /dev/null
+++ b/subpages/heart/pages/volunteerTeam/volunteerTeam.wxml
@@ -0,0 +1,32 @@
+
+
+
+
+ {{item.typeName}}
+
+
+
+
+
+
+
+ {{item.teamName}}
+
+
+
+
+
+
+
+
+
+
diff --git a/subpages/heart/pages/volunteerTeam/volunteerTeam.wxss b/subpages/heart/pages/volunteerTeam/volunteerTeam.wxss
new file mode 100644
index 0000000..41f5df1
--- /dev/null
+++ b/subpages/heart/pages/volunteerTeam/volunteerTeam.wxss
@@ -0,0 +1,91 @@
+page {
+ background-color: #f7f7f7;
+}
+.classify-tab {
+ width: 100%;
+ height: 90rpx;
+ border-bottom: 1rpx solid #eaeaea;
+ background-color: #fff;
+ padding: 0rpx 20rpx;
+ box-sizing: border-box;
+}
+::-webkit-scrollbar{
+ width: 0;
+ height: 0;
+ color: transparent;
+ display:none;
+}
+.classify-tab .tab-list {
+ width: auto;
+ min-width: 100%;
+ height: 90rpx;
+ display: flex;
+}
+.tab-list .item {
+ height: 90rpx;
+ color: #ababab;
+ font-size: 30rpx;
+ margin: 0 20rpx;
+ line-height: 90rpx;
+ flex-shrink: 0;
+ position: relative;
+ width: 150rpx;
+ text-align: center;
+}
+.tab-list .item.select {
+ color: #FF4848;
+ font-size: 32rpx;
+ font-weight: bold;
+}
+.tab-list .item:first-child {
+ margin-left: 0;
+}
+.tab-list .item:last-child {
+ margin-right: 0;
+}
+.classify-tab .tab-list .item .select-bar {
+ width: 30rpx;
+ height: 8rpx;
+ border-radius: 4rpx;
+ background: #FF4848;
+ position: absolute;
+ bottom: 0;
+ left: 0;
+}
+
+/* list */
+
+.volunteer-list {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ background-color: #fff;
+ margin-top: 20rpx;
+}
+.volunteer-list .volunteer-item {
+ width: 690rpx;
+ height: 110rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+.volunteer-list .volunteer-item .volunteer-title {
+ width: 650rpx;
+ font-size: 34rpx;
+ color: #333333;
+ overflow: hidden;
+ text-overflow:ellipsis;
+ white-space: nowrap;
+}
+.volunteer-list .volunteer-item .volunteer-icon {
+ width: 22rpx;
+ height: 22rpx;
+}
+.volunteer-list .list-line {
+ width: 690rpx;
+ height: 1px;
+ background-color: #eeeeee;
+ border-radius: 1px;
+ opacity: 0.7;
+}
\ No newline at end of file
diff --git a/subpages/heart/utils/api.js b/subpages/heart/utils/api.js
index 13be61e..7c3bf6a 100644
--- a/subpages/heart/utils/api.js
+++ b/subpages/heart/utils/api.js
@@ -22,7 +22,14 @@ module.exports = {
signUpOrCancel,
getResidentConfig,
noticelist,
- noticeDetail
+ noticeDetail,
+ getVolunteerUnionList,
+ getVolunteerUnionDetail,
+ getTeamTypeList,
+ getAppTeamListByType,
+ getAppTeamDetail,
+ getTeamVolunteerList,
+ joinTeam
}
//顺道捎-首页列表
@@ -157,4 +164,52 @@ function noticelist (params) {
// 通知详情
function noticeDetail (noticeId) {
return fly.get(`news/notice/detail/${noticeId}`)
+}
+
+// 共建联盟-列表
+function getVolunteerUnionList ({ pageIndex, pageSize }) {
+ return fly.get("heart/volunteer/getVolunteerUnionList", {
+ pageIndex,
+ pageSize
+ })
+}
+// 共建联盟-详情
+function getVolunteerUnionDetail ({ id }) {
+ return fly.get("heart/volunteer/getVolunteerUnionDetail", {
+ id
+ })
+}
+// 志愿团队类别-列表
+function getTeamTypeList ({ pageIndex, pageSize, teamId }) {
+ return fly.get("heart/volunteer/getTeamTypeList", {
+ pageIndex,
+ pageSize,
+ teamId
+ })
+}
+// 志愿团队-列表
+function getAppTeamListByType ({ pageIndex, pageSize, typeCode }) {
+ return fly.get("heart/volunteer/getAppTeamListByType", {
+ pageIndex,
+ pageSize,
+ typeCode
+ })
+}
+// 志愿团队-详情
+function getAppTeamDetail ({ id }) {
+ return fly.get("heart/volunteer/getAppTeamDetail", {
+ id
+ })
+}
+// 志愿团队-详情-成员列表
+function getTeamVolunteerList ({ pageIndex, pageSize, id }) {
+ return fly.get("heart/volunteer/getTeamVolunteerList", {
+ pageIndex,
+ pageSize,
+ id
+ })
+}
+// 志愿团队-加入团队
+function joinTeam (para) {
+ return fly.post("heart/volunteer/joinTeam", para)
}
\ No newline at end of file
diff --git a/utils/activity.js b/utils/activity.js
index 369eebe..b8b5362 100644
--- a/utils/activity.js
+++ b/utils/activity.js
@@ -13,7 +13,8 @@ module.exports = {
getVolunteerVerify,
getResidentConfig,
moduleCategory,
- getImgUrlList
+ getImgUrlList,
+ getAppTeamActList
}
function getActivityList (params) {
@@ -87,4 +88,9 @@ function moduleCategory(params) {
// 获取图片配置列表 优化
function getImgUrlList (params) {
return fly.get('imgConfig/getImgUrlList', params)
+}
+
+// 志愿团队-详情-活动列表
+function getAppTeamActList (params) {
+ return fly.get('heart/volunteer/getAppTeamActList', params)
}
\ No newline at end of file
diff --git a/utils/api.js b/utils/api.js
index b7ba5c1..270bf68 100644
--- a/utils/api.js
+++ b/utils/api.js
@@ -76,7 +76,9 @@ module.exports = {
getCharityPoints: getCharityPoints,
//
getActPeriods,
- getSignInActPeriods
+ getSignInActPeriods,
+ //
+ getVolunteerPioneerList
}
function getToken (wxCode) {
@@ -649,4 +651,9 @@ function getActPeriods (actId) {
// 取消报名时间段列表接口
function getSignInActPeriods (actId) {
return fly.get(`heart/act/getSignInActPeriods`, {actId: actId})
+}
+
+// 志愿先锋-列表
+function getVolunteerPioneerList({ pageIndex, pageSize }) {
+ return fly.get('heart/volunteer/getVolunteerPioneerList', { pageIndex, pageSize })
}
\ No newline at end of file
diff --git a/utils/filter.wxs b/utils/filter.wxs
index 9a3ff94..9b1ff90 100644
--- a/utils/filter.wxs
+++ b/utils/filter.wxs
@@ -27,8 +27,11 @@ var formatTime = function (strDate, format = "yyyy-MM-dd hh:mm:ss") {
var getTags = function (tags=[]) {
return tags.join(' ')
}
-
+var getHtmlContent = function (html) {
+ return html.replace(getRegExp('<\/?.+?\/?>|[ ]', 'g'), '')
+}
module.exports = {
formatTime: formatTime,//日期格式化
- getTags: getTags
+ getTags: getTags,
+ getHtmlContent: getHtmlContent
}
\ No newline at end of file
diff --git a/utils/heartBehavior.js b/utils/heartBehavior.js
index 5aa5b7f..f91b354 100644
--- a/utils/heartBehavior.js
+++ b/utils/heartBehavior.js
@@ -28,12 +28,12 @@ module.exports = Behavior ({
loadBehavior () {
console.log('load heartBehavior')
Promise.all([this.getModuleList(), this.getImgUrl()]).then( () => {
- let newArr = group(this.data.tabList.sort(compare('sort')), 2)
- this.setData({
- tabLeftList: newArr[1],
- tabRightList: newArr[0]
- })
- // 2021.07.09 左右菜单互换位置
+ // let newArr = group(this.data.tabList.sort(compare('sort')), 2)
+ // this.setData({
+ // tabLeftList: newArr[1],
+ // tabRightList: newArr[0]
+ // })
+ // 2021.11.17 取消排序
})
},
// 获取模块信息
@@ -67,7 +67,7 @@ module.exports = Behavior ({
getImgUrl:function (){
return new Promise((resolve, reject) => {
let params = {
- imageTypes: '0, 5, 8, 9'
+ imageTypes: '0, 5, 8, 9, 11, 12'
}
api.getImgUrlList(params).then(res => {
res.data.forEach( item => {
@@ -76,9 +76,14 @@ module.exports = Behavior ({
getImgUrl: item
})
} else if (item.imgType == '5' && (item.imgCode == 'ptg' || item.imgCode == 'sds')) {
- this.data.tabList.push(item)
+ // 2021.11.17 取消排序
+ // this.data.tabList.push(item)
+ // this.setData({
+ // tabList: this.data.tabList
+ // })
+ this.data.tabRightList.push(item)
this.setData({
- tabList: this.data.tabList
+ tabRightList: this.data.tabRightList
})
} else if (item.imgType == '8') {
this.setData({
@@ -90,6 +95,12 @@ module.exports = Behavior ({
// tabList: this.data.tabList
applyBtn: item
})
+ } else if (item.imgType == '11' || item.imgType == '12') {
+ // 2021.11.17 左侧固定 志愿团队 共建联盟
+ this.data.tabLeftList.push(item)
+ this.setData({
+ tabLeftList: this.data.tabLeftList.sort(compare('imgType'))
+ })
}
})
resolve()