Browse Source

1.2.23 网格队伍改版

release
ZhaoTongYao 4 years ago
parent
commit
ce726c2b2b
  1. 4
      epdc-resident-mp-yushan/app.json
  2. 2
      epdc-resident-mp-yushan/pages/index/index.js
  3. 2
      epdc-resident-mp-yushan/pages/toRegister/toRegister.js
  4. BIN
      epdc-resident-mp-yushan/subpages/gridArmy/images/right-sword.png
  5. BIN
      epdc-resident-mp-yushan/subpages/gridArmy/images/top-img.png
  6. 65
      epdc-resident-mp-yushan/subpages/gridArmy/pages/categoryList/categoryList.js
  7. 9
      epdc-resident-mp-yushan/subpages/gridArmy/pages/categoryList/categoryList.json
  8. 18
      epdc-resident-mp-yushan/subpages/gridArmy/pages/categoryList/categoryList.wxml
  9. 77
      epdc-resident-mp-yushan/subpages/gridArmy/pages/categoryList/categoryList.wxss
  10. 56
      epdc-resident-mp-yushan/subpages/gridArmy/pages/communityList/communityList.js
  11. 9
      epdc-resident-mp-yushan/subpages/gridArmy/pages/communityList/communityList.json
  12. 18
      epdc-resident-mp-yushan/subpages/gridArmy/pages/communityList/communityList.wxml
  13. 77
      epdc-resident-mp-yushan/subpages/gridArmy/pages/communityList/communityList.wxss
  14. 22
      epdc-resident-mp-yushan/subpages/gridArmy/pages/index/index.js
  15. 5
      epdc-resident-mp-yushan/subpages/gridArmy/pages/index/index.json
  16. 4
      epdc-resident-mp-yushan/subpages/gridArmy/pages/index/index.wxml
  17. 2
      epdc-resident-mp-yushan/subpages/gridArmy/pages/index/index.wxss
  18. 12
      epdc-resident-mp-yushan/utils/api.js

4
epdc-resident-mp-yushan/app.json

