diff --git a/epdc-resident-mp-yushan/app.json b/epdc-resident-mp-yushan/app.json
index d869128..9a87c3c 100644
--- a/epdc-resident-mp-yushan/app.json
+++ b/epdc-resident-mp-yushan/app.json
@@ -175,6 +175,13 @@
"pages": [
"pages/brightStatus/brightStatus"
]
+ },
+ {
+ "root": "subpages/gridArmy",
+ "name": "gridArmy",
+ "pages": [
+ "pages/index/index"
+ ]
}
],
"preloadRule": {
diff --git a/epdc-resident-mp-yushan/pages/index/index.js b/epdc-resident-mp-yushan/pages/index/index.js
index 134431d..7c58ba7 100644
--- a/epdc-resident-mp-yushan/pages/index/index.js
+++ b/epdc-resident-mp-yushan/pages/index/index.js
@@ -33,11 +33,11 @@ Page({
communityNewsList: [],
currentIndex: 0,
moduleList: [
- { icon: 'https://epdc-yushan.elinkservice.cn/files-pro/20210914/b37b7368b6b64dd5993d096ef1ee33cc.png', tip: '积分排名' },
- { icon: 'https://epdc-yushan.elinkservice.cn/files-pro/20210914/59c1cf60c4214789a6ef3750588de98f.png', tip: '指尖榆山' },
- { icon: 'https://epdc-yushan.elinkservice.cn/files-pro/20210914/9d34f487426841cc8c32c42488c78969.png', tip: '网格队伍' },
- { icon: 'https://epdc-yushan.elinkservice.cn/files-pro/20210914/c6c7c00117ab41eba7d240fcfba5b148.png', tip: '志愿服务' },
- { icon: 'https://epdc-yushan.elinkservice.cn/files-pro/20210914/b884f294e3634f66b7ff36be682046a2.png', tip: '社会组织' }
+ { icon: 'https://epdc-yushan.elinkservice.cn/files-pro/20210914/b37b7368b6b64dd5993d096ef1ee33cc.png', tip: '积分排名', module: 'pointRank' },
+ { icon: 'https://epdc-yushan.elinkservice.cn/files-pro/20210914/59c1cf60c4214789a6ef3750588de98f.png', tip: '指尖榆山', module: 'fingerYushan' },
+ { icon: 'https://epdc-yushan.elinkservice.cn/files-pro/20210914/9d34f487426841cc8c32c42488c78969.png', tip: '网格队伍', module: 'gridArmy' },
+ { icon: 'https://epdc-yushan.elinkservice.cn/files-pro/20210914/c6c7c00117ab41eba7d240fcfba5b148.png', tip: '志愿服务', module: 'volunteerService' },
+ { icon: 'https://epdc-yushan.elinkservice.cn/files-pro/20210914/b884f294e3634f66b7ff36be682046a2.png', tip: '社会组织', module: 'societyOrg' }
]
},
onLoad(options) {
@@ -369,5 +369,48 @@ Page({
}).catch(err => {
console.error(err)
})
+ },
+ // 模块列表跳转
+ navigateToModule(e) {
+ const { module } = e.currentTarget.dataset
+ if (module === 'gridArmy') {
+ wx.navigateTo({
+ url: '/subpages/gridArmy/pages/index/index'
+ })
+ } else if (module === 'pointRank') {
+ wx.navigateTo({
+ url: '/subpages/integralCentre/pages/index/index'
+ })
+ } else if (module === 'volunteerService') {
+ wx.navigateTo({
+ url: '/pages/heart/heart'
+ })
+ } else if (module === 'societyOrg') {
+ wx.showToast({
+ title: '敬请期待~',
+ icon: 'none'
+ })
+ } else if (module === 'fingerYushan') {
+
+ }
+ },
+ // 我有事要说跳转
+ navigateToDiscussion() {
+ if (app.globalData.infoCompleted == 0) {
+ this.setData({
+ completeInfoDialogVisible: !this.data.completeInfoDialogVisible
+ })
+ return false
+ }
+ wx.navigateTo({
+ url: '/subpages/discussion/pages/addIssue/addIssue'
+ })
+ },
+ // 拨打便民服务电话
+ callPhone(e) {
+ const { phone } = e.currentTarget.dataset
+ wx.makePhoneCall({
+ phoneNumber: phone
+ })
}
})
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/pages/index/index.json b/epdc-resident-mp-yushan/pages/index/index.json
index d52b5c5..8dd56b3 100644
--- a/epdc-resident-mp-yushan/pages/index/index.json
+++ b/epdc-resident-mp-yushan/pages/index/index.json
@@ -1,6 +1,7 @@
{
"navigationStyle": "custom",
"navigationBarTextStyle": "white",
+ "backgroundColor": "#f7f7f7",
"usingComponents": {
"move-btn": "/components/moveButton/moveButton",
"community-news-list": "../index_bk/components/communityNewsList/communityNewsList"
diff --git a/epdc-resident-mp-yushan/pages/index/index.wxml b/epdc-resident-mp-yushan/pages/index/index.wxml
index 7d6dad6..0966efd 100644
--- a/epdc-resident-mp-yushan/pages/index/index.wxml
+++ b/epdc-resident-mp-yushan/pages/index/index.wxml
@@ -53,12 +53,12 @@
- 拨打
+ 拨打
-
+
@@ -72,7 +72,7 @@
-
+
diff --git a/epdc-resident-mp-yushan/project.private.config.json b/epdc-resident-mp-yushan/project.private.config.json
index 37e536f..3af8947 100644
--- a/epdc-resident-mp-yushan/project.private.config.json
+++ b/epdc-resident-mp-yushan/project.private.config.json
@@ -11,12 +11,11 @@
"list": []
},
"miniprogram": {
- "list": [
- {
+ "list": [{
"id": 0,
"name": "带参数二维码",
"pathName": "pages/index/index",
- "query": "scene=1169158362718629889&inviteUserId=12345",
+ "query": "scene=1288048536265261057&inviteUserId=12345",
"scene": 1011
},
{
@@ -56,6 +55,12 @@
"pathName": "subpages/heart/pages/moreList/moreList",
"query": "",
"scene": null
+ },
+ {
+ "name": "网格队伍",
+ "pathName": "subpages/gridArmy/pages/index/index",
+ "query": "",
+ "scene": null
}
]
}
diff --git a/epdc-resident-mp-yushan/subpages/gridArmy/images/community.png b/epdc-resident-mp-yushan/subpages/gridArmy/images/community.png
new file mode 100644
index 0000000..5ff162e
Binary files /dev/null and b/epdc-resident-mp-yushan/subpages/gridArmy/images/community.png differ
diff --git a/epdc-resident-mp-yushan/subpages/gridArmy/images/phone.png b/epdc-resident-mp-yushan/subpages/gridArmy/images/phone.png
new file mode 100644
index 0000000..ea1fc33
Binary files /dev/null and b/epdc-resident-mp-yushan/subpages/gridArmy/images/phone.png differ
diff --git a/epdc-resident-mp-yushan/subpages/gridArmy/pages/index/index.js b/epdc-resident-mp-yushan/subpages/gridArmy/pages/index/index.js
new file mode 100644
index 0000000..8ef40f4
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/gridArmy/pages/index/index.js
@@ -0,0 +1,90 @@
+const api = require('../../../../utils/api')
+
+Page({
+ data: {
+ loadMoreType: 'none',
+ loadMoreVisible: false,
+ pageNo: 1,
+ pageSize: 10,
+ deptName: '',
+ deptIntro: '',
+ griderList: []
+ },
+ onLoad() {
+ this.getDeptInfo()
+ this.getMemberList()
+ },
+ onReachBottom() {
+ this.setData({
+ loadMoreVisible: true
+ })
+ if (this.data.loadMoreType === 'loading') {
+ this.data.pageNo += 1
+ this.loadMoreMemberList()
+ }
+ },
+ // 社区介绍
+ getDeptInfo() {
+ api.getDeptInfo().then(res => {
+ console.log(res)
+ const { deptInfo, deptName } = res.data
+ this.setData({
+ deptName: deptName,
+ deptIntro: deptInfo
+ })
+ }).catch(err => {
+ console.error(err)
+ })
+ },
+ // 初始化加载网格员队伍
+ getMemberList() {
+ const params = {
+ pageIndex: this.data.pageNo,
+ pageSize: this.data.pageSize
+ }
+ wx.showLoading({
+ title: '加载中...'
+ })
+ api.getMemberList(params).then(res => {
+ wx.hideLoading()
+ const arr = []
+ // res.data.forEach()
+ this.setData({
+ griderList: res.data,
+ loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none'
+ })
+ }).catch(err => {
+ wx.hideLoading()
+ this.setData({
+ griderList: [],
+ loadMoreType: 'none'
+ })
+ })
+ },
+ // 下拉加载 网格员列表
+ loadMoreMemberList() {
+ const params = {
+ pageIndex: this.data.pageNo,
+ pageSize: this.data.pageSize
+ }
+ wx.showLoading({
+ title: '加载中...'
+ })
+ api.getMemberList(params).then(res => {
+ wx.hideLoading()
+ this.setData({
+ griderList: this.data.griderList.concat(res.data),
+ loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none'
+ })
+ }).catch(err => {
+ wx.hideLoading()
+ console.error(err)
+ })
+ },
+ callGrider(e) {
+ const { phone } = e.currentTarget.dataset
+ wx.makePhoneCall({
+ phoneNumber: phone
+ })
+ }
+})
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/gridArmy/pages/index/index.json b/epdc-resident-mp-yushan/subpages/gridArmy/pages/index/index.json
new file mode 100644
index 0000000..0e14f91
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/gridArmy/pages/index/index.json
@@ -0,0 +1,9 @@
+{
+ "navigationBarBackgroundColor": "#d73e32",
+ "backgroundColor": "#f7f7f7",
+ "navigationBarTextStyle": "white",
+ "navigationBarTitleText": "网格队伍",
+ "usingComponents": {
+ "no-data": "/components/nodata/nodata"
+ }
+}
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/gridArmy/pages/index/index.wxml b/epdc-resident-mp-yushan/subpages/gridArmy/pages/index/index.wxml
new file mode 100644
index 0000000..dd57306
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/gridArmy/pages/index/index.wxml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+ {{item.name}}
+ 格言:{{item.motto}}
+ 负责区域:{{item.territory}}
+ 电话:{{item.mobile}}
+
+
+
+
+ 打电话
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/gridArmy/pages/index/index.wxss b/epdc-resident-mp-yushan/subpages/gridArmy/pages/index/index.wxss
new file mode 100644
index 0000000..ee09b55
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/gridArmy/pages/index/index.wxss
@@ -0,0 +1,129 @@
+page {
+ background: #f7f7f7;
+}
+
+image {
+ width: 100%;
+ height: 100%;
+ float: left;
+}
+
+.grid-army {
+ width: 100%;
+ height: auto;
+}
+
+.community-intro {
+ width: 100%;
+ background: linear-gradient(to bottom, #d73e32, #cd1b1e);
+ box-sizing: border-box;
+ padding: 0 32rpx 80rpx;
+}
+
+.community-intro .community-name {
+ display: flex;
+ align-items: center;
+ height: 100rpx;
+ width: 100%;
+}
+
+.community-intro .community-name .icon {
+ width: 56rpx;
+ height: 56rpx;
+}
+
+.community-intro .community-name .name {
+ font-size: 52rpx;
+ color: #fff;
+ margin-left: 15rpx;
+}
+
+.community-intro .community-detail {
+ font-size: 30rpx;
+ color: #fff;
+ line-height: 50rpx;
+ text-indent: 60rpx;
+}
+
+.grider-list {
+ width: 100%;
+ box-sizing: border-box;
+ padding: 0 32rpx;
+ margin-top: -40rpx;
+ display: grid;
+ grid-template-columns: repeat(2, 1fr);
+ grid-auto-flow: dense;
+ column-gap: 30rpx;
+}
+
+.grider-list .grid-item {
+ width: 100%;
+ background: #fff;
+ margin-bottom: 20rpx;
+ border-radius: 14rpx;
+ box-sizing: border-box;
+ padding: 40rpx 30rpx 30rpx;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+}
+
+.grider-list .grid-item .avatar {
+ width: 110rpx;
+ height: 110rpx;
+ border-radius: 50%;
+ background: yellow;
+ overflow: hidden;
+}
+
+.grider-list .grid-item .name {
+ font-size: 30rpx;
+ line-height: 50rpx;
+ color: #333;
+ margin-top: 20rpx;
+}
+
+.grider-list .grid-item .item {
+ width: 100%;
+ line-height: 36rpx;
+ font-size: 26rpx;
+ color: #c1c1c1;
+}
+
+.grider-list .grid-item .item + .item {
+ margin-top: 4rpx;
+}
+
+.grider-list .grid-item .call-phone {
+ margin-top: 20rpx;
+ width: 156rpx;
+ height: 56rpx;
+ background-image: linear-gradient(90deg,
+ #e3271c 0%,
+ #f95c2c 100%),
+ linear-gradient(
+ #8da5eb,
+ #8da5eb);
+ background-blend-mode: normal,
+ normal;
+ border-radius: 28rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 26rpx;
+ color: #ffffff;
+}
+
+.grider-list .grid-item .call-phone .phone {
+ width:23rpx;
+ height:27rpx;
+ margin-right: 6rpx;
+}
+
+.no-data-container {
+ width: 100%;
+ height: 50vh;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/utils/api.js b/epdc-resident-mp-yushan/utils/api.js
index 56164e9..28411ac 100644
--- a/epdc-resident-mp-yushan/utils/api.js
+++ b/epdc-resident-mp-yushan/utils/api.js
@@ -61,7 +61,9 @@ module.exports = {
submitQuestion: submitQuestion,
getMyQuestion: getMyQuestion,
getConsultantDetail: getConsultantDetail,
- gridmanList: gridmanList
+ gridmanList: gridmanList,
+ getDeptInfo: getDeptInfo,
+ getMemberList: getMemberList
}
function getToken(wxCode) {
@@ -208,14 +210,14 @@ function changeGrid(gridId) {
/**
* 获取 议题列表
*/
-function getIssueList (params) {
+function getIssueList(params) {
return fly.get('events/issue/list', params)
}
/**
* 获取项目列表
*/
-function getProjectList (params) {
+function getProjectList(params) {
return fly.get('events/item/list', params)
}
// ---------------------------------党群议事 end ---------------------
@@ -490,4 +492,14 @@ export function getConsultantDetail(id) {
/********心理咨询-居民端-心理咨询-我的问题列表*******/
export function getMyQuestion(param) {
return fly.get('property/psychology/listUserQuestion', param)
-}
\ No newline at end of file
+}
+
+// 网格队伍-社区介绍
+function getDeptInfo() {
+ return fly.get('sys/gridMember/getDeptInfo')
+}
+
+// 网格队伍-网格员列表
+function getMemberList(params) {
+ return fly.get('sys/gridMember/getMemberList', params)
+}
diff --git a/epdc-resident-mp-yushan/utils/config.js b/epdc-resident-mp-yushan/utils/config.js
index 0918b71..a235be8 100644
--- a/epdc-resident-mp-yushan/utils/config.js
+++ b/epdc-resident-mp-yushan/utils/config.js
@@ -7,8 +7,8 @@ module.exports = {
function BASEURL() {
// return 'http://192.168.51.31:9094/epdc-api/api/' // 测试环境 接口地址
- // return "https://epdc-api-test.elinkservice.cn/epdc-api/api/" // 测试环境 ip接口地址
- return 'https://epdc-yushan.elinkservice.cn/epdc-api/api/' // 现代榆山正式环境
+ return "https://epdc-api-test.elinkservice.cn/epdc-api/api/" // 测试环境 ip接口地址
+ // return 'https://epdc-yushan.elinkservice.cn/epdc-api/api/' // 现代榆山正式环境
}
function WEBROOT() {