Browse Source

合并

feature/societyOrg
ZhaoTongYao 4 years ago
parent
commit
6df8ef66ac
  1. 34
      epdc-resident-mp-yushan/app.json
  2. BIN
      epdc-resident-mp-yushan/images/home/add-discussion.png
  3. BIN
      epdc-resident-mp-yushan/images/home/all-service.png
  4. BIN
      epdc-resident-mp-yushan/images/home/association.png
  5. BIN
      epdc-resident-mp-yushan/images/home/avatar.jpg
  6. BIN
      epdc-resident-mp-yushan/images/home/community-education.png
  7. BIN
      epdc-resident-mp-yushan/images/home/community-news.png
  8. BIN
      epdc-resident-mp-yushan/images/home/default-avatar.png
  9. BIN
      epdc-resident-mp-yushan/images/home/discussion.png
  10. BIN
      epdc-resident-mp-yushan/images/home/edu.png
  11. BIN
      epdc-resident-mp-yushan/images/home/eye.png
  12. BIN
      epdc-resident-mp-yushan/images/home/heart.png
  13. BIN
      epdc-resident-mp-yushan/images/home/integral.png
  14. BIN
      epdc-resident-mp-yushan/images/home/notice.png
  15. BIN
      epdc-resident-mp-yushan/images/home/phone.png
  16. BIN
      epdc-resident-mp-yushan/images/home/point-ranking.png
  17. BIN
      epdc-resident-mp-yushan/images/home/policy.png
  18. BIN
      epdc-resident-mp-yushan/images/home/property.png
  19. BIN
      epdc-resident-mp-yushan/images/home/remark.png
  20. BIN
      epdc-resident-mp-yushan/images/home/right-sword-thin.png
  21. BIN
      epdc-resident-mp-yushan/images/home/safe-yushan.png
  22. BIN
      epdc-resident-mp-yushan/images/home/safe.png
  23. BIN
      epdc-resident-mp-yushan/images/home/service-company.png
  24. BIN
      epdc-resident-mp-yushan/images/home/synthetical-service.png
  25. BIN
      epdc-resident-mp-yushan/images/mine/bianji.png
  26. BIN
      epdc-resident-mp-yushan/images/mine/bright-status-bac.png
  27. BIN
      epdc-resident-mp-yushan/images/mine/dengji@2x.png
  28. BIN
      epdc-resident-mp-yushan/images/mine/jifen@2x.png
  29. BIN
      epdc-resident-mp-yushan/images/mine/right.png
  30. BIN
      epdc-resident-mp-yushan/images/mine/yiliangshenfen.png
  31. 84
      epdc-resident-mp-yushan/pages/complete/complete.js
  32. 26
      epdc-resident-mp-yushan/pages/discussion/components/projectItem/projectItem.wxml
  33. 26
      epdc-resident-mp-yushan/pages/discussion/discussion.js
  34. 21
      epdc-resident-mp-yushan/pages/index/components/communityNewsList/communityNewsList.js
  35. 3
      epdc-resident-mp-yushan/pages/index/components/communityNewsList/communityNewsList.json
  36. 30
      epdc-resident-mp-yushan/pages/index/components/communityNewsList/communityNewsList.wxml
  37. 124
      epdc-resident-mp-yushan/pages/index/components/communityNewsList/communityNewsList.wxss
  38. 16
      epdc-resident-mp-yushan/pages/index/components/griderList/griderList.js
  39. 3
      epdc-resident-mp-yushan/pages/index/components/griderList/griderList.json
  40. 39
      epdc-resident-mp-yushan/pages/index/components/griderList/griderList.wxml
  41. 136
      epdc-resident-mp-yushan/pages/index/components/griderList/griderList.wxss
  42. 22
      epdc-resident-mp-yushan/pages/index/components/projectProgress/projectProgress.js
  43. 3
      epdc-resident-mp-yushan/pages/index/components/projectProgress/projectProgress.json
  44. 81
      epdc-resident-mp-yushan/pages/index/components/projectProgress/projectProgress.wxml
  45. 170
      epdc-resident-mp-yushan/pages/index/components/projectProgress/projectProgress.wxss
  46. 32
      epdc-resident-mp-yushan/pages/index/components/sudoku/sudoku.js
  47. 42
      epdc-resident-mp-yushan/pages/index/components/sudoku/sudoku.wxml
  48. 8
      epdc-resident-mp-yushan/pages/index/components/sudoku/sudoku.wxss
  49. 111
      epdc-resident-mp-yushan/pages/index/index.js
  50. 7
      epdc-resident-mp-yushan/pages/index/index.json
  51. 72
      epdc-resident-mp-yushan/pages/index/index.wxml
  52. 318
      epdc-resident-mp-yushan/pages/mine/mine.js
  53. 4
      epdc-resident-mp-yushan/pages/mine/mine.json
  54. 83
      epdc-resident-mp-yushan/pages/mine/mine.wxml
  55. 148
      epdc-resident-mp-yushan/pages/mine/mine.wxss
  56. BIN
      epdc-resident-mp-yushan/subpages/communityNews/images/avatar.jpg
  57. BIN
      epdc-resident-mp-yushan/subpages/communityNews/images/eye.png
  58. BIN
      epdc-resident-mp-yushan/subpages/communityNews/images/ic_yueduliang.png
  59. BIN
      epdc-resident-mp-yushan/subpages/communityNews/images/nothing.png
  60. 27
      epdc-resident-mp-yushan/subpages/communityNews/pages/detail/detail.js
  61. 3
      epdc-resident-mp-yushan/subpages/communityNews/pages/detail/detail.json
  62. 21
      epdc-resident-mp-yushan/subpages/communityNews/pages/detail/detail.wxml
  63. 72
      epdc-resident-mp-yushan/subpages/communityNews/pages/detail/detail.wxss
  64. 84
      epdc-resident-mp-yushan/subpages/communityNews/pages/index/index.js
  65. 5
      epdc-resident-mp-yushan/subpages/communityNews/pages/index/index.json
  66. 35
      epdc-resident-mp-yushan/subpages/communityNews/pages/index/index.wxml
  67. 155
      epdc-resident-mp-yushan/subpages/communityNews/pages/index/index.wxss
  68. BIN
      epdc-resident-mp-yushan/subpages/discussion/images/reResh.png
  69. 42
      epdc-resident-mp-yushan/subpages/discussion/pages/addIssue/addIssue.js
  70. 12
      epdc-resident-mp-yushan/subpages/discussion/pages/addIssue/addIssue.wxml
  71. 61
      epdc-resident-mp-yushan/subpages/discussion/pages/addIssue/addIssue.wxss
  72. 9
      epdc-resident-mp-yushan/subpages/status/api/status.js
  73. BIN
      epdc-resident-mp-yushan/subpages/status/images/icon_close.png
  74. BIN
      epdc-resident-mp-yushan/subpages/status/images/ig_tianjiatupian@2x.png
  75. BIN
      epdc-resident-mp-yushan/subpages/status/images/loading.gif
  76. 197
      epdc-resident-mp-yushan/subpages/status/pages/brightStatus/brightStatus.js
  77. 7
      epdc-resident-mp-yushan/subpages/status/pages/brightStatus/brightStatus.json
  78. 24
      epdc-resident-mp-yushan/subpages/status/pages/brightStatus/brightStatus.wxml
  79. 113
      epdc-resident-mp-yushan/subpages/status/pages/brightStatus/brightStatus.wxss
  80. 156
      epdc-resident-mp-yushan/utils/api.js
  81. 48
      epdc-resident-mp-yushan/utils/home.js

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