@ -184,7 +184,9 @@
"root": "subpages/gridArmy",
"name": "gridArmy",
"pages": [
"pages/index/index"
"pages/index/index",
"pages/communityList/communityList",
"pages/categoryList/categoryList"
]
},
{

2
epdc-resident-mp-yushan/pages/index/index.js

@ -421,7 +421,7 @@ Page({
const { module } = e.currentTarget.dataset
if (module === 'gridArmy') {
wx.navigateTo({
url: '/subpages/gridArmy/pages/index/index',
url: '/subpages/gridArmy/pages/communityList/communityList',
})
} else if (module === 'pointRank') {
wx.navigateTo({

2
epdc-resident-mp-yushan/pages/toRegister/toRegister.js

@ -21,7 +21,7 @@ Page({
}
})
let that = this
const versionNum = '1.2.22'
const versionNum = '1.2.23'
api.getScanSwitch(versionNum).then(function (res) {
console.log(res.data)
let state = res.data ? res.data.scanFlag : '1'

BIN
epdc-resident-mp-yushan/subpages/gridArmy/images/right-sword.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

BIN
epdc-resident-mp-yushan/subpages/gridArmy/images/top-img.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

65
epdc-resident-mp-yushan/subpages/gridArmy/pages/categoryList/categoryList.js

@ -0,0 +1,65 @@
const api = require('../../../../utils/api')
Page({
data: {
loadType: 'none',
loadVisible: false,
pageIndex: 1,
pageSize: 10,
deptId: '',
isShow: true,
categoryList: [],
categoryCode: '',
},
onLoad(options) {
if (options.name) {
wx.setNavigationBarTitle({
title: options.name,
})
this.setData({
deptId: options.id
})
}
this.getGridCategoryList()
},
// 获取社区列表
getGridCategoryList() {
api.getGridCategoryList().then(res => {
if (res.code == 0 && res.msg == 'success') {
this.setData({
isShow: false,
categoryList: this.data.categoryList.concat(res.data),
// loadType: res.data.length < this.data.pageSize ? 'none' : 'loading',
})
if (this.data.categoryList.length == 0) {
this.setData({
isShow: true,
// loadVisible: false,
})
}
}
}).catch(err => {
this.setData({
isShow: true,
loadVisible: false,
})
})
},
// onReachBottom() {
// if (this.data.loadType == 'none') {
// return
// }
// this.setData({
// pageIndex: ++this.data.pageIndex,
// })
// this.getGridCategoryList()
// },
//
navigateTo(e) {
let code = e.currentTarget.dataset.code
let name = e.currentTarget.dataset.name
wx.navigateTo({
url: `../index/index?id=${this.data.deptId}&code=${code}&name=${name}`
})
},
})

9
epdc-resident-mp-yushan/subpages/gridArmy/pages/categoryList/categoryList.json

@ -0,0 +1,9 @@
{
"navigationBarTitleText": "",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#349c83",
"usingComponents": {
"no-data": "/components/nodata/nodata",
"load-more": "/components/nodata/nodata"
}
}

18
epdc-resident-mp-yushan/subpages/gridArmy/pages/categoryList/categoryList.wxml

@ -0,0 +1,18 @@
<view class="list">
<view class="top">
<view class="left">
<view class="title">网格队伍</view>
<view class="desc">基层党建·为民服务</view>
<view class="line"></view>
</view>
<image src="../../images/top-img.png" class="top-img" />
</view>
<view class="org-list">
<view class="list-item" bindtap="navigateTo" wx:for="{{categoryList}}" wx:for-item="item" wx:for-index="index" wx:key="value" data-code="{{item.typeCode}}" data-name="{{item.typeName}}" hover-class="org-hover" hover-stay-time="150">
<view class="list-item-label">{{item.typeName}}</view>
<image class="list-item-icon" src="../../images/right-sword.png" />
</view>
</view>
</view>
<!-- <load-more loadType="{{loadType}}" loadVisible="{{loadVisible}}"></load-more> -->
<no-data isShow="{{isShow}}"></no-data>

77
epdc-resident-mp-yushan/subpages/gridArmy/pages/categoryList/categoryList.wxss

@ -0,0 +1,77 @@
page {
width: 100%;
min-height: 100vh;
height: auto;
}
.list {
width: 100%;
}
.list .top {
width: 100%;
height: 338rpx;
border-radius: 0 0 40rpx 40rpx;
background: linear-gradient(to bottom, #349c83, #39b092);
display: flex;
}
.list .top .left {
color: #ffffff;
width: 450rpx;
height: 227rpx;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
padding-left: 70rpx;
box-sizing: border-box;
}
.list .top .left .title {
font-size: 44rpx;
letter-spacing: 4rpx;
}
.list .top .left .desc {
font-size: 25rpx;
letter-spacing: 4rpx;
margin-top: 25rpx;
}
.list .top .left .line {
width: 99rpx;
height: 8rpx;
background-color: #ffb71c;
margin-top: 23rpx;
}
.list .top .top-img {
width: 256rpx;
height: 227rpx;
}
.list .org-list {
width: 100%;
box-sizing: border-box;
padding: 0 30rpx;
position: relative;
top: -90rpx;
}
.list .org-list .list-item {
width: 100%;
height: 130rpx;
background: #fff;
box-shadow: 0rpx 5rpx 32rpx 0rpx rgba(198, 198, 198, 0.56);
border-radius: 14rpx;
box-sizing: border-box;
padding: 0 33rpx 0 35rpx;
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 30rpx;
}
.list .org-list .list-item .list-item-label {
color: #333;
font-size: 34rpx;
}
.list .org-list .list-item .list-item-icon {
width: 24rpx;
height: 24rpx;
}
.list .org-list .org-hover {
background: #f6f7f7;
}

56
epdc-resident-mp-yushan/subpages/gridArmy/pages/communityList/communityList.js

@ -0,0 +1,56 @@
const api = require('../../../../utils/api')
Page({
data: {
loadType: 'none',
loadVisible: false,
pageIndex: 1,
pageSize: 10,
deptId: '',
isShow: true,
deptList: [],
},
onLoad() {
this.getCommunityDeptList()
},
// 获取社区列表
getCommunityDeptList() {
api.getCommunityDeptList().then(res => {
if (res.code == 0 && res.msg == 'success') {
this.setData({
isShow: false,
deptList: this.data.deptList.concat(res.data),
// loadType: res.data.length < this.data.pageSize ? 'none' : 'loading',
})
if (this.data.deptList.length == 0) {
this.setData({
isShow: true,
// loadVisible: false,
})
}
}
}).catch(err => {
this.setData({
isShow: true,
loadVisible: false,
})
})
},
// onReachBottom() {
// if (this.data.loadType == 'none') {
// return
// }
// this.setData({
// pageIndex: ++this.data.pageIndex,
// })
// this.getCommunityDeptList()
// },
//
navigateTo(e) {
let id = e.currentTarget.dataset.id
let name = e.currentTarget.dataset.name
wx.navigateTo({
url: `../categoryList/categoryList?id=${id}&name=${name}`
})
},
})

9
epdc-resident-mp-yushan/subpages/gridArmy/pages/communityList/communityList.json

@ -0,0 +1,9 @@
{
"navigationBarTitleText": "网格队伍",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#349c83",
"usingComponents": {
"no-data": "/components/nodata/nodata",
"load-more": "/components/nodata/nodata"
}
}

18
epdc-resident-mp-yushan/subpages/gridArmy/pages/communityList/communityList.wxml

@ -0,0 +1,18 @@
<view class="list">
<view class="top">
<view class="left">
<view class="title">网格队伍</view>
<view class="desc">基层党建·为民服务</view>
<view class="line"></view>
</view>
<image src="../../images/top-img.png" class="top-img" />
</view>
<view class="org-list">
<view class="list-item" bindtap="navigateTo" wx:for="{{deptList}}" wx:for-item="item" wx:for-index="index" wx:key="value" data-id="{{item.id}}" data-name="{{item.name}}" hover-class="org-hover" hover-stay-time="150">
<view class="list-item-label">{{item.name}}</view>
<image class="list-item-icon" src="../../images/right-sword.png" />
</view>
</view>
</view>
<!-- <load-more loadType="{{loadType}}" loadVisible="{{loadVisible}}"></load-more> -->
<no-data isShow="{{isShow}}"></no-data>

77
epdc-resident-mp-yushan/subpages/gridArmy/pages/communityList/communityList.wxss

@ -0,0 +1,77 @@
page {
width: 100%;
min-height: 100vh;
height: auto;
}
.list {
width: 100%;
}
.list .top {
width: 100%;
height: 338rpx;
border-radius: 0 0 40rpx 40rpx;
background: linear-gradient(to bottom, #349c83, #39b092);
display: flex;
}
.list .top .left {
color: #ffffff;
width: 450rpx;
height: 227rpx;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
padding-left: 70rpx;
box-sizing: border-box;
}
.list .top .left .title {
font-size: 44rpx;
letter-spacing: 4rpx;
}
.list .top .left .desc {
font-size: 25rpx;
letter-spacing: 4rpx;
margin-top: 25rpx;
}
.list .top .left .line {
width: 99rpx;
height: 8rpx;
background-color: #ffb71c;
margin-top: 23rpx;
}
.list .top .top-img {
width: 256rpx;
height: 227rpx;
}
.list .org-list {
width: 100%;
box-sizing: border-box;
padding: 0 30rpx;
position: relative;
top: -90rpx;
}
.list .org-list .list-item {
width: 100%;
height: 130rpx;
background: #fff;
box-shadow: 0rpx 5rpx 32rpx 0rpx rgba(198, 198, 198, 0.56);
border-radius: 14rpx;
box-sizing: border-box;
padding: 0 33rpx 0 35rpx;
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 30rpx;
}
.list .org-list .list-item .list-item-label {
color: #333;
font-size: 34rpx;
}
.list .org-list .list-item .list-item-icon {
width: 24rpx;
height: 24rpx;
}
.list .org-list .org-hover {
background: #f6f7f7;
}

22
epdc-resident-mp-yushan/subpages/gridArmy/pages/index/index.js

@ -14,10 +14,20 @@ Page({
griderLeftList: [],
griderRightList: []
},
onLoad() {
onLoad(options) {
query = wx.createSelectorQuery()
this.getDeptInfo()
this.getMemberList()
if (options.name) {
wx.setNavigationBarTitle({
title: options.name,
})
this.setData({
deptId: options.id,
categoryCode: options.code
}, () => {
this.getMemberList()
})
}
},
onReachBottom() {
this.setData({
@ -58,7 +68,9 @@ Page({
getMemberList() {
const params = {
pageIndex: this.data.pageNo,
pageSize: this.data.pageSize
pageSize: this.data.pageSize,
deptId: this.data.deptId || '',
categoryCode: this.data.categoryCode || ''
}
wx.showLoading({
title: '加载中...'
@ -86,7 +98,9 @@ Page({
loadMoreMemberList() {
const params = {
pageIndex: this.data.pageNo,
pageSize: this.data.pageSize
pageSize: this.data.pageSize,
deptId: this.data.deptId || '',
categoryCode: this.data.categoryCode || ''
}
wx.showLoading({
title: '加载中...'

5
epdc-resident-mp-yushan/subpages/gridArmy/pages/index/index.json

@ -1,8 +1,7 @@
{
"navigationBarBackgroundColor": "#d73e32",
"backgroundColor": "#f7f7f7",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "网格队伍",
"navigationBarBackgroundColor": "#349c83",
"navigationBarTitleText": "",
"usingComponents": {
"no-data": "/components/nodata/nodata"
}

4
epdc-resident-mp-yushan/subpages/gridArmy/pages/index/index.wxml

@ -1,5 +1,5 @@
<view class="grid-army">
<view class="community-intro">
<!-- <view class="community-intro">
<view class="community-name">
<view class="icon">
<image src="../../images/community.png" />
@ -7,7 +7,7 @@
<view class="name">{{deptName}}</view>
</view>
<view class="community-detail">{{deptIntro}}</view>
</view>
</view> -->
<view class="grider-list" wx:if="{{griderList.length > 0}}">
<view class="grider-left" id="left">
<view class="grid-item" wx:for="{{griderLeftList}}" wx:key="index">

2
epdc-resident-mp-yushan/subpages/gridArmy/pages/index/index.wxss

@ -49,7 +49,7 @@ image {
width: 100%;
box-sizing: border-box;
padding: 0 32rpx;
margin-top: -40rpx;
margin-top: 40rpx;
}
.grider-list .grider-left {

12
epdc-resident-mp-yushan/utils/api.js

@ -64,6 +64,8 @@ module.exports = {
gridmanList: gridmanList,
getDeptInfo: getDeptInfo,
getMemberList: getMemberList,
getCommunityDeptList: getCommunityDeptList,
getGridCategoryList: getGridCategoryList,
getImgUrl: getImgUrl,
getOrgTypeList: getOrgTypeList,
getOrgListByType: getOrgListByType,
@ -513,6 +515,16 @@ function getMemberList(params) {
return fly.get('sys/gridMember/getMemberList', params)
}
// 网格队伍-社区列表
function getCommunityDeptList() {
return fly.get('sys/gridMember/getCommunityDeptList')
}
// 网格队伍-分类列表
function getGridCategoryList() {
return fly.get('sys/gridMember/getGridCategoryList')
}
// 首页-服务电话
function getImgUrl(imageType) {
return fly.get(`imgConfig/getImgUrl/${imageType}`)

Loading…
Cancel
Save