@ -18,8 +18,7 @@
"pages/gridLeaderRegister/gridLeaderRegister", "pages/gridLeaderRegister/gridLeaderRegister",
"pages/property/property" "pages/property/property"
], ],
"subPackages": [ "subPackages": [{
{
"root": "subpages/home", "root": "subpages/home",
"name": "home", "name": "home",
"pages": [ "pages": [
@ -83,7 +82,13 @@
"pages/remarkOrReply/remarkOrReply", "pages/remarkOrReply/remarkOrReply",
"pages/searchDiscussion/searchDiscussion", "pages/searchDiscussion/searchDiscussion",
"pages/categoryList/categoryList" "pages/categoryList/categoryList"
] ],
"plugins": {
"esuaEpdcMpPlugin": {
"version": "0.1.1",
"provider": "wxdd8530c5f4926766"
}
}
}, },
{ {
"root": "subpages/mine", "root": "subpages/mine",
@ -154,6 +159,21 @@
"pages": [ "pages": [
"pages/vaccines/vaccines" "pages/vaccines/vaccines"
] ]
},
{
"root": "subpages/communityNews",
"name": "communityNews",
"pages": [
"pages/index/index",
"pages/detail/detail"
]
},
{
"root": "subpages/status",
"name": "status",
"pages": [
"pages/brightStatus/brightStatus"
]
} }
], ],
"preloadRule": { "preloadRule": {
@ -177,15 +197,14 @@
"network": "all", "network": "all",
"packages": ["subpages/property"] "packages": ["subpages/property"]
} }
}, },
"tabBar": { "tabBar": {
"color": "#666666", "color": "#666666",
"selectedColor": "#FF0000", "selectedColor": "#FF0000",
"backgroundColor": "#FFFFFF", "backgroundColor": "#FFFFFF",
"borderStyle": "white", "borderStyle": "white",
"list": [ "list": [{
{
"pagePath": "pages/index/index", "pagePath": "pages/index/index",
"text": "首页", "text": "首页",
"iconPath": "images/home.png", "iconPath": "images/home.png",
@ -224,7 +243,8 @@
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
}, },
"usingComponents": { "usingComponents": {
"complete-info-dialog": "./components/completeInfoDialog/completeInfoDialog" "complete-info-dialog": "./components/completeInfoDialog/completeInfoDialog",
"load-more": "/components/loadMore/loadMore"
}, },
"networkTimeout": { "networkTimeout": {
"request": 60000 "request": 60000

BIN
epdc-resident-mp-yushan/images/home/add-discussion.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
epdc-resident-mp-yushan/images/home/all-service.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
epdc-resident-mp-yushan/images/home/association.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

BIN
epdc-resident-mp-yushan/images/home/avatar.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
epdc-resident-mp-yushan/images/home/community-education.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
epdc-resident-mp-yushan/images/home/community-news.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

BIN
epdc-resident-mp-yushan/images/home/default-avatar.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
epdc-resident-mp-yushan/images/home/discussion.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

BIN
epdc-resident-mp-yushan/images/home/edu.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

BIN
epdc-resident-mp-yushan/images/home/eye.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

BIN
epdc-resident-mp-yushan/images/home/heart.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

BIN
epdc-resident-mp-yushan/images/home/integral.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

BIN
epdc-resident-mp-yushan/images/home/notice.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
epdc-resident-mp-yushan/images/home/phone.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 B

BIN
epdc-resident-mp-yushan/images/home/point-ranking.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
epdc-resident-mp-yushan/images/home/policy.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

BIN
epdc-resident-mp-yushan/images/home/property.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

BIN
epdc-resident-mp-yushan/images/home/remark.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 B

BIN
epdc-resident-mp-yushan/images/home/right-sword-thin.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

BIN
epdc-resident-mp-yushan/images/home/safe-yushan.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

BIN
epdc-resident-mp-yushan/images/home/safe.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

BIN
epdc-resident-mp-yushan/images/home/service-company.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
epdc-resident-mp-yushan/images/home/synthetical-service.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

BIN
epdc-resident-mp-yushan/images/mine/bianji.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

BIN
epdc-resident-mp-yushan/images/mine/bright-status-bac.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
epdc-resident-mp-yushan/images/mine/dengji@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
epdc-resident-mp-yushan/images/mine/jifen@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
epdc-resident-mp-yushan/images/mine/right.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 850 B

BIN
epdc-resident-mp-yushan/images/mine/yiliangshenfen.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

84
epdc-resident-mp-yushan/pages/complete/complete.js

@ -8,67 +8,77 @@ Page({
moreThanOneGrid: false, moreThanOneGrid: false,
gridInfo: { gridInfo: {
gridName: '', // 网格名称 gridName: '', // 网格名称
gridId: '' // 网格id gridId: '', // 网格id
}, },
partyFlag: '0' partyFlag: '0',
},
onLoad(options) {
if (options.selectTab) {
this.setData({
selectTab: options.selectTab,
})
}
}, },
// 我是居民/我是党员/我是企业 tab切换 // 我是居民/我是党员/我是企业 tab切换
onTabChange (e) { onTabChange(e) {
if (e.currentTarget.dataset.tab === 'resident') { if (e.currentTarget.dataset.tab === 'resident') {
if (this.data.partyFlag === '1') { if (this.data.partyFlag === '1') {
wx.showToast({ wx.showToast({
title: '您已是党员,不可认证居民', title: '您已是党员,不可认证居民',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000,
}) })
return false return false
} }
} }
this.setData({ this.setData({
selectTab: e.currentTarget.dataset.tab selectTab: e.currentTarget.dataset.tab,
}) })
}, },
// 获取当前用户所有网格 // 获取当前用户所有网格
getGridList(e) { getGridList(e) {
api.getGridList().then(res => { api
console.log('获取所有网格', res) .getGridList()
const buttonList = [] .then((res) => {
res.data.forEach(item => { console.log('获取所有网格', res)
if (item.gridId !== e.detail.gridId) { const buttonList = []
buttonList.push({ res.data.forEach((item) => {
id: item.gridId, if (item.gridId !== e.detail.gridId) {
text: item.grid buttonList.push({
}) id: item.gridId,
} text: item.grid,
}) })
this.setData({ }
gridList: res.data, })
changeGridList: buttonList, this.setData({
moreThanOneGrid: buttonList.length > 0 gridList: res.data,
changeGridList: buttonList,
moreThanOneGrid: buttonList.length > 0,
})
}) })
}).catch(err => { .catch((err) => {
this.setData({ this.setData({
gridList: [], gridList: [],
changeGridList: [] changeGridList: [],
})
console.log(err)
}) })
console.log(err)
})
}, },
// 切换网格 // 切换网格
changeGrid(e) { changeGrid(e) {
const buttonList = [] const buttonList = []
this.data.gridList.forEach(item => { this.data.gridList.forEach((item) => {
buttonList.push({ buttonList.push({
id: item.gridId, id: item.gridId,
text: item.grid text: item.grid,
}) })
}) })
const index = buttonList.findIndex(item => item.id === e.detail.gridId) const index = buttonList.findIndex((item) => item.id === e.detail.gridId)
if (index > -1) { if (index > -1) {
buttonList.splice(index, 1) buttonList.splice(index, 1)
} }
this.setData({ this.setData({
changeGridList: buttonList changeGridList: buttonList,
}) })
const that = this const that = this
$wuxActionSheet().showSheet({ $wuxActionSheet().showSheet({
@ -77,19 +87,19 @@ Page({
buttonClicked(index, item) { buttonClicked(index, item) {
that.setData({ that.setData({
'gridInfo.gridId': item.id, 'gridInfo.gridId': item.id,
'gridInfo.gridName': item.text 'gridInfo.gridName': item.text,
}) })
return true return true
}, },
cancelText: '取消', cancelText: '取消',
cancel() { }, cancel() {},
destructiveButtonClicked() { }, destructiveButtonClicked() {},
}) })
}, },
selectTabChange (e) { selectTabChange(e) {
this.setData({ this.setData({
selectTab: e.detail.tab, selectTab: e.detail.tab,
partyFlag: e.detail.partyFlag partyFlag: e.detail.partyFlag,
}) })
} },
}) })

26
epdc-resident-mp-yushan/pages/discussion/components/projectItem/projectItem.wxml

@ -1,33 +1,19 @@
<view class="project-item" bindtap="navigateToProjectDetail" data-projectid="{{projectObj.id}}"> <view class="project-item" bindtap="navigateToProjectDetail" data-projectid="{{projectObj.id}}">
<view class="header"> <view class="header">
<view class="info"> <view class="info">
<image class="avatar" src="{{projectObj.avatar}}" /> <image class="avatar" src="{{projectObj.avatar}}" />
<view class="name">{{projectObj.nickname}}</view> <view class="name">{{projectObj.nickname}}</view>
<image class="dang" wx:if="{{projectObj.partyFlag == '1'}}" src="../../../../images/mine/ic_dangbiaoqian.png" /> <image class="dang" wx:if="{{projectObj.partyFlag == '1'}}" src="../../../../images/mine/ic_dangbiaoqian.png" />
</view> </view>
<view class="issue-state" style="background: {{projectObj.stateName == '已结案' ? '#2CD0B7' : '#FFC438'}}">{{projectObj.stateName}}</view> <view class="issue-state" style="background: {{projectObj.stateName == '已结案' ? '#2CD0B7' : '#FFC438'}}">
{{projectObj.stateName}}
</view>
</view> </view>
<view class="content">{{projectObj.itemContent}}</view> <view class="content">{{projectObj.itemContent}}</view>
<view wx:if="{{projectObj.images.length > 0}}" class="image-list" style="height: {{projectObj.images.length === 3 ? '160rpx' : projectObj.images.length === 2 ? '205rpx' : projectObj.images.length === 1 ? '350rpx' : '' }}">
<view <image mode="aspectFill" catchtap="previewImage" data-src="{{item}}" class="image-item" wx:for="{{projectObj.images}}" wx:key="index" wx:for-index="index" wx:for-item="item" src="{{item}}" />
wx:if="{{projectObj.images.length > 0}}"
class="image-list"
style="height: {{projectObj.images.length === 3 ? '160rpx' : projectObj.images.length === 2 ? '205rpx' : projectObj.images.length === 1 ? '350rpx' : '' }}">
<image
catchtap="previewImage"
data-src="{{item}}"
class="image-item"
wx:for="{{projectObj.images}}"
wx:key="index"
wx:for-index="index"
wx:for-item="item"
src="{{item}}" />
</view> </view>
<view class="issue-type">{{projectObj.categoryName}}</view> <view class="issue-type">{{projectObj.categoryName}}</view>
<view class="hot-remark"> <view class="hot-remark">
<view class="top"> <view class="top">
<view class="left"> <view class="left">
@ -42,7 +28,6 @@
【{{projectObj.latestProgress.progressName}}】{{projectObj.latestProgress.advice}} 【{{projectObj.latestProgress.progressName}}】{{projectObj.latestProgress.advice}}
</view> </view>
</view> </view>
<view class="altitude"> <view class="altitude">
<view class="left">表达态度 {{projectObj.statementNum}}</view> <view class="left">表达态度 {{projectObj.statementNum}}</view>
<view class="right"> <view class="right">
@ -51,5 +36,4 @@
<text>不支持 {{projectObj.opposeNum}}</text> <text>不支持 {{projectObj.opposeNum}}</text>
</view> </view>
</view> </view>
</view> </view>

26
epdc-resident-mp-yushan/pages/discussion/discussion.js

@ -7,7 +7,7 @@ Page({
infoCompleted: 0, infoCompleted: 0,
gridName: '' gridName: ''
}, },
onLoad () { onLoad() {
this.setData({ this.setData({
infoCompleted: app.globalData.infoCompleted infoCompleted: app.globalData.infoCompleted
}) })
@ -16,14 +16,22 @@ Page({
gridName gridName
}) })
}, },
onTabItemTap () { onShow() {
if (wx.getStorageSync('discusstionType') && wx.getStorageSync('discusstionType') === 'project') {
this.setData({
discussionType: 'project'
})
wx.removeStorageSync('discusstionType')
}
},
onTabItemTap() {
if (this.data.discussionType === 'issue') { if (this.data.discussionType === 'issue') {
this.issuelist.getIssueList() this.issuelist.getIssueList()
} else if (this.data.discussionType === 'project') { } else if (this.data.discussionType === 'project') {
this.projectlist.getProjectList() this.projectlist.getProjectList()
} }
}, },
onPageScroll (e) { onPageScroll(e) {
if (this.data.discussionType === 'issue') { if (this.data.discussionType === 'issue') {
this.issuelist.onPageScroll(e) this.issuelist.onPageScroll(e)
} else if (this.data.discussionType === 'project') { } else if (this.data.discussionType === 'project') {
@ -31,7 +39,7 @@ Page({
} }
}, },
// 议题、项目切换 // 议题、项目切换
changeDiscussionType (e) { changeDiscussionType(e) {
if (e.currentTarget.dataset.type === 'issue') { if (e.currentTarget.dataset.type === 'issue') {
this.setData({ this.setData({
discussionType: 'issue' discussionType: 'issue'
@ -43,7 +51,7 @@ Page({
} }
}, },
// 触底函数 // 触底函数
onReachBottom () { onReachBottom() {
if (this.data.discussionType === 'issue') { if (this.data.discussionType === 'issue') {
this.issuelist.onReachBottom() this.issuelist.onReachBottom()
} else if (this.data.discussionType === 'project') { } else if (this.data.discussionType === 'project') {
@ -51,7 +59,7 @@ Page({
} }
}, },
// 跳转 我要报事 // 跳转 我要报事
addIssue () { addIssue() {
if (this.verifyCompleteInfo()) { if (this.verifyCompleteInfo()) {
return false return false
} }
@ -60,15 +68,15 @@ Page({
}) })
}, },
// 获取 项目组件实例 // 获取 项目组件实例
getProjectComponent () { getProjectComponent() {
this.projectlist = this.selectComponent('#projectlist') this.projectlist = this.selectComponent('#projectlist')
}, },
// 获取 议题组件实例 // 获取 议题组件实例
getIssueComponent () { getIssueComponent() {
this.issuelist = this.selectComponent('#issuelist') this.issuelist = this.selectComponent('#issuelist')
}, },
// 检查 是否完善信息 // 检查 是否完善信息
verifyCompleteInfo () { verifyCompleteInfo() {
if (this.data.infoCompleted == 0) { if (this.data.infoCompleted == 0) {
this.setData({ this.setData({
completeInfoDialogVisible: !this.data.completeInfoDialogVisible completeInfoDialogVisible: !this.data.completeInfoDialogVisible

21
epdc-resident-mp-yushan/pages/index/components/communityNewsList/communityNewsList.js

@ -0,0 +1,21 @@
Component({
properties: {
newsList: {
type: Array,
value: []
}
},
methods: {
navigateToCommunityNews() {
wx.navigateTo({
url: '/subpages/communityNews/pages/index/index'
})
},
navigateToDetail(e) {
const { id } = e.currentTarget.dataset
wx.navigateTo({
url: `/subpages/communityNews/pages/detail/detail?id=${id}`
})
}
}
})

3
epdc-resident-mp-yushan/pages/index/components/communityNewsList/communityNewsList.json

@ -0,0 +1,3 @@
{
"component": true
}

30
epdc-resident-mp-yushan/pages/index/components/communityNewsList/communityNewsList.wxml

@ -0,0 +1,30 @@
<view class="community-news-list">
<view class="first">
<view class="title">最新资讯</view>
<view class="more" bindtap="navigateToCommunityNews">
<view class="tip">更多</view>
<view class="right-sword">
<image src="../../../../images/home/right-sword-thin.png" />
</view>
</view>
</view>
<view class="news-list">
<view class="list-item {{index === 0 ? 'first-item' : ''}}" wx:for="{{newsList}}" wx-key="index" wx:for-item="item" wx:for-index="index" bindtap="navigateToDetail" data-id="{{item.id}}">
<view class="news-img">
<image src="{{item.imgUrl}}" />
</view>
<view class="detail">
<view class="title">{{item.noticeTitle}}</view>
<view class="bottom-detail">
<view class="time">{{item.releaseTime}}</view>
<view class="page-view">
<view class="page-view-img">
<image src="../../../../images/home/eye.png" />
</view>
<view class="num">{{item.readingAmount}}</view>
</view>
</view>
</view>
</view>
</view>
</view>

124
epdc-resident-mp-yushan/pages/index/components/communityNewsList/communityNewsList.wxss

@ -0,0 +1,124 @@
image {
width: 100%;
height: 100%;
float: left;
}
.community-news-list {
width: 100%;
margin-top: 12rpx;
background: #fff;
}
.first {
width: 100%;
height: 85rpx;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 0 30rpx;
}
.first .title {
font-size: 34rpx;
color: #333333;
}
.first .more {
display: flex;
align-items: center;
justify-content: flex-end;
}
.first .more .tip {
font-size: 28rpx;
color: #c5c5c5;
}
.first .more .right-sword {
width: 14rpx;
height: 22rpx;
margin-left: 4rpx;
}
.news-list {
width: 100%;
background: #fff;
box-sizing: border-box;
padding: 0 30rpx;
}
.news-list .list-item {
width: 100%;
box-sizing: border-box;
padding: 30rpx 0;
display: flex;
align-items: center;
}
.news-list .list-item.first-item {
padding: 0 0 30rpx 0;
}
.news-list .list-item + .list-item {
border-top: 1rpx solid #eaeaea;
}
.news-list .list-item .news-img {
width: 210rpx;
height: 150rpx;
border-radius: 8rpx;
overflow: hidden;
margin-right: 20rpx;
}
.news-list .list-item .detail {
width: calc(100% - 210rpx - 20rpx);
height: 150rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.news-list .list-item .detail .title {
font-size: 34rpx;
color: #3f3f3f;
line-height: 44rpx;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.news-list .list-item .bottom-detail {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.news-list .list-item .bottom-detail .time {
font-size: 22rpx;
letter-spacing: 1px;
color: #aaa;
}
.news-list .list-item .bottom-detail .page-view {
display: flex;
align-items: center;
justify-content: flex-start;
}
.news-list .list-item .bottom-detail .page-view .page-view-img {
width: 30rpx;
height: 24rpx;
margin-right: 12rpx;
}
.news-list .list-item .bottom-detail .page-view .num {
font-size: 24rpx;
letter-spacing: 1px;
color: #aaa;
}

16
epdc-resident-mp-yushan/pages/index/components/griderList/griderList.js

@ -0,0 +1,16 @@
Component({
properties: {
griderList: {
type: Array,
value: []
}
},
methods: {
callGrider(e) {
const { phone } = e.currentTarget.dataset
wx.makePhoneCall({
phoneNumber: phone
})
}
}
})

3
epdc-resident-mp-yushan/pages/index/components/griderList/griderList.json

@ -0,0 +1,3 @@
{
"component": true
}

39
epdc-resident-mp-yushan/pages/index/components/griderList/griderList.wxml

@ -0,0 +1,39 @@
<view class="grider-list" wx:if="{{griderList.length > 0}}">
<view class="title">网格员在身边</view>
<scroll-view scroll-x="{{true}}">
<view class="grider-item-contaner">
<block wx:for="{{griderList}}" wx-key="index" wx:for-index="index">
<view wx:if="{{index !== griderList.length - 1}}" class="grider-item {{index === 0 ? 'first' : ''}}">
<view class="avatar">
<image src="{{item.headUrl ? item.headUrl : '../../../../images/home/default-avatar.png'}}" />
<!-- <view class="grid-leader">网格长</view> -->
</view>
<view class="name">{{item.realName}}</view>
<view class="logen">{{item.proverbs}}</view>
<view class="call-phone">
<view class="phone">
<image src="../../../../images/home/phone.png" />
</view>
<view class="tip" bindtap="callGrider" data-phone="{{item.mobile}}">有事找我</view>
</view>
</view>
<view wx:else class="item-container">
<view class="grider-item {{index === 0 ? 'first' : ''}}">
<view class="avatar">
<image src="{{item.headUrl ? item.headUrl : '../../../../images/home/default-avatar.png'}}" />
<!-- <view class="grid-leader">网格长</view> -->
</view>
<view class="name">{{item.realName}}</view>
<view class="logen">{{item.proverbs}}</view>
<view class="call-phone">
<view class="phone">
<image src="../../../../images/home/phone.png" />
</view>
<view class="tip" bindtap="callGrider" data-phone="{{item.mobile}}">有事找我</view>
</view>
</view>
</view>
</block>
</view>
</scroll-view>
</view>

136
epdc-resident-mp-yushan/pages/index/components/griderList/griderList.wxss

@ -0,0 +1,136 @@
.grider-list {
width: 100%;
background: #fff;
margin-top: 12rpx;
}
.grider-list .title {
width: 100%;
height: 80rpx;
line-height: 90rpx;
text-indent: 30rpx;
font-size: 34rpx;
color: #333;
}
.grider-list scroll-view {
width: 100%;
height: calc(390rpx + 55rpx);
}
.grider-list scroll-view .grider-item-contaner {
min-width: auto;
display: flex;
align-items: center;
}
.grider-item {
width: 280rpx;
height: 390rpx;
flex-shrink: 0;
box-shadow: 0rpx 2rpx 24rpx 0rpx
rgba(227, 227, 227, 0.52);
border-radius: 10rpx;
margin: 10px 0px 0px 20rpx;
display: flex;
flex-direction: column;
align-items: center;
box-sizing: border-box;
padding: 0 5%;
overflow: hidden;
}
.grider-item .avatar {
width: 120rpx;
height: 120rpx;
position: relative;
margin-top: 42rpx;
position: relative;
}
.grider-item .avatar .grid-leader {
width: 80rpx;
height: 28rpx;
background-color: #f69635;
border-radius: 14rpx;
font-size: 20rpx;
color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
bottom: -14rpx;
left: calc(50% - 40rpx);
}
.grider-item .avatar image {
border-radius: 50%;
overflow: hidden;
}
.grider-item .name {
font-size: 30rpx;
color: #333333;
height: 52rpx;
line-height: 52rpx;
margin-top: 7rpx;
}
.grider-item .logen {
font-size: 26rpx;
line-height: 36rpx;
height: 72rpx;
color: #aeaeae;
width: 100%;
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.call-phone {
margin-top: 20rpx;
width: 160rpx;
height: 52rpx;
background-image: linear-gradient(90deg,
#e3271c 0%,
#f95c2c 100%),
linear-gradient(
#8da5eb,
#8da5eb);
background-blend-mode: normal,
normal;
border-radius: 25rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 26rpx;
color: #ffffff;
}
.call-phone .phone {
width:23rpx;
height:27rpx;
margin-right: 4rpx;
}
.grider-item.first {
margin-left: 30rpx;
}
.item-container {
flex-shrink: 0;
width: 310rpx;
height: 390rpx;
margin: 10px 0px 0px 20rpx;
}
.item-container .grider-item {
margin: 0;
}
.item-container .grider-item.first {
margin: 0 0 0 10rpx;
}

22
epdc-resident-mp-yushan/pages/index/components/projectProgress/projectProgress.js

@ -0,0 +1,22 @@
Component({
properties: {
projectList: {
type: Array,
value: []
}
},
methods: {
navigateToProjectDetail(e) {
const { id } = e.currentTarget.dataset
wx.navigateTo({
url: `/subpages/discussion/pages/discussionDetail/discussionDetail?type=project&detailId=${id}&showClassify=show`
})
},
navigateToDiscussion() {
wx.setStorageSync('discusstionType', 'project')
wx.switchTab({
url: '/pages/discussion/discussion'
})
}
}
})

3
epdc-resident-mp-yushan/pages/index/components/projectProgress/projectProgress.json

@ -0,0 +1,3 @@
{
"component": true
}

81
epdc-resident-mp-yushan/pages/index/components/projectProgress/projectProgress.wxml

@ -0,0 +1,81 @@
<view class="project-progress" wx:if="{{projectList.length > 0}}">
<view class="first">
<view class="title">项目进度</view>
<view class="more" bindtap="navigateToDiscussion">
<view class="tip">更多</view>
<view class="right-sword">
<image src="../../../../images/home/right-sword-thin.png" />
</view>
</view>
</view>
<scroll-view scroll-x="{{true}}">
<view class="project-list">
<block wx:for="{{projectList}}" wx-key="index">
<view class="project-item" wx:if="{{index !== projectList.length - 1}}" data-id="{{item.id}}" bindtap="navigateToProjectDetail">
<view class="project-img">
<image mode="aspectFill" wx:if="{{item.images.length > 0}}" class="top-bg" src="{{item.images[0]}}" />
<image wx:else class="top-bg" src="https://epdc-shibei.elinkservice.cn/epdcFile/M00/02/89/rBAAM16O4_OAB6d6AALSjaFpI9M647.png" />
<view class="project-state">{{item.stateName}}</view>
</view>
<view class="content">{{item.itemContent}}</view>
<view class="detail">
<view class="left">
<view class="avatar">
<image src="{{item.avatar}}" />
</view>
<view class="name">{{item.nickname}}</view>
</view>
<view class="right">
表达态度 {{item.statementNum}}次
<!-- <view class="item">
<view class="icon eye">
<image src="../../../../images/home/eye.png" />
</view>
<view class="tip">{{item.approveNum}}</view>
</view>
<view class="item">
<view class="icon">
<image src="../../../../images/home/remark.png" />
</view>
<view class="tip">{{item.opposeNum}}</view>
</view> -->
</view>
</view>
</view>
<view class="item-container" wx:else>
<view class="project-item" data-id="{{item.id}}" bindtap="navigateToProjectDetail">
<view class="project-img">
<image mode="aspectFill" wx:if="{{item.images.length > 0}}" class="top-bg" src="{{item.images[0]}}" />
<image wx:else class="top-bg" src="https://epdc-shibei.elinkservice.cn/epdcFile/M00/02/89/rBAAM16O4_OAB6d6AALSjaFpI9M647.png" />
<view class="project-state">{{item.stateName}}</view>
</view>
<view class="content">{{item.itemContent}}</view>
<view class="detail">
<view class="left">
<view class="avatar">
<image src="{{item.avatar}}" />
</view>
<view class="name">{{item.nickname}}</view>
</view>
<view class="right">
表达态度 {{item.statementNum}}次
<!-- <view class="item">
<view class="icon eye">
<image src="../../../../images/home/eye.png" />
</view>
<view class="tip">{{item.approveNum}}</view>
</view>
<view class="item">
<view class="icon">
<image src="../../../../images/home/remark.png" />
</view>
<view class="tip">{{item.opposeNum}}</view>
</view> -->
</view>
</view>
</view>
</view>
</block>
</view>
</scroll-view>
</view>

170
epdc-resident-mp-yushan/pages/index/components/projectProgress/projectProgress.wxss

@ -0,0 +1,170 @@
image {
width: 100%;
height: 100%;
float: left;
}
.project-progress {
width: 100%;
margin-top: 12rpx;
background: #fff;
}
.first {
width: 100%;
height: 85rpx;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 0 30rpx;
}
.first .title {
font-size: 34rpx;
color: #333333;
}
.first .more {
display: flex;
align-items: center;
justify-content: flex-end;
}
.first .more .tip {
font-size: 28rpx;
color: #c5c5c5;
}
.first .more .right-sword {
width: 14rpx;
height: 22rpx;
margin-left: 4rpx;
}
scroll-view {
width: 100%;
height: 364rpx;
}
scroll-view .project-list {
width: 100%;
display: flex;
align-items: center;
padding-bottom: 30rpx;
}
scroll-view .project-list .project-item {
flex-shrink: 0;
width: 472rpx;
margin-left: 30rpx;
}
scroll-view .project-list .item-container {
flex-shrink: 0;
width: 532rpx;
box-sizing: border-box;
padding-right: 30rpx;
}
scroll-view .project-list .project-item .project-img {
width: 100%;
height: 226rpx;
border-radius: 10rpx 10rpx 0 0;
overflow: hidden;
position: relative;
}
scroll-view .project-list .project-item .project-img .project-state {
width: 86rpx;
height: 38rpx;
background-image: linear-gradient(90deg,
#ffac00 0%,
#ffbf00 100%),
linear-gradient(
#f7f7f7,
#f7f7f7);
background-blend-mode: normal,
normal;
border-radius: 10rpx 0 10rpx 0;
font-size: 22rpx;
line-height: 38rpx;
text-align: center;
position: absolute;
left: 0;
top: 0;
letter-spacing: 0px;
color: #ffffff;
}
scroll-view .project-list .project-item .content {
font-size: 32rpx;
color: #333;
height: 76rpx;
line-height: 76rpx;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
scroll-view .project-list .project-item .detail {
width: 100%;
height: 32rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
scroll-view .project-list .project-item .detail .left {
display: flex;
align-items: center;
}
scroll-view .project-list .project-item .detail .left .avatar {
width: 30rpx;
height: 30rpx;
border-radius: 50%;
overflow: hidden;
margin-right: 6rpx;
}
scroll-view .project-list .project-item .detail .left .name {
font-size: 20rpx;
color: #444;
}
scroll-view .project-list .project-item .detail .right {
display: flex;
align-items: center;
justify-content: flex-end;
font-size: 20rpx;
color: #999999;
}
scroll-view .project-list .project-item .detail .right .item {
display: flex;
align-items: center;
justify-content: flex-end;
}
scroll-view .project-list .project-item .detail .right .item + .item {
margin-left: 22rpx;
}
scroll-view .project-list .project-item .detail .right .item .icon {
width: 23rpx;
height: 22rpx;
}
scroll-view .project-list .project-item .detail .right .item .icon.eye {
width: 27rpx;
height: 21rpx;
}
scroll-view .project-list .project-item .detail .right .item .tip {
font-size: 20rpx;
color: #999999;
margin-left: 8rpx;
}

32
epdc-resident-mp-yushan/pages/index/components/sudoku/sudoku.js

@ -10,42 +10,52 @@ Component({
}, },
methods: { methods: {
// 跳转到左邻右舍 // 跳转到左邻右舍
navigateToAssociation () { navigateToCommunityNews() {
this.triggerEvent('navigateToAssociation') wx.navigateTo({
url: '/subpages/communityNews/pages/index/index'
})
}, },
// 跳转到有么说么 // 跳转到有么说么
navigateToDiscussion() { navigateToDiscussion() {
this.triggerEvent('navigateToDiscussion') wx.navigateTo({
url: '/subpages/discussion/pages/addIssue/addIssue'
})
}, },
// 跳转到物业服务 // 跳转到物业服务
navigateToProperty () { navigateToProperty() {
this.triggerEvent('navigateToProperty') this.triggerEvent('navigateToProperty')
}, },
// 跳转到互帮互助 // 跳转到互帮互助
navigateToHeart () { navigateToHeart() {
this.triggerEvent('navigateToHeart') this.triggerEvent('navigateToHeart')
}, },
// 跳转到社区教育 // 跳转到社区教育
navigateToEducation () { navigateToEducation() {
this.triggerEvent('navigateToEducation') this.triggerEvent('navigateToEducation')
// this.triggerEvent('navigateToEducation') // this.triggerEvent('navigateToEducation')
}, },
// 跳转到平安榆山 // 跳转到平安榆山
navigateToSafe () { navigateToSafe() {
this.triggerEvent('navigateToSafe') this.triggerEvent('navigateToSafe')
}, },
// 跳转到积分排行 // 跳转到积分排行
navigateToIntegral () { navigateToIntegral() {
this.triggerEvent('navigateToIntegral') this.triggerEvent('navigateToIntegral')
}, },
// 跳转到综合服务 // 跳转到综合服务
navigateToSyntheticalService () { navigateToSyntheticalService() {
this.triggerEvent('navigateToSynthetical') this.triggerEvent('navigateToSynthetical')
}, },
// 通知公告
navigateToInfoList() {
wx.navigateTo({
url: '/subpages/home/pages/notice/notice'
})
},
// 暂未开放 // 暂未开放
showNotAvailable () { showNotAvailable() {
wx.showToast({ wx.showToast({
icon:'none', icon: 'none',
title: '暂未开放', title: '暂未开放',
}) })
}, },

42
epdc-resident-mp-yushan/pages/index/components/sudoku/sudoku.wxml

@ -1,36 +1,36 @@
<view class="sudoku"> <view class="sudoku">
<view class="content"> <view class="content">
<view class="item" hover-stay-time="150" bindtap="navigateToAssociation"> <view class="item first" hover-stay-time="150" bindtap="navigateToCommunityNews">
<image src="../../../../images/home/association.png" /> <image src="../../../../images/home/community-news.png" />
<view class="name">左邻右舍</view> <view class="name">社区资讯</view>
</view> </view>
<view class="item" hover-stay-time="150" bindtap="navigateToDiscussion"> <view class="item" hover-stay-time="150" bindtap="navigateToDiscussion">
<image src="../../../../images/home/discussion.png" /> <image src="../../../../images/home/add-discussion.png" />
<view class="name">有么说么</view> <view class="name">我要报事</view>
</view> </view>
<view class="item" hover-stay-time="150" bindtap="navigateToProperty"> <view class="item" hover-stay-time="150" bindtap="navigateToSafe">
<image src="../../../../images/home/property.png" /> <image src="../../../../images/home/safe-yushan.png" />
<view class="name">我的物业</view> <view class="name">平安榆山</view>
</view> </view>
<view class="item" hover-stay-time="150" bindtap="navigateToHeart"> <view class="item" hover-stay-time="150" bindtap="navigateToProperty">
<image src="../../../../images/home/heart.png" /> <image src="../../../../images/home/service-company.png" />
<view class="name">互帮互助</view> <view class="name">我的物业</view>
</view> </view>
<view class="item" hover-stay-time="150" bindtap="navigateToIntegral"> <view class="item" hover-stay-time="150" bindtap="navigateToIntegral">
<image src="../../../../images/home/integral.png" /> <image src="../../../../images/home/point-ranking.png" />
<view class="name">积分排行</view> <view class="name">积分排行</view>
</view> </view>
<view class="item" hover-stay-time="150" bindtap="navigateToSafe"> <view class="item" hover-stay-time="150" bindtap="navigateToEducation">
<image src="../../../../images/home/safe.png" /> <image src="../../../../images/home/community-education.png" />
<view class="name">平安榆山</view>
</view>
<view class="item" hover-stay-time="150" bindtap="navigateToEducation">
<image src="../../../../images/home/edu.png" />
<view class="name">社区教育</view> <view class="name">社区教育</view>
</view> </view>
<view class="item" hover-stay-time="150" bindtap="navigateToSyntheticalService"> <view class="item" hover-stay-time="150" bindtap="navigateToSyntheticalService">
<image src="../../../../images/home/synthetical-service.png" /> <image src="../../../../images/home/all-service.png" />
<view class="name">综合服务</view> <view class="name">综合服务</view>
</view> </view>
<view class="item" hover-stay-time="150" bindtap="navigateToInfoList">
<image src="../../../../images/home/notice.png" />
<view class="name">通知公告</view>
</view>
</view> </view>
</view> </view>

8
epdc-resident-mp-yushan/pages/index/components/sudoku/sudoku.wxss

@ -18,8 +18,12 @@
margin-top: 20rpx; margin-top: 20rpx;
} }
.item image { .item image {
width:110rpx; width: 134rpx;
height:110rpx; height: 134rpx;
}
.item.first image {
width: 124rpx;
height: 124rpx;
} }
.item .name { .item .name {
font-size: 26rpx; font-size: 26rpx;

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

@ -4,6 +4,7 @@ const homeApi = require('../../utils/home')
const global = require('../../utils/config') const global = require('../../utils/config')
import { getTimestamp } from '../../utils/common' import { getTimestamp } from '../../utils/common'
import checkoutVersion from '../../utils/checkVersion' import checkoutVersion from '../../utils/checkVersion'
import home from '../../utils/home'
Page({ Page({
data: { data: {
statusHeight: 0, // 自定义头部状态栏高度 statusHeight: 0, // 自定义头部状态栏高度
@ -26,10 +27,11 @@ Page({
completeInfoDialogVisible: false, // 完善信息弹框显隐 completeInfoDialogVisible: false, // 完善信息弹框显隐
gridId: '', // 网格id gridId: '', // 网格id
departmentName: '', // 所在网格 departmentName: '', // 所在网格
isCarryLoad: false, isCarryLoad: false,
vaccinationSwitch: false, // 疫苗入口开关 vaccinationSwitch: false, // 疫苗入口开关
griderList: []
}, },
onLoad (options) { onLoad(options) {
if (options.scene) { if (options.scene) {
if (options.scene.indexOf('RP') > -1) { if (options.scene.indexOf('RP') > -1) {
this.setData({ this.setData({
@ -55,15 +57,15 @@ Page({
this.data.isCarryLoad = true this.data.isCarryLoad = true
this.getResidentConfig() this.getResidentConfig()
}, },
onTabItemTap () { onTabItemTap() {
this.getUserState() this.getUserState()
}, },
onShow () { onShow() {
this.getUnreadNum() // 实时获取有无未读消息 this.getUnreadNum() // 实时获取有无未读消息
// 检查版本更新 // 检查版本更新
checkoutVersion() checkoutVersion()
}, },
onReachBottom () { onReachBottom() {
this.setData({ this.setData({
loadMoreVisible: true loadMoreVisible: true
}) })
@ -73,7 +75,7 @@ Page({
} }
}, },
// 根据微信code查询用户当前状态 // 根据微信code查询用户当前状态
getUserState () { getUserState() {
let that = this let that = this
wx.login({ wx.login({
success(res) { success(res) {
@ -88,13 +90,13 @@ Page({
departmentName: res.data.grid departmentName: res.data.grid
}) })
// 扫码进入 // 扫码进入
if(that.data.gridId !== '') { if (that.data.gridId !== '') {
// 扫的是网格长码 // 扫的是网格长码
if (that.data.gridId == 'gridLeader') { if (that.data.gridId == 'gridLeader') {
wx.redirectTo({ wx.redirectTo({
url: '/pages/gridLeaderRegister/gridLeaderRegister' url: '/pages/gridLeaderRegister/gridLeaderRegister'
}) })
// 扫的是网格码 // 扫的是网格码
} else { } else {
wx.redirectTo({ wx.redirectTo({
url: '/pages/formid/formid?gid=' + that.data.gridId url: '/pages/formid/formid?gid=' + that.data.gridId
@ -114,7 +116,7 @@ Page({
} else { } else {
that.initLoad() that.initLoad()
} }
} }
} }
}) })
@ -125,7 +127,7 @@ Page({
}) })
}, },
// 获取banner列表 // 获取banner列表
getBannerList () { getBannerList() {
api.bannerList('0').then(res => { api.bannerList('0').then(res => {
console.log('首页banner列表', res) console.log('首页banner列表', res)
this.setData({ this.setData({
@ -139,17 +141,17 @@ Page({
}) })
}, },
// 获取新闻列表 // 获取新闻列表
getNewsList () { getNewsList() {
let para = { let para = {
pageIndex: this.data.pageNo, pageIndex: this.data.pageNo,
pageSize: this.data.pageSize, pageSize: this.data.pageSize,
timestamp: this.data.timestamp, timestamp: this.data.timestamp,
categoryCode:"" categoryCode: ""
} }
api.newsList(para).then((res) => { api.newsList(para).then((res) => {
console.log('首页新闻列表', res) console.log('首页新闻列表', res)
this.setData({ this.setData({
loadMoreType: res.data.length === this.data.pageSize ? 'loading': 'none', loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none',
newsList: this.data.newsList.concat(res.data) newsList: this.data.newsList.concat(res.data)
}) })
}).catch(() => { }).catch(() => {
@ -161,7 +163,7 @@ Page({
}) })
}, },
// 获取项目列表 // 获取项目列表
getProjectList () { getProjectList() {
const para = { const para = {
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
@ -182,7 +184,7 @@ Page({
}) })
}, },
// 获取最新一条消息-主要获取消息未读数 // 获取最新一条消息-主要获取消息未读数
getUnreadNum () { getUnreadNum() {
api.getFirstInfo().then(res => { api.getFirstInfo().then(res => {
console.log('获取消息未读数', res) console.log('获取消息未读数', res)
this.setData({ this.setData({
@ -209,7 +211,7 @@ Page({
}) })
}, },
// 获取通知公告列表 // 获取通知公告列表
getNoticeList () { getNoticeList() {
let para = { let para = {
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
@ -223,7 +225,7 @@ Page({
console.log(err) console.log(err)
}) })
}, },
// 九宫格检查状态 // 九宫格检查状态
// getIndexSudokuState () { // getIndexSudokuState () {
// api.getIndexSudokuState().then(res => { // api.getIndexSudokuState().then(res => {
// console.log('九宫格状态', res) // console.log('九宫格状态', res)
@ -254,8 +256,8 @@ Page({
// }) // })
// }) // })
// }, // },
// 跳转到互帮互助 // 跳转到互帮互助
navigateToHeart () { navigateToHeart() {
if (app.globalData.infoCompleted == 0) { if (app.globalData.infoCompleted == 0) {
this.setData({ this.setData({
completeInfoDialogVisible: !this.data.completeInfoDialogVisible completeInfoDialogVisible: !this.data.completeInfoDialogVisible
@ -278,14 +280,29 @@ Page({
url: '/pages/association/association', url: '/pages/association/association',
}) })
}, },
// 获取 网格员
gridmanList() {
const params = {
pageIndex: 1,
pageSize: 10
}
api.gridmanList(params).then(res => {
console.log('网格员列表', res)
this.setData({
griderList: res.data
})
}).catch(err => {
console.error('网格员列表', err)
})
},
// 跳转到有么说么 // 跳转到有么说么
navigateToDiscussion () { navigateToDiscussion() {
wx.switchTab({ wx.switchTab({
url: '/pages/discussion/discussion' url: '/pages/discussion/discussion'
}) })
}, },
// 跳转到物业服务 // 跳转到物业服务
navigateToProperty () { navigateToProperty() {
// if (app.globalData.infoCompleted == 0) { // if (app.globalData.infoCompleted == 0) {
// this.setData({ // this.setData({
// completeInfoDialogVisible: !this.data.completeInfoDialogVisible // completeInfoDialogVisible: !this.data.completeInfoDialogVisible
@ -296,13 +313,13 @@ Page({
url: '/pages/property/property' url: '/pages/property/property'
}) })
}, },
navigateToSafe(){ navigateToSafe() {
wx.navigateTo({ wx.navigateTo({
url: '/subpages/safety/pages/index/index', url: '/subpages/safety/pages/index/index',
}) })
}, },
// 初始化加载 // 初始化加载
initLoad () { initLoad() {
this.setData({ this.setData({
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
@ -318,33 +335,35 @@ Page({
this.getNoticeList() this.getNoticeList()
this.getUnreadNum() this.getUnreadNum()
this.getNewsList() this.getNewsList()
this.gridmanList()
this.contentList()
}, },
// 切换网格,跳转到网格列表 // 切换网格,跳转到网格列表
changeGrid() { changeGrid() {
wx.navigateTo({ url: '/subpages/changegrid/pages/changeGrid/changeGrid' }) wx.navigateTo({ url: '/subpages/changegrid/pages/changeGrid/changeGrid' })
}, },
// 跳转到新闻详情 // 跳转到新闻详情
navigatetoNewsDetail (e) { navigatetoNewsDetail(e) {
wx.navigateTo({ url: `/subpages/home/pages/newsDetail/newsDetail?id=${e.detail.newsId}` }) wx.navigateTo({ url: `/subpages/home/pages/newsDetail/newsDetail?id=${e.detail.newsId}` })
}, },
// 跳转到 项目详情 // 跳转到 项目详情
navigatetoItemDetail (e) { navigatetoItemDetail(e) {
wx.navigateTo({ wx.navigateTo({
url: `/subpages/discussion/pages/discussionDetail/discussionDetail?type=project&detailId=${e.detail.itemId}&showClassify=show` url: `/subpages/discussion/pages/discussionDetail/discussionDetail?type=project&detailId=${e.detail.itemId}&showClassify=show`
}) })
}, },
// 跳转到通知公告列表 // 跳转到通知公告列表
navigateToInfoList () { navigateToInfoList() {
wx.navigateTo({ wx.navigateTo({
url: '/subpages/home/pages/notice/notice' url: '/subpages/home/pages/notice/notice'
}) })
}, },
// 跳转到消息页面 // 跳转到消息页面
navigateToNotice(){ navigateToNotice() {
wx.navigateTo({ url: '/subpages/home/pages/info/info' }) wx.navigateTo({ url: '/subpages/home/pages/info/info' })
}, },
// 消息没有数据 // 消息没有数据
noMore () { noMore() {
wx.showToast({ wx.showToast({
title: "暂无更多消息~", title: "暂无更多消息~",
icon: "none", icon: "none",
@ -352,20 +371,20 @@ Page({
}) })
}, },
// 跳转到banner详情 // 跳转到banner详情
navigatetoBannerDetail (e) { navigatetoBannerDetail(e) {
const { id, url, newsFlag } = e.detail const { id, url, newsFlag } = e.detail
if (newsFlag == '0') { if (newsFlag == '0') {
wx.navigateTo({ wx.navigateTo({
url: `/subpages/home/pages/webview/webview?url=${url}` url: `/subpages/home/pages/webview/webview?url=${url}`
}) })
} else if (newsFlag == '1') { } else if (newsFlag == '1') {
wx.navigateTo({ wx.navigateTo({
url: `/subpages/home/pages/newsDetail/newsDetail?id=${id}` url: `/subpages/home/pages/newsDetail/newsDetail?id=${id}`
}) })
} }
}, },
//积分排行 //积分排行
navigateToIntegral(){ navigateToIntegral() {
api.getUserInfo().then(res => { api.getUserInfo().then(res => {
// console.log('用户信息', res) // console.log('用户信息', res)
wx.navigateTo({ wx.navigateTo({
@ -375,25 +394,25 @@ Page({
console.log(err) console.log(err)
}) })
}, },
//社区教育 //社区教育
navigateToEducation(){ navigateToEducation() {
wx.navigateTo({ wx.navigateTo({
url: '/subpages/education/pages/index/index' url: '/subpages/education/pages/index/index'
}) })
}, },
navigateToSynthetical(){ navigateToSynthetical() {
wx.navigateTo({ wx.navigateTo({
url: '/subpages/education/pages/healthyLife/healthyLife?page=zhfw' url: '/subpages/education/pages/healthyLife/healthyLife?page=zhfw'
}) })
}, },
// 获取疫苗配置 // 获取疫苗配置
getResidentConfig () { getResidentConfig() {
homeApi.getResidentConfig().then(res => { homeApi.getResidentConfig().then(res => {
if (res.code === 0 && res.msg === "success") { if (res.code === 0 && res.msg === "success") {
res.data.forEach(item => { res.data.forEach(item => {
if (item.residentType === "vaccination_config" && item.residentCode === "vaccination_switch") { if (item.residentType === "vaccination_config" && item.residentCode === "vaccination_switch") {
this.setData({ this.setData({
vaccinationSwitch:item.residentValue === 'on' vaccinationSwitch: item.residentValue === 'on'
}) })
} }
}) })
@ -403,9 +422,25 @@ Page({
}) })
}, },
//疫苗接种 //疫苗接种
toVaccines () { toVaccines() {
wx.navigateTo({ wx.navigateTo({
url: '/subpages/extend/pages/vaccines/vaccines' url: '/subpages/extend/pages/vaccines/vaccines'
}) })
},
// 获取最新社区资讯
contentList() {
const params = {
pageIndex: 1,
pageSize: 5,
typeId: ''
}
homeApi.contentList(params).then(res => {
console.log('社区最新资讯', res)
this.setData({
newsList: res.data
})
}).catch(err => {
console.error(err)
})
} }
}) })

7
epdc-resident-mp-yushan/pages/index/index.json

@ -7,9 +7,12 @@
"sudoku": "./components/sudoku/sudoku", "sudoku": "./components/sudoku/sudoku",
"notice": "./components/notice/notice", "notice": "./components/notice/notice",
"project": "./components/project/project", "project": "./components/project/project",
"news-list":"./components/newsList/newsList", "news-list": "./components/newsList/newsList",
"load-more": "../../components/loadMore/loadMore", "load-more": "../../components/loadMore/loadMore",
"complete-info-dialog": "../../components/completeInfoDialog/completeInfoDialog", "complete-info-dialog": "../../components/completeInfoDialog/completeInfoDialog",
"move-btn": "/components/moveButton/moveButton" "move-btn": "/components/moveButton/moveButton",
"grider-list": "./components/griderList/griderList",
"project-progress": "./components/projectProgress/projectProgress",
"community-news-list": "./components/communityNewsList/communityNewsList"
} }
} }

72
epdc-resident-mp-yushan/pages/index/index.wxml

@ -1,11 +1,11 @@
<view class="header" style="height: {{statusHeight + navigationHeight}}px;"> <view class="header" style="height: {{statusHeight + navigationHeight}}px;">
<image class="header-bg" src="../../images/home/home-status.png" /> <image class="header-bg" src="../../images/home/home-status.png" />
<view class="navigation" style="height: {{navigationHeight}}px; top: {{statusHeight}}px;">现代榆山</view> <view class="navigation" style="height: {{navigationHeight}}px; top: {{statusHeight}}px;">
现代榆山
</view>
</view> </view>
<view class="home" style="margin-top: {{statusHeight + navigationHeight}}px"> <view class="home" style="margin-top: {{statusHeight + navigationHeight}}px">
<!-- 所属网格 -->
<!--所属网格-->
<view class="belong-grid"> <view class="belong-grid">
<!-- <image class="belong-grid-bg" src="../../images/home/home-grid-bg.png" /> --> <!-- <image class="belong-grid-bg" src="../../images/home/home-grid-bg.png" /> -->
<view class="grid" bindtap="changeGrid"> <view class="grid" bindtap="changeGrid">
@ -20,57 +20,27 @@
<image wx:elif="{{infoList.length > 0 && unReadNum > 0}}" bindtap="navigateToNotice" src="../../images/home/yes-notice.png"></image> <image wx:elif="{{infoList.length > 0 && unReadNum > 0}}" bindtap="navigateToNotice" src="../../images/home/yes-notice.png"></image>
</view> </view>
</view> </view>
<!-- banner列表 --> <!-- banner列表 -->
<banner <banner bind:navigatetoBannerDetail="navigatetoBannerDetail" bannerList="{{bannerList}}"></banner>
bind:navigatetoBannerDetail="navigatetoBannerDetail" <!-- 通知公告列表 注 以前是消息列表,通知公告需求还没有定下来,数据获取的还是消息的列表数据 -->
bannerList="{{bannerList}}"> <!-- <notice
</banner>
<!--通知公告列表 注 以前是消息列表,通知公告需求还没有定下来,数据获取的还是消息的列表数据-->
<notice
bind:navigateToInfoList="navigateToInfoList" bind:navigateToInfoList="navigateToInfoList"
noticeList="{{noticeList}}"> noticeList="{{noticeList}}">
</notice> </notice> -->
<!-- sudoku九宫格 -->
<!--sudoku九宫格--> <sudoku sudokuState="{{sudokuState}}" bind:navigateToAssociation="navigateToAssociation" bind:navigateToDiscussion="navigateToDiscussion" bind:navigateToProperty="navigateToProperty" bind:navigateToHeart="navigateToHeart" bind:navigateToEducation="navigateToEducation" bind:navigateToSafe="navigateToSafe" bind:navigateToIntegral="navigateToIntegral" bind:navigateToSynthetical="navigateToSynthetical"></sudoku>
<sudoku <!-- 网格员列表 -->
sudokuState="{{sudokuState}}" <grider-list griderList="{{griderList}}"></grider-list>
bind:navigateToAssociation="navigateToAssociation" <!-- 项目列表 -->
bind:navigateToDiscussion="navigateToDiscussion" <!-- <project bind:navigatetoItemDetail="navigatetoItemDetail" projectList="{{projectList}}"></project> -->
bind:navigateToProperty="navigateToProperty" <project-progress projectList="{{projectList}}"></project-progress>
bind:navigateToHeart="navigateToHeart" <!-- 新闻列表 -->
bind:navigateToEducation="navigateToEducation" <!-- <news-list newsList="{{newsList}}" bind:navigatetoNewsDetail="navigatetoNewsDetail"></news-list> -->
bind:navigateToSafe="navigateToSafe" <community-news-list newsList="{{newsList}}"></community-news-list>
bind:navigateToIntegral="navigateToIntegral" <!-- 加载更多提示 -->
bind:navigateToSynthetical="navigateToSynthetical">
</sudoku>
<!--项目列表-->
<project
bind:navigatetoItemDetail="navigatetoItemDetail"
projectList="{{projectList}}">
</project>
<!--新闻列表-->
<news-list
newsList="{{newsList}}"
bind:navigatetoNewsDetail="navigatetoNewsDetail">
</news-list>
<!--加载更多提示-->
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more> <load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more>
<!-- 完善过信息提示框 -->
<!--完善过信息提示框-->
<complete-info-dialog completeInfoDialogVisible="{{completeInfoDialogVisible}}"></complete-info-dialog> <complete-info-dialog completeInfoDialogVisible="{{completeInfoDialogVisible}}"></complete-info-dialog>
</view> </view>
<!-- 悬浮按钮 --> <!-- 悬浮按钮 -->
<move-btn <move-btn wx:if="{{vaccinationSwitch}}" button-width="142" button-height="164" area-top="120" area-height="90%" img-url="../../images/vaccines.png" bindmovebtnCallBack="toVaccines"></move-btn>
wx:if="{{vaccinationSwitch}}"
button-width="142"
button-height="164"
area-top="120"
area-height="90%"
img-url="../../images/vaccines.png"
bindmovebtnCallBack="toVaccines"></move-btn>

318
epdc-resident-mp-yushan/pages/mine/mine.js

@ -17,33 +17,34 @@ Page({
userInfo: { userInfo: {
faceImg: '', faceImg: '',
nickname: '', nickname: '',
partyFlag: '', partyFlag: '', // 0不是党员 1是党员
points: 0, points: 0,
grade: 0 grade: 0,
showIdentityFlag: 0, // 是否亮过身份 0 否 1 是
}, },
completeInfoDialogVisible: false, completeInfoDialogVisible: false,
infoCompleted: 0 infoCompleted: 0,
}, },
onLoad () { onLoad() {
this.getUserInfo() this.getUserInfo()
this.setData({ this.setData({
infoCompleted: app.globalData.infoCompleted infoCompleted: app.globalData.infoCompleted,
}) })
}, },
onShow () { onShow() {
if (!app.globalData.previewImage) { if (!app.globalData.previewImage) {
this.data.pageNo = 1 this.data.pageNo = 1
this.data.pageSize = 10 this.data.pageSize = 10
this.setData({ this.setData({
nomoreVisible: false, nomoreVisible: false,
nomoreStatus: 'loading', nomoreStatus: 'loading',
preloadVisible: true preloadVisible: true,
}) })
if (this.data.selectedTabBar === 'issue') { if (this.data.selectedTabBar === 'issue') {
this.getIssueList() this.getIssueList()
} else if (this.data.selectedTabBar === 'project') { } else if (this.data.selectedTabBar === 'project') {
this.getProjectList() this.getProjectList()
} else if (this.data.selectedTabBar === 'topic') { } else if (this.data.selectedTabBar === 'topic') {
this.getTopicList() this.getTopicList()
} }
} }
@ -53,7 +54,7 @@ Page({
// 触底 上拉加载 // 触底 上拉加载
onReachBottom() { onReachBottom() {
this.setData({ this.setData({
nomoreVisible: true nomoreVisible: true,
}) })
if (this.data.selectedTabBar === 'topic') { if (this.data.selectedTabBar === 'topic') {
if (this.data.nomoreStatus === 'loading') { if (this.data.nomoreStatus === 'loading') {
@ -61,7 +62,7 @@ Page({
this.loadMoreTopicList() this.loadMoreTopicList()
} else { } else {
this.setData({ this.setData({
nomoreVisible: true nomoreVisible: true,
}) })
} }
} else if (this.data.selectedTabBar === 'project') { } else if (this.data.selectedTabBar === 'project') {
@ -70,17 +71,17 @@ Page({
this.loadMoreProjectList() this.loadMoreProjectList()
} else { } else {
this.setData({ this.setData({
nomoreVisible: true nomoreVisible: true,
}) })
} }
} }
}, },
// tab 切换 // tab 切换
chooseTabBar (e) { chooseTabBar(e) {
this.setData({ this.setData({
nomoreVisible: false, nomoreVisible: false,
nomoreStatus: 'loading', nomoreStatus: 'loading',
preloadVisible: true preloadVisible: true,
}) })
this.data.pageNo = 1 this.data.pageNo = 1
this.data.pageSize = 10 this.data.pageSize = 10
@ -92,216 +93,265 @@ Page({
this.getProjectList() this.getProjectList()
} else if (e.currentTarget.dataset.type === 'topic') { } else if (e.currentTarget.dataset.type === 'topic') {
this.getTopicList() this.getTopicList()
} }
this.setData({ this.setData({
selectedTabBar: e.currentTarget.dataset.type selectedTabBar: e.currentTarget.dataset.type,
}) })
}, },
// 获取 我的话题列表 // 获取 我的话题列表
getTopicList () { getTopicList() {
this.setData({ this.setData({
topicList: [] topicList: [],
}) })
const para = { const para = {
pageIndex: this.data.pageNo, pageIndex: this.data.pageNo,
pageSize: this.data.pageSize pageSize: this.data.pageSize,
} }
api.getMyTopicList(para).then(res => { api
console.log('我的话题列表', res) .getMyTopicList(para)
this.setData({ .then((res) => {
topicList: [...res.data], console.log('我的话题列表', res)
nomoreStatus: res.data.length === 10 ? 'loading' : 'none', this.setData({
preloadVisible: false topicList: [...res.data],
nomoreStatus: res.data.length === 10 ? 'loading' : 'none',
preloadVisible: false,
})
}) })
}).catch(err => { .catch((err) => {
this.setData({ this.setData({
topicList: [], topicList: [],
nomoreStatus: 'none', nomoreStatus: 'none',
preloadVisible: false preloadVisible: false,
})
console.log(err)
}) })
console.log(err)
})
}, },
// 获取 我的话题列表 上拉加载 // 获取 我的话题列表 上拉加载
loadMoreTopicList () { loadMoreTopicList() {
const para = { const para = {
pageIndex: this.data.pageNo, pageIndex: this.data.pageNo,
pageSize: this.data.pageSize pageSize: this.data.pageSize,
} }
api.getMyTopicList(para).then(res => { api
console.log('我的话题列表', res) .getMyTopicList(para)
const topicList = [...this.data.topicList, ...res.data] .then((res) => {
this.setData({ console.log('我的话题列表', res)
nomoreStatus: res.data.length === 10 ? 'loading' : 'none', const topicList = [...this.data.topicList, ...res.data]
preloadVisible: false, this.setData({
topicList, nomoreStatus: res.data.length === 10 ? 'loading' : 'none',
preloadVisible: false,
topicList,
})
}) })
}).catch(err => { .catch((err) => {
this.setData({ this.setData({
topicList: [], topicList: [],
nomoreStatus: 'none', nomoreStatus: 'none',
preloadVisible: false preloadVisible: false,
})
console.log(err)
}) })
console.log(err)
})
}, },
// 获取 我的议题列表 // 获取 我的议题列表
getIssueList () { getIssueList() {
this.setData({ this.setData({
issueList: [] issueList: [],
}) })
api.getMyIssueList().then(res => { api
console.log('我的议题列表', res) .getMyIssueList()
this.setData({ .then((res) => {
issueList: [...res.data], console.log('我的议题列表', res)
nomoreStatus: 'none', this.setData({
preloadVisible: false issueList: [...res.data],
nomoreStatus: 'none',
preloadVisible: false,
})
}) })
}).catch(err => { .catch((err) => {
this.setData({ this.setData({
issueList: [], issueList: [],
nomoreStatus: 'none', nomoreStatus: 'none',
preloadVisible: false preloadVisible: false,
})
console.log(err)
}) })
console.log(err)
})
}, },
// 获取 我的项目列表 // 获取 我的项目列表
getProjectList () { getProjectList() {
this.setData({ this.setData({
projectList: [] projectList: [],
}) })
this.data.timestamp = getTimestamp() this.data.timestamp = getTimestamp()
const para = { const para = {
pageIndex: this.data.pageNo, pageIndex: this.data.pageNo,
pageSize: this.data.pageSize, pageSize: this.data.pageSize,
timestamp: this.data.timestamp timestamp: this.data.timestamp,
} }
api.getMyProjectList(para).then(res => { api
console.log('我的项目列表', res) .getMyProjectList(para)
this.setData({ .then((res) => {
projectList: [...res.data], console.log('我的项目列表', res)
nomoreStatus: res.data.length === 10 ? 'loading' : 'none', this.setData({
preloadVisible: false projectList: [...res.data],
nomoreStatus: res.data.length === 10 ? 'loading' : 'none',
preloadVisible: false,
})
}) })
}).catch(err => { .catch((err) => {
this.setData({ this.setData({
projectList: [], projectList: [],
nomoreStatus: 'none', nomoreStatus: 'none',
preloadVisible: false preloadVisible: false,
})
console.log(err)
}) })
console.log(err)
})
}, },
// 获取 我的项目列表 上拉加载 // 获取 我的项目列表 上拉加载
loadMoreProjectList () { loadMoreProjectList() {
const para = { const para = {
pageIndex: this.data.pageNo, pageIndex: this.data.pageNo,
pageSize: this.data.pageSize, pageSize: this.data.pageSize,
timestamp: this.data.timestamp timestamp: this.data.timestamp,
} }
api.getMyProjectList(para).then(res => { api
console.log('我的项目列表', res) .getMyProjectList(para)
const projectList = [...this.data.projectList,...res.data] .then((res) => {
this.setData({ console.log('我的项目列表', res)
nomoreStatus: res.data.length === 10 ? 'loading' : 'none', const projectList = [...this.data.projectList, ...res.data]
preloadVisible: false, this.setData({
projectList, nomoreStatus: res.data.length === 10 ? 'loading' : 'none',
preloadVisible: false,
projectList,
})
}) })
}).catch(err => { .catch((err) => {
this.setData({ this.setData({
projectList: [], projectList: [],
nomoreStatus: 'none', nomoreStatus: 'none',
preloadVisible: false preloadVisible: false,
})
console.log(err)
}) })
console.log(err)
})
}, },
// 获取用户信息 // 获取用户信息
getUserInfo () { getUserInfo() {
api.getUserInfo().then(res => { api
console.log('用户信息', res) .getUserInfo()
const userInfo = {} .then((res) => {
for(const key in this.data.userInfo) { console.log('用户信息', res)
userInfo[key] = res.data[key] const userInfo = {}
} for (const key in this.data.userInfo) {
this.setData({ userInfo[key] = res.data[key]
userInfo
})
}).catch(err => {
this.setData({
userInfo: {
faceImg: '',
nickname: '',
points: 0,
grade: 0
} }
this.setData({
userInfo,
})
})
.catch((err) => {
this.setData({
userInfo: {
faceImg: '',
nickname: '',
points: 0,
grade: 0,
},
})
console.log(err)
}) })
console.log(err)
})
}, },
// 完善信息 // 完善信息
navigateToComplete () { navigateToComplete() {
wx.navigateTo({ wx.navigateTo({
url: '/pages/complete/complete' url: '/pages/complete/complete',
}) })
}, },
// 议题列表 跳转详情 // 议题列表 跳转详情
toIssueDetail (e) { toIssueDetail(e) {
const { issueId, state } = e.detail const { issueId, state } = e.detail
if (state !== '待审核' && state !== '未通过') { if (state !== '待审核' && state !== '未通过') {
wx.navigateTo({ wx.navigateTo({
url: `/subpages/discussion/pages/discussionDetail/discussionDetail?type=issue&detailId=${issueId}` url: `/subpages/discussion/pages/discussionDetail/discussionDetail?type=issue&detailId=${issueId}`,
}) })
} else if (state === '待审核' || state === '未通过') { } else if (state === '待审核' || state === '未通过') {
wx.navigateTo({ wx.navigateTo({
url: `/subpages/mine/pages/eventDetail/eventDetail?eventId=${issueId}&eventType=${state}` url: `/subpages/mine/pages/eventDetail/eventDetail?eventId=${issueId}&eventType=${state}`,
}) })
} }
}, },
// 项目列表 跳转详情 // 项目列表 跳转详情
toProjectDetail (e) { toProjectDetail(e) {
const { itemId } = e.detail const { itemId } = e.detail
wx.navigateTo({ wx.navigateTo({
url: `/subpages/discussion/pages/discussionDetail/discussionDetail?type=project&detailId=${itemId}` url: `/subpages/discussion/pages/discussionDetail/discussionDetail?type=project&detailId=${itemId}`,
}) })
}, },
// 话题列表 跳转详情 // 话题列表 跳转详情
toTopicDetail (e) { toTopicDetail(e) {
const { topicId } = e.detail const { topicId } = e.detail
wx.navigateTo({ wx.navigateTo({
url: `/subpages/association/pages/topicDetail/topicDetail?detailId=${topicId}` url: `/subpages/association/pages/topicDetail/topicDetail?detailId=${topicId}`,
}) })
}, },
// 我要报事 // 我要报事
addIssue () { addIssue() {
if (this.data.infoCompleted == 0) { if (this.data.infoCompleted == 0) {
this.setData({ this.setData({
completeInfoDialogVisible: !this.data.completeInfoDialogVisible completeInfoDialogVisible: !this.data.completeInfoDialogVisible,
}) })
return false return false
} }
wx.navigateTo({ wx.navigateTo({
url: '/subpages/discussion/pages/addIssue/addIssue' url: '/subpages/discussion/pages/addIssue/addIssue',
}) })
}, },
// 跳转到 邀请记录 // 跳转到 邀请记录
navigateToInviteRecord () { navigateToInviteRecord() {
wx.navigateTo({ wx.navigateTo({
url: '/subpages/mine/pages/inviteRecord/inviteRecord' url: '/subpages/mine/pages/inviteRecord/inviteRecord',
}) })
}, },
// 跳转到 网格管理 // 跳转到 网格管理
navigateToGridManage () { navigateToGridManage() {
wx.navigateTo({ wx.navigateTo({
url: '/subpages/mine/pages/gridManage/gridManage' url: '/subpages/mine/pages/gridManage/gridManage',
}) })
}, },
//跳转到积分中心 //跳转到积分中心
navigateToIntegralCentre () { navigateToIntegralCentre() {
this.getUserInfo();//防止积分变化 this.getUserInfo() //防止积分变化
wx.navigateTo({ wx.navigateTo({
url: "/subpages/integralCentre/pages/index/index?points=" + this.data.userInfo.points url:
'/subpages/integralCentre/pages/index/index?points=' +
this.data.userInfo.points,
}) })
} },
}) // 点亮徽章
navigateToStatus() {
if (this.data.infoCompleted == 0) {
this.setData({
completeInfoDialogVisible: !this.data.completeInfoDialogVisible,
})
return false
}
if (this.data.userInfo.partyFlag === '0') {
wx.showModal({
title: '提示',
content: '只有党员才可点亮徽章,是否要去认证为党员',
cancelText: '是',
confirmText: '否',
success(res) {
if (res.confirm) {
} else if (res.cancel) {
wx.navigateTo({
url: `/pages/complete/complete?selectTab=partyMember`,
})
}
},
})
} else {
wx.navigateTo({
url: `/subpages/status/pages/brightStatus/brightStatus?showIdentityFlag=${this.data.userInfo.showIdentityFlag}`,
})
}
},
})

4
epdc-resident-mp-yushan/pages/mine/mine.json

@ -9,5 +9,7 @@
"preload-topic-item": "./components/preloadTopicItem/preloadTopicItem", "preload-topic-item": "./components/preloadTopicItem/preloadTopicItem",
"load-more": "../../components/loadMore/loadMore", "load-more": "../../components/loadMore/loadMore",
"completeInfo-dialog": "../../components/completeInfoDialog/completeInfoDialog" "completeInfo-dialog": "../../components/completeInfoDialog/completeInfoDialog"
} },
"navigationBarBackgroundColor": "#e40000",
"navigationBarTextStyle": "white"
} }

83
epdc-resident-mp-yushan/pages/mine/mine.wxml

@ -1,8 +1,6 @@
<view class="mine"> <view class="mine">
<view class="personal-info"> <view class="personal-info">
<view class="box"> <view class="box">
<image class="bg-image" src="../../images/mine/bg-mine.png" />
<view class="content"> <view class="content">
<view class="top"> <view class="top">
<view class="left"> <view class="left">
@ -26,11 +24,14 @@
</view> </view>
</view> </view>
<view class="bottom"> <view class="bottom">
<text class="text1">等级:{{userInfo.grade}}</text> <view class="" hover-class="none" hover-stop-propagation="false">
<image class="dengji" src="../../images/mine/dengji@2x.png"></image>
<text class="text2" bindtap="navigateToIntegralCentre" data-points="{{userInfo.points}}">积分:{{userInfo.points}}</text> <text class="text1">等级:{{userInfo.grade}}</text>
</view>
<text class="text3"></text> <view class="">
<image class="jifen" src="../../images/mine/jifen@2x.png"></image>
<text class="text2" bindtap="navigateToIntegralCentre" data-points="{{userInfo.points}}">积分:{{userInfo.points}}</text>
</view>
<!-- <text class="text3" bindtap="jqqd">积分兑换</text> --> <!-- <text class="text3" bindtap="jqqd">积分兑换</text> -->
</view> </view>
<!-- <view class="bottom"> <!-- <view class="bottom">
@ -46,47 +47,32 @@
</view> </view>
</view> </view>
</view> </view>
<view class="bright-status">
<image src="../../images/mine/bright-status-bac.png" class="bright-status-bac" />
<view class="bright-status-text" bind:tap="navigateToStatus" wx:if="{{userInfo.showIdentityFlag=='0'}}">点亮徽章</view>
<view bind:tap="navigateToStatus">
<image src="../../images/mine/yiliangshenfen.png" class="bianji" wx:if="{{userInfo.showIdentityFlag==1}}" />
<image src="../../images/mine/right.png" class="right-icon" wx:if="{{userInfo.showIdentityFlag==1}}" />
</view>
</view>
<view class="tab-bar"> <view class="tab-bar">
<view <view class="type {{selectedTabBar === 'issue' ? 'selected-issue' : ''}}" data-type="issue" hover-class="hover-tabbar" hover-stay-time="300" bindtap="chooseTabBar">
class="type {{selectedTabBar === 'issue' ? 'selected-issue' : ''}}"
data-type="issue"
hover-class="hover-tabbar"
hover-stay-time="300"
bindtap="chooseTabBar">
我的议题 我的议题
</view> </view>
<view <view class="type {{selectedTabBar === 'project' ? 'selected-project' : ''}}" data-type="project" hover-class="hover-tabbar" hover-stay-time="300" bindtap="chooseTabBar">
class="type {{selectedTabBar === 'project' ? 'selected-project' : ''}}"
data-type="project"
hover-class="hover-tabbar"
hover-stay-time="300"
bindtap="chooseTabBar">
我的项目 我的项目
</view> </view>
<view <view class="type {{selectedTabBar === 'topic' ? 'selected-topic' : ''}}" data-type="topic" hover-class="hover-tabbar" hover-stay-time="300" bindtap="chooseTabBar">
class="type {{selectedTabBar === 'topic' ? 'selected-topic' : ''}}"
data-type="topic"
hover-class="hover-tabbar"
hover-stay-time="300"
bindtap="chooseTabBar">
我的话题 我的话题
</view> </view>
<view class="select-bar {{selectedTabBar === 'issue' ? 'selected-issue' : selectedTabBar === 'project' ? 'selected-project' : selectedTabBar === 'topic' ? 'selected-topic' : ''}}"></view> <view class="select-bar {{selectedTabBar === 'issue' ? 'selected-issue' : selectedTabBar === 'project' ? 'selected-project' : selectedTabBar === 'topic' ? 'selected-topic' : ''}}"></view>
</view> </view>
<view class="issue-list" wx:if="{{selectedTabBar === 'issue'}}"> <view class="issue-list" wx:if="{{selectedTabBar === 'issue'}}">
<block wx:if="{{issueList.length === 0 && preloadVisible}}"> <block wx:if="{{issueList.length === 0 && preloadVisible}}">
<preload-issue-item wx:for="{{[1]}}" wx:key="index" wx:for-index="index"></preload-issue-item> <preload-issue-item wx:for="{{[1]}}" wx:key="index" wx:for-index="index"></preload-issue-item>
</block> </block>
<block wx:if="{{issueList.length > 0}}"> <block wx:if="{{issueList.length > 0}}">
<issue-item <issue-item wx:for="{{issueList}}" wx:key="id" wx:for-item="item" bind:toIssueDetail="toIssueDetail" issueObj="{{item}}"></issue-item>
wx:for="{{issueList}}"
wx:key="id"
wx:for-item="item"
bind:toIssueDetail="toIssueDetail"
issueObj="{{item}}">
</issue-item>
</block> </block>
<view class="issue-nodata" wx:if="{{issueList.length === 0 && !preloadVisible}}"> <view class="issue-nodata" wx:if="{{issueList.length === 0 && !preloadVisible}}">
<image class="no-data" src="../../images/mine/topic-nodata.png" /> <image class="no-data" src="../../images/mine/topic-nodata.png" />
@ -97,22 +83,14 @@
</view> </view>
</view> </view>
</view> </view>
<view class="project-list" wx:elif="{{selectedTabBar === 'project'}}"> <view class="project-list" wx:elif="{{selectedTabBar === 'project'}}">
<block wx:if="{{projectList.length === 0 && preloadVisible}}"> <block wx:if="{{projectList.length === 0 && preloadVisible}}">
<preload-project-item wx:for="{{[1]}}" wx:key="index" wx:for-index="index"></preload-project-item> <preload-project-item wx:for="{{[1]}}" wx:key="index" wx:for-index="index"></preload-project-item>
</block> </block>
<block wx:if="{{projectList.length > 0}}"> <block wx:if="{{projectList.length > 0}}">
<project-item <project-item wx:for="{{projectList}}" wx:for-item="item" wx:key="id" projectObj="{{item}}" bind:toProjectDetail="toProjectDetail" wx:for-index="index"></project-item>
wx:for="{{projectList}}"
wx:for-item="item"
wx:key="id"
projectObj="{{item}}"
bind:toProjectDetail="toProjectDetail"
wx:for-index="index">
</project-item>
</block> </block>
<view class="project-nodata" wx:if="{{projectList.length === 0 && !preloadVisible}}"> <view class="project-nodata" wx:if="{{projectList.length === 0 && !preloadVisible}}">
<image class="no-data" src="../../images/mine/project-nodata.png" /> <image class="no-data" src="../../images/mine/project-nodata.png" />
<view class="tip">您还没有转为项目的议题,请先发布议题</view> <view class="tip">您还没有转为项目的议题,请先发布议题</view>
<view class="tip">快来点击“我要报事”发布吧</view> <view class="tip">快来点击“我要报事”发布吧</view>
@ -122,20 +100,12 @@
</view> </view>
</view> </view>
</view> </view>
<view class="topic-list" wx:elif="{{selectedTabBar === 'topic'}}"> <view class="topic-list" wx:elif="{{selectedTabBar === 'topic'}}">
<block wx:if="{{topicList.length === 0 && preloadVisible}}"> <block wx:if="{{topicList.length === 0 && preloadVisible}}">
<preload-topic-item wx:for="{{[1]}}" wx:key="index" wx:for-index="index"></preload-topic-item> <preload-topic-item wx:for="{{[1]}}" wx:key="index" wx:for-index="index"></preload-topic-item>
</block> </block>
<block wx:if="{{topicList.length > 0}}"> <block wx:if="{{topicList.length > 0}}">
<topic-item <topic-item wx:for="{{topicList}}" wx:for-item="item" wx:for-index="index" topicObj="{{item}}" bind:toTopicDetail="toTopicDetail" wx:key="id"></topic-item>
wx:for="{{topicList}}"
wx:for-item="item"
wx:for-index="index"
topicObj="{{item}}"
bind:toTopicDetail="toTopicDetail"
wx:key="id">
</topic-item>
</block> </block>
<view class="topic-nodata" wx:if="{{topicList.length === 0 && !preloadVisible}}"> <view class="topic-nodata" wx:if="{{topicList.length === 0 && !preloadVisible}}">
<image class="no-data" src="../../images/mine/topic-nodata.png" /> <image class="no-data" src="../../images/mine/topic-nodata.png" />
@ -143,11 +113,6 @@
<view class="tip">快到“左邻右舍”,到您的群里发布吧</view> <view class="tip">快到“左邻右舍”,到您的群里发布吧</view>
</view> </view>
</view> </view>
<load-more loadMoreVisible="{{nomoreVisible}}" loadMoreType="{{nomoreStatus}}"></load-more> <load-more loadMoreVisible="{{nomoreVisible}}" loadMoreType="{{nomoreStatus}}"></load-more>
</view> </view>
<completeInfo-dialog completeInfoDialogVisible="{{completeInfoDialogVisible}}"></completeInfo-dialog>
<completeInfo-dialog
completeInfoDialogVisible="{{completeInfoDialogVisible}}">
</completeInfo-dialog>

148
epdc-resident-mp-yushan/pages/mine/mine.wxss

@ -2,23 +2,27 @@ page {
width: 100%; width: 100%;
height: 100vh; height: 100vh;
} }
.mine { .mine {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: #f7f7f7; background: #f7f7f7;
} }
.mine .personal-info { .mine .personal-info {
width: 100%; width: 100%;
height: 310rpx; height: 310rpx;
box-sizing: border-box; box-sizing: border-box;
padding: 30rpx; /* padding: 0rpx 0 30rpx 30rpx; */
background: #fff; background: #e40000;
} }
.mine .personal-info .box { .mine .personal-info .box {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: relative; position: relative;
} }
.mine .personal-info .box .bg-image { .mine .personal-info .box .bg-image {
position: absolute; position: absolute;
left: 0; left: 0;
@ -27,6 +31,7 @@ page {
height: 100%; height: 100%;
object-fit: cover; object-fit: cover;
} }
.mine .personal-info .box .content { .mine .personal-info .box .content {
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -34,8 +39,8 @@ page {
z-index: 100; z-index: 100;
overflow: hidden; overflow: hidden;
} }
.personal-info .box .content .top { .personal-info .box .content .top {
margin-top: 30rpx;
box-sizing: border-box; box-sizing: border-box;
padding-left: 30rpx; padding-left: 30rpx;
width: 100%; width: 100%;
@ -44,22 +49,26 @@ page {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.personal-info .box .content .top .left { .personal-info .box .content .top .left {
height: 100%; height: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.personal-info .box .content .top .avatar { .personal-info .box .content .top .avatar {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
position: relative; position: relative;
} }
.personal-info .box .content .top .avatar .avatar-content { .personal-info .box .content .top .avatar .avatar-content {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit:cover; object-fit: cover;
border-radius: 50%; border-radius: 50%;
} }
.personal-info .box .content .top .right { .personal-info .box .content .top .right {
height: 100%; height: 100%;
margin-left: 14rpx; margin-left: 14rpx;
@ -67,20 +76,23 @@ page {
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
} }
.personal-info .box .content .top .right .nickname { .personal-info .box .content .top .right .nickname {
font-size: 30rpx; font-size: 30rpx;
color: #fff; color: #fff;
} }
.personal-info .box .content .top .right .party-flag { .personal-info .box .content .top .right .party-flag {
width: 72rpx; width: 72rpx;
height: 24rpx; height: 24rpx;
background: #FFE25E; background: #FFE25E;
border-radius:12rpx; border-radius: 12rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-top: 10rpx; margin-top: 10rpx;
} }
.personal-info .box .content .top .right .party-flag view { .personal-info .box .content .top .right .party-flag view {
color: #FD1D11; color: #FD1D11;
font-size: 18rpx; font-size: 18rpx;
@ -88,16 +100,19 @@ page {
height: 24rpx; height: 24rpx;
line-height: 24rpx; line-height: 24rpx;
} }
.personal-info .box .content .top .right .party-flag image { .personal-info .box .content .top .right .party-flag image {
width: 18rpx; width: 18rpx;
height: 18rpx; height: 18rpx;
object-fit: cover; object-fit: cover;
} }
.personal-info .box .content .top .complete-info { .personal-info .box .content .top .complete-info {
width: 130rpx; width: 130rpx;
height: 46rpx; height: 46rpx;
position: relative; position: relative;
} }
.personal-info .box .content .top .complete-info .complete-image { .personal-info .box .content .top .complete-info .complete-image {
position: absolute; position: absolute;
left: 0; left: 0;
@ -105,6 +120,7 @@ page {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.personal-info .box .content .top .complete-info .complete-content { .personal-info .box .content .top .complete-info .complete-content {
position: relative; position: relative;
z-index: 100; z-index: 100;
@ -114,20 +130,23 @@ page {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.personal-info .box .content .top .complete-info .complete-content .tip { .personal-info .box .content .top .complete-info .complete-content .tip {
font-size: 22rpx; font-size: 22rpx;
color: #fff; color: #fff;
height: 46rpx; height: 46rpx;
line-height: 46rpx; line-height: 46rpx;
} }
.personal-info .box .content .top .complete-info .complete-content .rightsword { .personal-info .box .content .top .complete-info .complete-content .rightsword {
width: 14rpx; width: 14rpx;
height: 18rpx; height: 18rpx;
object-fit: cover; object-fit: cover;
margin-left: 9rpx; margin-left: 9rpx;
} }
.personal-info .box .content .bottom { .personal-info .box .content .bottom {
margin-top: 60rpx; margin-top: 50rpx;
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
height: 30rpx; height: 30rpx;
@ -135,13 +154,29 @@ page {
align-items: center; align-items: center;
justify-content: space-around; justify-content: space-around;
} }
.personal-info .box .content .bottom text{
.personal-info .box .content .bottom .dengji {
width: 38rpx;
height: 40rpx;
vertical-align: middle;
margin-right: 13rpx;
}
.personal-info .box .content .bottom .jifen {
width: 40rpx;
height: 40rpx;
vertical-align: middle;
margin-right: 13rpx;
}
.personal-info .box .content .bottom text {
color: #fff; color: #fff;
font-size: 28rpx; font-size: 28rpx;
line-height: 30rpx; line-height: 30rpx;
flex: 1; flex: 1;
text-align: center; text-align: center;
} }
.personal-info .box .content .bottom .operation { .personal-info .box .content .bottom .operation {
flex: 1; flex: 1;
display: flex; display: flex;
@ -150,18 +185,21 @@ page {
align-items: center; align-items: center;
padding-top: 5rpx; padding-top: 5rpx;
} }
.personal-info .box .content .bottom .operation + .operation {
border-left: 1rpx solid rgba(255,255,255,0.55); .personal-info .box .content .bottom .operation+.operation {
border-left: 1rpx solid rgba(255, 255, 255, 0.55);
} }
.personal-info .box .content .bottom .operation image { .personal-info .box .content .bottom .operation image {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
object-fit: cover; object-fit: cover;
} }
.personal-info .box .content .bottom .operation .tip { .personal-info .box .content .bottom .operation .tip {
font-size: 22rpx; font-size: 22rpx;
margin-top: 10rpx; margin-top: 10rpx;
color: rgba(255,255,255,0.55); color: rgba(255, 255, 255, 0.55);
} }
.tab-bar { .tab-bar {
@ -172,7 +210,9 @@ page {
align-items: center; align-items: center;
justify-content: space-around; justify-content: space-around;
position: relative; position: relative;
margin-top: 70rpx;
} }
.tab-bar .type { .tab-bar .type {
font-size: 30rpx; font-size: 30rpx;
color: #999; color: #999;
@ -181,21 +221,26 @@ page {
height: 90rpx; height: 90rpx;
line-height: 90rpx; line-height: 90rpx;
} }
.tab-bar .hover-tabbar { .tab-bar .hover-tabbar {
background: #f3f3f3; background: #f3f3f3;
} }
.tab-bar .type.selected-issue { .tab-bar .type.selected-issue {
color: #F82525; color: #F82525;
font-weight: bolder; font-weight: bolder;
} }
.tab-bar .type.selected-project { .tab-bar .type.selected-project {
color: #F82525; color: #F82525;
font-weight: bolder; font-weight: bolder;
} }
.tab-bar .type.selected-topic { .tab-bar .type.selected-topic {
color: #F82525; color: #F82525;
font-weight: bolder; font-weight: bolder;
} }
.tab-bar .select-bar { .tab-bar .select-bar {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
@ -206,14 +251,17 @@ page {
border-radius: 4rpx; border-radius: 4rpx;
transition: left 0.5s ease; transition: left 0.5s ease;
} }
.tab-bar .select-bar.selected-issue { .tab-bar .select-bar.selected-issue {
left: 11%; left: 11%;
transition: left 0.5s ease; transition: left 0.5s ease;
} }
.tab-bar .select-bar.selected-project { .tab-bar .select-bar.selected-project {
left: 44.5%; left: 44.5%;
transition: left 0.5s ease; transition: left 0.5s ease;
} }
.tab-bar .select-bar.selected-topic { .tab-bar .select-bar.selected-topic {
left: 78%; left: 78%;
transition: left 0.5s ease; transition: left 0.5s ease;
@ -224,6 +272,7 @@ page {
box-sizing: border-box; box-sizing: border-box;
padding: 20rpx; padding: 20rpx;
} }
.issue-list .issue-nodata { .issue-list .issue-nodata {
width: 100%; width: 100%;
display: flex; display: flex;
@ -231,17 +280,20 @@ page {
align-items: center; align-items: center;
margin-top: 70rpx; margin-top: 70rpx;
} }
.issue-list .issue-nodata .no-data { .issue-list .issue-nodata .no-data {
width: 258rpx; width: 258rpx;
height: 244rpx; height: 244rpx;
object-fit: cover; object-fit: cover;
} }
.issue-list .issue-nodata .tip { .issue-list .issue-nodata .tip {
font-size: 28rpx; font-size: 28rpx;
color: #bcbcbc; color: #bcbcbc;
line-height: 40rpx; line-height: 40rpx;
height: 40rpx; height: 40rpx;
} }
.issue-list .issue-nodata .add-issue { .issue-list .issue-nodata .add-issue {
display: flex; display: flex;
align-items: center; align-items: center;
@ -249,21 +301,23 @@ page {
position: relative; position: relative;
margin-top: 30rpx; margin-top: 30rpx;
} }
.issue-list .issue-nodata .add-issue .issue-trigger { .issue-list .issue-nodata .add-issue .issue-trigger {
width: 100rpx; width: 100rpx;
height: 66rpx; height: 66rpx;
object-fit: cover; object-fit: cover;
margin-right:20rpx; margin-right: 20rpx;
position: absolute; position: absolute;
left: -120rpx; left: -120rpx;
bottom: 10rpx; bottom: 10rpx;
} }
.issue-list .issue-nodata .add-issue button { .issue-list .issue-nodata .add-issue button {
width: 140rpx; width: 140rpx;
height: 50rpx; height: 50rpx;
line-height: 50rpx; line-height: 50rpx;
border-radius: 6rpx; border-radius: 6rpx;
text-align:center; text-align: center;
padding: 0; padding: 0;
outline: none; outline: none;
border: 0; border: 0;
@ -271,9 +325,11 @@ page {
font-size: 22rpx; font-size: 22rpx;
background: linear-gradient(to right, #f51111, #ff4b4b); background: linear-gradient(to right, #f51111, #ff4b4b);
} }
.issue-list .issue-nodata .add-issue button::after { .issue-list .issue-nodata .add-issue button::after {
border: 0; border: 0;
} }
.issue-list .issue-nodata .add-issue .hover-add-issue { .issue-list .issue-nodata .add-issue .hover-add-issue {
background: red; background: red;
} }
@ -283,6 +339,7 @@ page {
box-sizing: border-box; box-sizing: border-box;
padding: 20rpx; padding: 20rpx;
} }
.project-list .project-nodata { .project-list .project-nodata {
width: 100%; width: 100%;
display: flex; display: flex;
@ -290,17 +347,20 @@ page {
align-items: center; align-items: center;
margin-top: 70rpx; margin-top: 70rpx;
} }
.project-list .project-nodata .no-data { .project-list .project-nodata .no-data {
width: 260rpx; width: 260rpx;
height: 246rpx; height: 246rpx;
object-fit: cover; object-fit: cover;
} }
.project-list .project-nodata .tip { .project-list .project-nodata .tip {
font-size: 28rpx; font-size: 28rpx;
color: #bcbcbc; color: #bcbcbc;
line-height: 40rpx; line-height: 40rpx;
height: 40rpx; height: 40rpx;
} }
.project-list .project-nodata .add-issue { .project-list .project-nodata .add-issue {
display: flex; display: flex;
align-items: center; align-items: center;
@ -308,21 +368,23 @@ page {
position: relative; position: relative;
margin-top: 30rpx; margin-top: 30rpx;
} }
.project-list .project-nodata .add-issue .issue-trigger { .project-list .project-nodata .add-issue .issue-trigger {
width: 100rpx; width: 100rpx;
height: 66rpx; height: 66rpx;
object-fit: cover; object-fit: cover;
margin-right:20rpx; margin-right: 20rpx;
position: absolute; position: absolute;
left: -120rpx; left: -120rpx;
bottom: 10rpx; bottom: 10rpx;
} }
.project-list .project-nodata .add-issue button { .project-list .project-nodata .add-issue button {
width: 140rpx; width: 140rpx;
height: 50rpx; height: 50rpx;
line-height: 50rpx; line-height: 50rpx;
border-radius: 6rpx; border-radius: 6rpx;
text-align:center; text-align: center;
padding: 0; padding: 0;
outline: none; outline: none;
border: 0; border: 0;
@ -330,9 +392,11 @@ page {
font-size: 22rpx; font-size: 22rpx;
background: linear-gradient(to right, #f51111, #ff4b4b); background: linear-gradient(to right, #f51111, #ff4b4b);
} }
.project-list .project-nodata .add-issue button::after { .project-list .project-nodata .add-issue button::after {
border: 0; border: 0;
} }
.project-list .project-nodata .add-issue .hover-add-issue { .project-list .project-nodata .add-issue .hover-add-issue {
background: red; background: red;
} }
@ -342,6 +406,7 @@ page {
box-sizing: border-box; box-sizing: border-box;
padding: 20rpx; padding: 20rpx;
} }
.topic-list .topic-nodata { .topic-list .topic-nodata {
width: 100%; width: 100%;
display: flex; display: flex;
@ -349,11 +414,13 @@ page {
align-items: center; align-items: center;
margin-top: 70rpx; margin-top: 70rpx;
} }
.topic-list .topic-nodata .no-data { .topic-list .topic-nodata .no-data {
width: 258rpx; width: 258rpx;
height: 244rpx; height: 244rpx;
object-fit: cover; object-fit: cover;
} }
.topic-list .topic-nodata .tip { .topic-list .topic-nodata .tip {
font-size: 28rpx; font-size: 28rpx;
color: #bcbcbc; color: #bcbcbc;
@ -370,4 +437,57 @@ page {
align-items: center; align-items: center;
color: #999; color: #999;
font-size: 26rpx; font-size: 26rpx;
}
/* 亮身份 */
.bright-status {
box-sizing: border-box;
background: #fff;
width: 710rpx;
height: 146rpx;
margin: auto;
position: absolute;
top: 222rpx;
left: 50%;
transform: translate(-50%, 0);
border-radius: 20rpx;
box-shadow: 0px 7px 21px 0px rgba(223, 223, 223, 0.31);
display: flex;
align-items: center;
justify-content: space-around;
z-index: 100;
}
.bright-status-bac {
width: 389rpx;
height: 33rpx;
}
.bright-status-text {
width: 160rpx;
height: 56rpx;
line-height: 56rpx;
background-image: linear-gradient(90deg,
#e83100 0%,
#ff6326 100%),
linear-gradient(#ffffff,
#ffffff);
box-shadow: 0px 4px 16px 0px rgba(237, 61, 9, 0.26);
border-radius: 28rpx;
font-size: 29rpx;
color: #ffffff;
text-align: center;
}
.bianji {
width: 38rpx;
height: 38rpx;
vertical-align: middle;
margin-right: 20rpx;
}
.right-icon {
width: 13rpx;
height: 20rpx;
vertical-align: middle;
} }

BIN
epdc-resident-mp-yushan/subpages/communityNews/images/avatar.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 KiB

BIN
epdc-resident-mp-yushan/subpages/communityNews/images/eye.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

BIN
epdc-resident-mp-yushan/subpages/communityNews/images/ic_yueduliang.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
epdc-resident-mp-yushan/subpages/communityNews/images/nothing.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

27
epdc-resident-mp-yushan/subpages/communityNews/pages/detail/detail.js

@ -0,0 +1,27 @@
const homeApi = require('../../../../utils/home')
Page({
data: {
detailObj: {},
detailId: '',
detailObjContent: ''
},
onLoad(option) {
if (option.id) {
this.setData({
detailId: option.id
})
this.getDetail()
}
},
getDetail() {
homeApi.contentDetail(this.data.detailId).then(res => {
console.log(res)
this.setData({
detailObj: res.data
})
}).catch(err => {
console.log(err)
})
}
})

3
epdc-resident-mp-yushan/subpages/communityNews/pages/detail/detail.json

@ -0,0 +1,3 @@
{
"navigationBarTitleText": "资讯详情"
}

21
epdc-resident-mp-yushan/subpages/communityNews/pages/detail/detail.wxml

@ -0,0 +1,21 @@
<wxs module="filter" src="../../../../utils/filter.wxs"></wxs>
<view class="notice-detail">
<view class="selfContent">
<view class="detail-title">{{detailObj.noticeTitle}}</view>
<view class="detail-subtitle">
<view class="left">
<span>{{detailObj.deptName}}</span>
<span>{{filter.formatTime(detailObj.noticeTime, 'yyyy-MM-dd')}}</span>
</view>
<view class="right">
<view class="readNum">
<image src="../../images/ic_yueduliang.png" />
</view>
<view class="num">{{detailObj.readingAmount}}</view>
</view>
</view>
<view class="richContent">
<rich-text nodes="{{detailObj.noticeContent}}"></rich-text>
</view>
</view>
</view>

72
epdc-resident-mp-yushan/subpages/communityNews/pages/detail/detail.wxss

@ -0,0 +1,72 @@
.notice-detail {
width: 100%;
min-height: 100vh;
box-sizing: border-box;
padding: 20rpx;
background: #f7f7f7;
}
.selfContent {
width: 100%;
display: table;
background: #ffffff;
border-radius: 16rpx;
box-sizing: border-box;
padding: 0 25rpx 38rpx;
}
.detail-title {
font-family: PingFang-SC-Bold;
font-size: 48rpx;
font-weight: bold;
line-height: 68rpx;
color: #333333;
padding-top: 40rpx;
}
.detail-subtitle {
display: flex;
width: 100%;
justify-content: space-between;
font-size: 22rpx;
color: #999999;
margin-top:45rpx;
}
.detail-subtitle .left span:nth-child(1){
margin-right: 32rpx;
}
.detail-subtitle .right{
display: flex;
height: 32rpx;
line-height: 32rpx;
}
.detail-subtitle .right .readNum {
/* display: inline-block; */
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
}
.detail-subtitle .right .readNum image{
width: 100%;
height: 100%;
float:left;
object-fit: cover;
}
.banner {
width: 100%;
height: 400rpx;
margin: 39rpx 0 19rpx 0;
}
.banner image{
width: 100%;
height: 100%;
float:left;
object-fit: cover;
border-radius: 16rpx;
overflow: hidden;
}
.paragraph {
font-size: 38rpx;
line-height: 58rpx;
color: #333333;
text-indent: 76rpx;
margin-top:22rpx;
}

84
epdc-resident-mp-yushan/subpages/communityNews/pages/index/index.js

@ -0,0 +1,84 @@
const homeApi = require('../../../../utils/home')
Page({
data: {
tabList: [],
currentTab: '',
loadMoreType: 'none',
loadMoreVisible: false,
newsList: [],
pageNo: 1,
pageSize: 10,
currentView: 'item'
},
onShow() {
wx.showLoading({
title: '加载中,,,'
})
this.contentList()
this.contentModuleList()
},
onPageScroll() {
this.setData({
loadMoreVisible: true
})
if (this.loadMoreType === 'loading') {
this.pageNo += 1
this.contentList()
}
},
changeTab(e) {
const { tab } = e.currentTarget.dataset
this.setData({
currentTab: tab,
loadMoreType: 'none',
loadMoreVisible: false,
newsList: [],
currentView: `item${tab}`
})
wx.showLoading({
title: '加载中,,,'
})
this.contentList()
},
// 获取资讯列表
contentList() {
const params = {
pageIndex: this.data.pageNo,
pageSize: this.data.pageSize,
typeId: this.data.currentTab
}
homeApi.contentList(params).then(res => {
console.log('社区最新资讯', res)
this.setData({
newsList: res.data,
loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none'
})
wx.hideLoading()
}).catch(err => {
console.error(err)
wx.hideLoading()
})
},
// 获取栏目列表
contentModuleList() {
homeApi.contentModuleList().then(res => {
console.log('栏目列表', res)
const tabList = []
res.data.forEach(item => {
tabList.push({ label: item.typeName, value: item.id })
})
this.setData({
tabList: [...[{ label: '最新资讯', value: '' }], ...tabList]
})
}).catch(err => {
console.error('', err)
})
},
navigateToDetail(e) {
const { id } = e.currentTarget.dataset
wx.navigateTo({
url: `/subpages/communityNews/pages/detail/detail?id=${id}`
})
}
})

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

@ -0,0 +1,5 @@
{
"navigationBarTitleText": "社区资讯",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#bb0300"
}

35
epdc-resident-mp-yushan/subpages/communityNews/pages/index/index.wxml

@ -0,0 +1,35 @@
<view class="community-news">
<scroll-view scroll-x="{{true}}" scroll-with-animation="{{true}}" scroll-into-view="{{currentView}}">
<view class="tab-list">
<view id="{{'item' + item.value}}" hover-class="item-hover" hover-stay-time="250" class="tab-item {{currentTab === item.value ? 'active' : ''}}" wx:for="{{tabList}}" wx-key="index" wx:for-item="item" wx:for-index="index" bindtap="changeTab" data-tab="{{item.value}}">
{{item.label}}
<view class="select-tab"></view>
</view>
</view>
</scroll-view>
<view class="news-list" wx:if="{{newsList.length > 0}}">
<view class="list-item" wx:for="{{newsList}}" wx-key="index" wx:for-item="item" wx:for-index="index" bindtap="navigateToDetail" data-id="{{item.id}}">
<view class="news-img">
<image src="{{item.imgUrl}}" />
</view>
<view class="detail">
<view class="title">{{item.noticeTitle}}</view>
<view class="bottom-detail">
<view class="time">{{item.releaseTime}}</view>
<view class="page-view">
<view class="page-view-img">
<image src="../../../../images/home/eye.png" />
</view>
<view class="num">{{item.readingAmount}}</view>
</view>
</view>
</view>
</view>
</view>
<view class="no-data" wx:if="{{newsList.length === 0 && loadMoreType === 'none'}}">
<view class="no-data-container">
<image src="../../images/nothing.png" />
</view>
</view>
<load-more loadMoreVisible="{{loadMoreVisible}}" loadMoreType="{{loadMoreType}}"></load-more>
</view>

155
epdc-resident-mp-yushan/subpages/communityNews/pages/index/index.wxss

@ -0,0 +1,155 @@
image {
width: 100%;
height: 100%;
float: left;
}
.community-news {
width: 100%;
min-height: 100vh;
overflow-y: auto;
background: #f7f7f7;
}
.community-news scroll-view {
width: 100%;
height: 90rpx;
background: #fff;
position: fixed;
top: 0;
left: 0;
}
.community-news scroll-view .tab-list {
display: flex;
align-items: center;
}
.community-news scroll-view .tab-item {
font-size: 28rpx;
color: #999;
line-height: 90rpx;
height: 90rpx;
padding: 0 29rpx;
flex-shrink: 0;
position: relative;
}
.item-hover {
background: #ddd;
}
.community-news scroll-view .tab-item.active {
font-size: 30rpx;
color: #bb0300;
}
.community-news scroll-view .tab-item .select-tab {
width: 40rpx;
height: 6rpx;
background-color: #bb0300;
border-radius: 3rpx;
position: absolute;
bottom: 0px;
left: calc(50% - 20rpx);
display: none;
}
.community-news scroll-view .tab-item.active .select-tab {
display: block;
}
.community-news scroll-view .tab-item + .tab-item {
margin-left: 19rpx;
}
.news-list {
width: 100%;
background: #fff;
margin-top: calc(16rpx + 90rpx);
box-sizing: border-box;
padding: 0 30rpx;
}
.news-list .list-item {
width: 100%;
box-sizing: border-box;
padding: 30rpx 0;
display: flex;
align-items: center;
}
.news-list .list-item + .list-item {
border-top: 1rpx solid #eaeaea;
}
.news-list .list-item .news-img {
width: 210rpx;
height: 150rpx;
border-radius: 8rpx;
overflow: hidden;
margin-right: 20rpx;
}
.news-list .list-item .detail {
width: calc(100% - 210rpx - 20rpx);
height: 150rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.news-list .list-item .detail .title {
font-size: 34rpx;
color: #3f3f3f;
line-height: 44rpx;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.news-list .list-item .bottom-detail {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.news-list .list-item .bottom-detail .time {
font-size: 22rpx;
letter-spacing: 1px;
color: #aaa;
}
.news-list .list-item .bottom-detail .page-view {
display: flex;
align-items: center;
justify-content: flex-start;
}
.news-list .list-item .bottom-detail .page-view .page-view-img {
width: 30rpx;
height: 24rpx;
margin-right: 12rpx;
}
.news-list .list-item .bottom-detail .page-view .num {
font-size: 24rpx;
letter-spacing: 1px;
color: #aaa;
}
.no-data {
width: 100%;
height:calc(100vh - 90rpx - 100rpx - 20rpx);
display: flex;
align-items: center;
justify-content: center;
}
.no-data .no-data-container {
width: 534rpx;
height: 258rpx;
}

BIN
epdc-resident-mp-yushan/subpages/discussion/images/reResh.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

42
epdc-resident-mp-yushan/subpages/discussion/pages/addIssue/addIssue.js

@ -3,6 +3,7 @@ import { $wuxActionSheet } from '../../../../dist/index'
const config = require('../../../../utils/config') const config = require('../../../../utils/config')
import { addIssue } from '../../utils/api' import { addIssue } from '../../utils/api'
const app = getApp() const app = getApp()
const esuaEpdcMpPluginInterface = requirePlugin('esuaEpdcMpPlugin')
Page({ Page({
data: { data: {
@ -31,6 +32,47 @@ Page({
}) })
} }
}, },
onShow () {
if (esuaEpdcMpPluginInterface.locationSelectData.choose) {
const { latitude, longitude, address } = esuaEpdcMpPluginInterface.locationSelectData
this.setData({
latitude: latitude,
longitude: longitude,
addressContent: address
})
}
},
// 重新定位
getPosition(){
wx.getSetting({
success (res) {
if (!res.authSetting['scope.userLocation']) {
wx.showModal({
title: '温馨提示',
content: '重选定位需获取您的地理位置,是否去设置打开?',
confirmText: "确认",
cancelText: "取消",
success (res) {
console.log(res);
if (res.confirm) {
wx.openSetting()
} else {
wx.showToast({
title: '请允许获取地理位置后,再重选定位',
icon: 'none',
duration: 2000
})
}
}
})
} else {
wx.navigateTo({
url: 'plugin://esuaEpdcMpPlugin/location_select'
})
}
}
})
},
// 双向绑定 内容输入框 // 双向绑定 内容输入框
bindTextareaInput (e) { bindTextareaInput (e) {
this.setData({ this.setData({

12
epdc-resident-mp-yushan/subpages/discussion/pages/addIssue/addIssue.wxml

@ -17,9 +17,15 @@
</view> </view>
<view class="issue-location"> <view class="issue-location">
<textarea maxlength="80" placeholder="请输入地址" placeholder-class="address-placeholder" value="{{addressContent}}" bindblur="bindAddressInput" bindinput="bindAddressInput"></textarea> <textarea maxlength="80" placeholder="请输入地址" placeholder-class="address-placeholder" value="{{addressContent}}" bindblur="bindAddressInput" bindinput="bindAddressInput"></textarea>
<view class="address"> <view class="flexBox">
<image src="../../images/ic_yitidingwei@2x.png" /> <view class="address">
<view>议题定位</view> <image src="../../images/ic_yitidingwei@2x.png" />
<view>议题定位</view>
</view>
<view bindtap="getPosition" class="refresh">
<image src="../../images/reResh.png"></image>
<view class="refresh-name">重新定位</view>
</view>
</view> </view>
</view> </view>
<view class="publish-issue"> <view class="publish-issue">

61
epdc-resident-mp-yushan/subpages/discussion/pages/addIssue/addIssue.wxss

@ -2,6 +2,7 @@ page {
width: 100%; width: 100%;
height: 100vh; height: 100vh;
} }
.add-issue { .add-issue {
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -18,16 +19,18 @@ page {
box-sizing: border-box; box-sizing: border-box;
padding: 30rpx 20rpx 45rpx; padding: 30rpx 20rpx 45rpx;
} }
.add-issue .issue-content textarea { .add-issue .issue-content textarea {
width: 100%; width: 100%;
height: 298rpx; height: 298rpx;
box-sizing: border-box; box-sizing: border-box;
padding-bottom:20rpx; padding-bottom: 20rpx;
font-size: 34rpx; font-size: 34rpx;
color: #333; color: #333;
line-height: 50rpx; line-height: 50rpx;
position: relative; position: relative;
} }
.add-issue .issue-content textarea .textarea-placeholder { .add-issue .issue-content textarea .textarea-placeholder {
font-size: 32rpx; font-size: 32rpx;
color: #999; color: #999;
@ -36,6 +39,7 @@ page {
left: 0; left: 0;
top: 0; top: 0;
} }
.add-issue .issue-content .image-list { .add-issue .issue-content .image-list {
width: 100%; width: 100%;
display: grid; display: grid;
@ -44,17 +48,20 @@ page {
grid-gap: 17rpx; grid-gap: 17rpx;
height: 214rpx; height: 214rpx;
} }
.add-issue .issue-content .image-list .image-item { .add-issue .issue-content .image-list .image-item {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: relative; position: relative;
} }
.add-issue .issue-content .image-list image { .add-issue .issue-content .image-list image {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: cover; object-fit: cover;
border-radius: 8rpx; border-radius: 8rpx;
} }
.add-issue .issue-content .image-list .image-item .loading { .add-issue .issue-content .image-list .image-item .loading {
position: absolute; position: absolute;
left: 25%; left: 25%;
@ -62,6 +69,7 @@ page {
width: 50%; width: 50%;
height: 50%; height: 50%;
} }
.add-issue .issue-content .image-list .image-item .close { .add-issue .issue-content .image-list .image-item .close {
position: absolute; position: absolute;
top: -10rpx; top: -10rpx;
@ -79,27 +87,32 @@ page {
box-sizing: border-box; box-sizing: border-box;
padding: 34rpx 18rpx 9rpx 25rpx; padding: 34rpx 18rpx 9rpx 25rpx;
} }
.add-issue .issue-location .address { .add-issue .issue-location .address {
width:100%; width: 50%;
height: 80rpx; height: 80rpx;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.add-issue .issue-location textarea { .add-issue .issue-location textarea {
width:100%; width: 100%;
height: 88rpx; height: 88rpx;
color: #333; color: #333;
font-size: 34rpx; font-size: 34rpx;
line-height: 46rpx; line-height: 46rpx;
} }
.add-issue .issue-location .address-placeholder { .add-issue .issue-location .address-placeholder {
font-size: 32rpx; font-size: 32rpx;
color: #999; color: #999;
} }
.add-issue .issue-location .address image { .add-issue .issue-location .address image {
width: 26rpx; width: 26rpx;
height:26rpx; height: 26rpx;
} }
.add-issue .issue-location .address view { .add-issue .issue-location .address view {
color: #999; color: #999;
font-size: 26rpx; font-size: 26rpx;
@ -107,17 +120,18 @@ page {
} }
.add-issue .publish-issue { .add-issue .publish-issue {
width:100%; width: 100%;
height: 84rpx; height: 84rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-top: 180rpx; margin-top: 180rpx;
} }
.add-issue .publish-issue button { .add-issue .publish-issue button {
width:560rpx; width: 560rpx;
height: 84rpx; height: 84rpx;
line-height:84rpx; line-height: 84rpx;
text-align: center; text-align: center;
margin: 0; margin: 0;
padding: 0; padding: 0;
@ -127,11 +141,42 @@ page {
font-size: 36rpx; font-size: 36rpx;
border-radius: 16rpx; border-radius: 16rpx;
} }
.add-issue .publish-issue .hover-publish { .add-issue .publish-issue .hover-publish {
background:red; background: red;
} }
.wux-actionsheet__button { .wux-actionsheet__button {
font-size: 34rpx !important; font-size: 34rpx !important;
color: #333 !important; color: #333 !important;
}
/* 重新定位 */
.flexBox {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
box-sizing: border-box;
}
.refresh {
margin-top: 20rpx;
margin-left: 30rpx;
}
.refresh image {
width: 34rpx;
height: 34rpx;
float: left;
position: relative;
top: 5rpx;
}
.refresh-name {
font-size: 28rpx;
font-weight: 500;
color: rgba(0, 179, 152, 1);
float: left;
margin-left: 10rpx;
} }

9
epdc-resident-mp-yushan/subpages/status/api/status.js

@ -0,0 +1,9 @@
const request = require('../../../utils/request')
export function showIdentity(params) {
return request.post('app-user/partyMember/showIdentity', params)
}
export function getDentityDetail() {
return request.get('app-user/partyMember/dentityDetail')
}

BIN
epdc-resident-mp-yushan/subpages/status/images/icon_close.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
epdc-resident-mp-yushan/subpages/status/images/ig_tianjiatupian@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
epdc-resident-mp-yushan/subpages/status/images/loading.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

197
epdc-resident-mp-yushan/subpages/status/pages/brightStatus/brightStatus.js

@ -0,0 +1,197 @@
import { showIdentity, getDentityDetail } from '../../api/status'
const uploadImageUrl =
'https://epdc-yushan.elinkservice.cn/epdc-api/api/group/topic/upload'
Page({
data: {
streetVisible: false,
conditionListVisible: false,
checkboxSelectOptions: [],
sayingValue: '', //党员格言
promiseValue: '', //党员承诺
introValue: '', //服务范围
uploadTitleImage: {
uploaded: true,
url: '',
},
showIdentityFlag: 0, // 是否亮过身份 0 否 1 是
},
onLoad: function (options) {
if (options.showIdentityFlag) {
this.setData({
showIdentityFlag: options.showIdentityFlag,
})
}
if (this.data.showIdentityFlag == 1) {
this.getDentityDetail()
}
},
introBlur(e) {
this.setData({
introValue: e.detail.value,
})
},
introInput(e) {
this.setData({
introValue: e.detail.value,
})
},
introFocus() {
this.setData({})
},
sayingBlur(e) {
this.setData({
sayingValue: e.detail.value,
})
},
sayingInput(e) {
this.setData({
sayingValue: e.detail.value,
})
},
sayingFocus() {
this.setData({})
},
promiseBlur(e) {
this.setData({
promiseValue: e.detail.value,
})
},
promiseInput(e) {
this.setData({
promiseValue: e.detail.value,
})
},
promiseFocus() {
this.setData({})
},
// 提交--亮身份
showIdentity() {
const params = {
headUrl: this.data.uploadTitleImage.url, // 地址
motto: this.data.sayingValue, //格言
promise: this.data.promiseValue, // 承诺
serviceArea: this.data.introValue, // 服务范围
}
if (!this.data.sayingValue) {
wx.showToast({
title: '请输入党员格言',
icon: 'none',
duration: 1000,
})
return
}
if (!this.data.promiseValue) {
wx.showToast({
title: '请输入党员承诺',
icon: 'none',
duration: 1000,
})
return
}
if (!this.data.introValue) {
wx.showToast({
title: '请输入服务范围',
icon: 'none',
duration: 1000,
})
return
}
if (!this.data.uploadTitleImage.url) {
wx.showToast({
title: '请上传党员头像',
icon: 'none',
duration: 1000,
})
return
}
wx.showLoading({
title: '提交中,请稍等',
mask: true,
})
showIdentity(params)
.then((res) => {
wx.hideLoading()
wx.showToast({
title: '亮身份成功',
icon: 'success',
duration: 1000,
mask: true,
success: () => {
// wx.navigateBack({
// delta: 1,
// })
wx.reLaunch({
url: '/pages/index/index',
})
},
})
})
.catch(() => {
wx.hideLoading()
})
},
// 回显---党员亮身份
getDentityDetail() {
const params = {
identityNo: this.data.identityNo,
}
getDentityDetail(params)
.then((res) => {
this.setData({
sayingValue: res.data.motto, // 格言
promiseValue: res.data.promise, // 承诺
introValue: res.data.serviceArea, // 服务范围
['uploadTitleImage.url']: res.data.headUrl, // 头像
})
})
.catch(() => {})
},
// 上传头像
previewImage(e) {
wx.previewImage({
urls: [e.currentTarget.dataset.src],
})
},
chooseImage() {
const _this = this
wx.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
success(res) {
_this.setData({
'uploadTitleImage.uploaded': false,
'uploadTitleImage.url': res.tempFilePaths[0],
})
wx.uploadFile({
url: uploadImageUrl,
filePath: res.tempFilePaths[0],
name: 'file',
header: {
'Content-type': 'multipart/form-data',
Authorization: wx.getStorageSync('token'),
},
success(fileRes) {
const uploadTitleImage = {
uploaded: true,
url: JSON.parse(fileRes.data).data,
}
_this.setData({
uploadTitleImage,
})
},
})
},
})
},
deleteImage(e) {
const uploadTitleImage = {
url: '',
uploaded: true,
}
this.setData({
uploadTitleImage,
})
},
})

7
epdc-resident-mp-yushan/subpages/status/pages/brightStatus/brightStatus.json

@ -0,0 +1,7 @@
{
"usingComponents": {
"wux-popup-select": "../../../../dist/popup-select/index",
"wux-cell": "../../../../dist/cell/index"
},
"navigationBarTitleText": "亮身份"
}

24
epdc-resident-mp-yushan/subpages/status/pages/brightStatus/brightStatus.wxml

@ -0,0 +1,24 @@
<view class="party-saying">
<text class="party-saying-text">格言</text>
<textarea placeholder="请填写您的人士格言(不超过30字)" maxlength='30' placeholder-class="placeholder-saying" bindblur='sayingBlur' bindinput='sayingInput' bindfocus='sayingFocus' value="{{sayingValue}}" />
</view>
<view class="party-promise">
<text class="party-saying-text">承诺</text>
<textarea placeholder="请填写您的为民服务承诺(不超过100字)" maxlength='100' placeholder-class="placeholder-saying" bindblur='promiseBlur' bindinput='promiseInput' bindfocus='promiseFocus' value="{{promiseValue}}" />
</view>
<view class="intro">
<text class="party-saying-text">服务范围</text>
<textarea placeholder="请填写您的为民服务范围(不超过100字)" maxlength='100' placeholder-class="placeholder-saying" bindblur='introBlur' bindinput='introInput' bindfocus='introFocus' value="{{introValue}}" />
</view>
<view class="header-image">
<text class="party-saying-text">上传头像</text>
<view class="image-item" wx:if="{{uploadTitleImage.url}}">
<image class="issue-image" src="{{uploadTitleImage.url}}" bindtap="previewImage" data-src="{{uploadTitleImage.url}}" />
<image wx:if="{{!uploadTitleImage.uploaded}}" class="loading" src="../../images/loading.gif" />
<image bindtap="deleteImage" class="close" wx:else src="../../images/icon_close.png" />
</view>
<image wx:else src="../../images/ig_tianjiatupian@2x.png" bindtap="chooseImage" />
</view>
<view class="button-view">
<view class="show-status" bind:tap="showIdentity">点亮徽章</view>
</view>

113
epdc-resident-mp-yushan/subpages/status/pages/brightStatus/brightStatus.wxss

@ -0,0 +1,113 @@
page {
background: #f8f8fa;
}
.party-saying,
.intro,
.party-promise {
box-sizing: border-box;
width: 100%;
height: 300rpx;
padding: 30rpx;
background: #fff;
margin-top: 10rpx;
}
.party-saying-text {
font-size: 34rpx;
}
textarea {
margin-top: 10rpx;
width: 100%;
height: 100%;
}
.placeholder-saying {
color: #A8A8A8;
font-size: 32rpx;
}
.button-view {
display: flex;
justify-content: space-around;
}
.show-status {
width: 440rpx;
height: 80rpx;
line-height: 80rpx;
background-image: linear-gradient(90deg,
#db1a1f 20%,
#e95027 100%),
linear-gradient(#ffffff,
#ffffff);
box-shadow: 0px 4px 27px 0px rgba(220, 28, 31, 0.29);
border-radius: 40rpx;
color: #fff;
font-size: 34rpx;
text-align: center;
margin-top: 65rpx;
}
.wux-cell__ft {
width: 480rpx !important;
box-sizing: border-box !important;
white-space: nowrap !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
text-align: left !important;
}
.wux-cell:after {
border: none !important;
}
.wux-cell--access .wux-cell__ft:after {
width: 0rpx !important;
height: 0rpx !important;
}
/* 上传头像 */
.header-image {
width: 100%;
height: 280rpx;
box-sizing: border-box;
padding: 10rpx 30rpx;
background: #fff;
margin-top: 10rpx;
display: flex;
flex-direction: column;
}
.image-item {
width: 180rpx;
height: 180rpx;
position: relative;
margin-top: 10rpx;
}
.image-item .loading {
position: absolute;
left: 25%;
top: 25%;
width: 50%;
height: 50%;
}
.image-item .close {
position: absolute;
top: -10rpx;
right: -10rpx;
width: 40rpx;
height: 40rpx;
}
.header-image image {
width: 180rpx;
height: 180rpx;
object-fit: cover;
border-radius: 8rpx;
margin-top: 10rpx;
}

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

@ -11,8 +11,8 @@ module.exports = {
getGridList: getGridList, getGridList: getGridList,
changeGrid: changeGrid, changeGrid: changeGrid,
completeInfo: completeInfo, completeInfo: completeInfo,
completeResidentInfoV2:completeResidentInfoV2, completeResidentInfoV2: completeResidentInfoV2,
completePartyInfoV2:completePartyInfoV2, completePartyInfoV2: completePartyInfoV2,
completeCompanyInfo: completeCompanyInfo, completeCompanyInfo: completeCompanyInfo,
completeCompanyMoreInfo: completeCompanyMoreInfo, completeCompanyMoreInfo: completeCompanyMoreInfo,
prepareComplete: prepareComplete, prepareComplete: prepareComplete,
@ -51,16 +51,17 @@ module.exports = {
completeInfoV2: completeInfoV2, completeInfoV2: completeInfoV2,
getTokenV3: getTokenV3, getTokenV3: getTokenV3,
getWxPhone: getWxPhone, getWxPhone: getWxPhone,
getPropertyProjectList:getPropertyProjectList, getPropertyProjectList: getPropertyProjectList,
getPropertyProjectDetail:getPropertyProjectDetail, getPropertyProjectDetail: getPropertyProjectDetail,
applyForGroup:applyForGroup, applyForGroup: applyForGroup,
submitScore:submitScore, submitScore: submitScore,
getStartupPageV2:getStartupPageV2, getStartupPageV2: getStartupPageV2,
getConsultantList:getConsultantList, getConsultantList: getConsultantList,
getQuestionList:getQuestionList, getQuestionList: getQuestionList,
submitQuestion:submitQuestion, submitQuestion: submitQuestion,
getMyQuestion:getMyQuestion, getMyQuestion: getMyQuestion,
getConsultantDetail:getConsultantDetail getConsultantDetail: getConsultantDetail,
gridmanList: gridmanList
} }
function getToken(wxCode) { function getToken(wxCode) {
@ -72,17 +73,17 @@ function getToken(wxCode) {
function bannerList(position) { function bannerList(position) {
return fly.get('news/banner/list', { return fly.get('news/banner/list', {
position, position,
sectionCode:"home_page_news" sectionCode: "home_page_news"
}) })
} }
function getIssueList(param) { // function getIssueList(param) {
return fly.get('events/issue/list', param) // return fly.get('events/issue/list', param)
} // }
function getProjectList(param) { // function getProjectList(param) {
return fly.get('events/item/list', param) // return fly.get('events/item/list', param)
} // }
function getFirstInfo() { function getFirstInfo() {
return fly.post('news/information/first') return fly.post('news/information/first')
@ -115,7 +116,7 @@ function saveWxFormid(wxCode, wxFormId) {
}) })
} }
function getTokenV2({wxCode, gridId, inviteUserId}) { function getTokenV2({ wxCode, gridId, inviteUserId }) {
return fly.get('app-user/user/ma/v2/getToken', { return fly.get('app-user/user/ma/v2/getToken', {
wxCode, wxCode,
gridId, gridId,
@ -143,11 +144,11 @@ function completeInfo(data) {
return fly.post('app-user/user/completeInfo', data) return fly.post('app-user/user/completeInfo', data)
} }
// 居民 完善个人信息v2 不需要穿验证码 // 居民 完善个人信息v2 不需要穿验证码
function completeResidentInfoV2 (para) { function completeResidentInfoV2(para) {
return fly.post("app-user/user/v2/completeResidentInfo", para) return fly.post("app-user/user/v2/completeResidentInfo", para)
} }
// 党员 完善个人信息 v2 不需要穿验证码 // 党员 完善个人信息 v2 不需要穿验证码
function completePartyInfoV2 (para) { function completePartyInfoV2(para) {
return fly.post("app-user/user/v2/completePartyInfo", para) return fly.post("app-user/user/v2/completePartyInfo", para)
} }
@ -182,7 +183,7 @@ function getCompanyByUserId() {
/** /**
* 干部评价入口是否开启 * 干部评价入口是否开启
*/ */
function getAvailable () { function getAvailable() {
return fly.get('custom/evaluate/getAvailable') return fly.get('custom/evaluate/getAvailable')
} }
@ -249,7 +250,7 @@ function getCommandAssociation() {
/** /**
* 我的话题列表 * 我的话题列表
*/ */
function getMyTopicList ({pageIndex, pageSize}) { function getMyTopicList({ pageIndex, pageSize }) {
return fly.get('group/topic/listOfMine', { return fly.get('group/topic/listOfMine', {
pageIndex, pageIndex,
pageSize pageSize
@ -259,14 +260,14 @@ function getMyTopicList ({pageIndex, pageSize}) {
/** /**
* 我的议题列表 * 我的议题列表
*/ */
function getMyIssueList () { function getMyIssueList() {
return fly.get('events/issue/listByUserId') return fly.get('events/issue/listByUserId')
} }
/** /**
* 我的项目列表 * 我的项目列表
*/ */
function getMyProjectList ({ pageIndex, pageSize, timestamp }) { function getMyProjectList({ pageIndex, pageSize, timestamp }) {
return fly.get('events/item/listByUserId', { return fly.get('events/item/listByUserId', {
pageIndex, pageIndex,
pageSize, pageSize,
@ -277,7 +278,7 @@ function getMyProjectList ({ pageIndex, pageSize, timestamp }) {
/** /**
* 查看用户是否已保存unionId * 查看用户是否已保存unionId
*/ */
function checkWxUnionId () { function checkWxUnionId() {
return fly.get('app-user/user/checkWxUnionId') return fly.get('app-user/user/checkWxUnionId')
} }
// ---------------------------------个人中心接口 end------------------- // ---------------------------------个人中心接口 end-------------------
@ -291,7 +292,7 @@ function getDeptInfoByMaCode(code) {
/** /**
* 首页九宫格显示按钮 * 首页九宫格显示按钮
*/ */
function getIndexSudokuState () { function getIndexSudokuState() {
return fly.get('custom/majorFunction/checkState') return fly.get('custom/majorFunction/checkState')
} }
@ -300,7 +301,7 @@ function getIndexSudokuState () {
/** /**
* 排行榜 * 排行榜
*/ */
function leaderboard(){ function leaderboard() {
return fly.get('heart/volunteer/leaderboard') return fly.get('heart/volunteer/leaderboard')
} }
/** /**
@ -353,7 +354,7 @@ function getPhraseList() {
* 使用常用语 * 使用常用语
*/ */
function sagenumAddOne(id) { function sagenumAddOne(id) {
return fly.post('heart/phrase/sagenumAddOne',{ return fly.post('heart/phrase/sagenumAddOne', {
id: id id: id
}) })
} }
@ -384,8 +385,8 @@ function signup(actId) {
* 取消报名 * 取消报名
*/ */
function cancelsignup(id, response) { function cancelsignup(id, response) {
return fly.post('heart/act/cancelsignup',{ return fly.post('heart/act/cancelsignup', {
actId:id, actId: id,
failureReason: response failureReason: response
}) })
} }
@ -395,7 +396,7 @@ function cancelsignup(id, response) {
/** /**
* 已报名活动 * 已报名活动
*/ */
function getSignedList ({ pageIndex, pageSize, timestamp, actType }) { function getSignedList({ pageIndex, pageSize, timestamp, actType }) {
return fly.get('heart/act/signupList', { return fly.get('heart/act/signupList', {
pageIndex, pageIndex,
pageSize, pageSize,
@ -407,7 +408,7 @@ function getSignedList ({ pageIndex, pageSize, timestamp, actType }) {
/** /**
* 未通过活动详情 * 未通过活动详情
*/ */
function unpassActivityDetail (id) { function unpassActivityDetail(id) {
return fly.get(`heart/act/rejectDetail/${id}`) return fly.get(`heart/act/rejectDetail/${id}`)
} }
@ -416,7 +417,7 @@ function unpassActivityDetail (id) {
/** /**
* 用户完善个人信息v2不穿验证码 * 用户完善个人信息v2不穿验证码
*/ */
function completeInfoV2 (para) { function completeInfoV2(para) {
return fly.post('app-user/user/v2/completeInfo', para) return fly.post('app-user/user/v2/completeInfo', para)
} }
@ -424,13 +425,13 @@ function completeInfoV2 (para) {
* 获取Token v3 网格码和邀请码合二为一 * 获取Token v3 网格码和邀请码合二为一
*/ */
function getTokenV3 (para) { function getTokenV3(para) {
return fly.get('app-user/user/ma/v3/getToken', para) return fly.get('app-user/user/ma/v3/getToken', para)
} }
/********微信获取手机号 ********/ /********微信获取手机号 ********/
function getWxPhone ({wxCode,encryptedData,iv}) { function getWxPhone({ wxCode, encryptedData, iv }) {
return fly.get('app-user/user/ma/getWxPhone',{ return fly.get('app-user/user/ma/getWxPhone', {
wxCode, wxCode,
encryptedData, encryptedData,
iv iv
@ -438,50 +439,55 @@ function getWxPhone ({wxCode,encryptedData,iv}) {
} }
/********物业项目-物业项目列表 ********/ /********物业项目-物业项目列表 ********/
function getPropertyProjectList(){ function getPropertyProjectList() {
return fly.get('property/projectList') return fly.get('property/projectList')
} }
/********物业项目-物业项目详情 ********/ /********物业项目-物业项目详情 ********/
function getPropertyProjectDetail(propertyProjectId){ function getPropertyProjectDetail(propertyProjectId) {
return fly.get(`property/v2/projectDetail/${propertyProjectId}`) return fly.get(`property/v2/projectDetail/${propertyProjectId}`)
} }
/********物业群-申请入群 ********/ /********物业群-申请入群 ********/
function applyForGroup(groupId){ function applyForGroup(groupId) {
return fly.post('property/group/applyForGroup',{ return fly.post('property/group/applyForGroup', {
groupId:groupId groupId: groupId
})
}
/********物业-打分*******/
function submitScore(param) {
return fly.get('property/projectScore', param)
}
// 首页-网格员接口
function gridmanList(params) {
return fly.get('admin/sysUser/gridmanList', params)
}
export function getStartupPageV2() {
return fly.get('startup/v2/getStartupPage')
}
/********心理咨询-心理咨询师列表*******/
export function getConsultantList(allFlag) {
return fly.get('property/psychology/listPsychiatrist', {
'allFlag': allFlag
})
}
/********心理咨询-居民端-心理咨询-问题列表*******/
export function getQuestionList(param) {
return fly.get('property/psychology/listQuestion', param)
}
/********心理咨询-提交心理咨询问题*******/
export function submitQuestion(param) {
return fly.post('property/psychology/submitQuestion', param)
}
/********心理咨询-心理咨询师详细信息*******/
export function getConsultantDetail(id) {
return fly.get('property/psychology/psychologistInfo', {
"psychologistId": id
}) })
} }
/********物业-打分*******/ /********心理咨询-居民端-心理咨询-我的问题列表*******/
function submitScore(param){ export function getMyQuestion(param) {
return fly.get('property/projectScore',param) return fly.get('property/psychology/listUserQuestion', param)
} }
export function getStartupPageV2() {
return fly.get('startup/v2/getStartupPage')
}
/********心理咨询-心理咨询师列表*******/
export function getConsultantList(allFlag) {
return fly.get('property/psychology/listPsychiatrist',{
'allFlag':allFlag
})
}
/********心理咨询-居民端-心理咨询-问题列表*******/
export function getQuestionList(param) {
return fly.get('property/psychology/listQuestion',param)
}
/********心理咨询-提交心理咨询问题*******/
export function submitQuestion(param) {
return fly.post('property/psychology/submitQuestion',param)
}
/********心理咨询-心理咨询师详细信息*******/
export function getConsultantDetail(id) {
return fly.get('property/psychology/psychologistInfo',{
"psychologistId":id
})
}
/********心理咨询-居民端-心理咨询-我的问题列表*******/
export function getMyQuestion(param) {
return fly.get('property/psychology/listUserQuestion',param)
}

48
epdc-resident-mp-yushan/utils/home.js

@ -6,54 +6,84 @@ module.exports = {
browseNotice: browseNotice, browseNotice: browseNotice,
browseNews: browseNews, browseNews: browseNews,
newsPosition: newsPosition, newsPosition: newsPosition,
newsSupport:newsSupport, newsSupport: newsSupport,
newsOpposition:newsOpposition, newsOpposition: newsOpposition,
getInfoList: getInfoList, getInfoList: getInfoList,
infoDetail: infoDetail, infoDetail: infoDetail,
getConsultion: getConsultion, getConsultion: getConsultion,
browsePoints:browsePoints, browsePoints: browsePoints,
getResidentConfig:getResidentConfig getResidentConfig: getResidentConfig,
contentModuleList: contentModuleList,
contentList: contentList,
contentDetail: contentDetail
} }
function getNoticeList(param) { function getNoticeList(param) {
return fly.get('news/notice/list', param) return fly.get('news/notice/list', param)
} }
function getConsultion(param) { function getConsultion(param) {
return fly.get('custom/consult/listGridOperator', param) return fly.get('custom/consult/listGridOperator', param)
} }
function getInfoList(param) { function getInfoList(param) {
return fly.get('news/information/listByUserId', param) return fly.get('news/information/listByUserId', param)
} }
function getNoticeDetail(id) { function getNoticeDetail(id) {
return fly.get('news/notice/detail/'+id) return fly.get('news/notice/detail/' + id)
} }
function getNewsDetail(id) { function getNewsDetail(id) {
return fly.get(`news/news/detail/${id}`) return fly.get(`news/news/detail/${id}`)
} }
function browseNotice(param) { function browseNotice(param) {
return fly.post('news/notice/browse', param) return fly.post('news/notice/browse', param)
} }
function browseNews(param) { function browseNews(param) {
return fly.post('news/news/browse', param) return fly.post('news/news/browse', param)
} }
function newsPosition(param) { function newsPosition(param) {
return fly.post('news/news/statement', param) return fly.post('news/news/statement', param)
} }
// 新闻支持 v2 // 新闻支持 v2
function newsSupport (param) { function newsSupport(param) {
return fly.post("news/news/newsSupport", param) return fly.post("news/news/newsSupport", param)
} }
// 新闻反对 v2 // 新闻反对 v2
function newsOpposition (param) { function newsOpposition(param) {
return fly.post("news/news/newsOpposition", param) return fly.post("news/news/newsOpposition", param)
} }
function infoDetail(param) { function infoDetail(param) {
return fly.post('news/information/read', param) return fly.post('news/information/read', param)
} }
// 新闻浏览加积分 // 新闻浏览加积分
function browsePoints (param) { function browsePoints(param) {
return fly.post("news/news/browsePoints", param) return fly.post("news/news/browsePoints", param)
} }
// 获取居民端配置 // 获取居民端配置
function getResidentConfig () { function getResidentConfig() {
return fly.get("residentConfig/getResidentConfig") return fly.get("residentConfig/getResidentConfig")
} }
// 社区资讯-栏目列表
function contentModuleList() {
return fly.get('news/contentModuleList')
}
// 社区资讯-资讯列表
function contentList(params) {
return fly.get('news/contentList', params)
}
// 社区资讯-资讯详情
function contentDetail(id) {
return fly.get(`/news/contentDetail/${id}`)
}
Loading…
Cancel
Save