Compare commits

...

34 Commits

Author SHA1 Message Date
zhaoyongnian d2d1a15eb3 优化 5 years ago
zhaoyongnian 0ec697a980 默认网格 5 years ago
zhaoyongnian fa16c75f91 优化 5 years ago
zhaoyongnian e2562394ac 增加头像 5 years ago
zhaoyongnian ed335e90d1 接口拆分 5 years ago
zhaoyongnian 0f3c11387e 接口拆分 5 years ago
zhaoyongnian cda81e6e97 回滚代码,只更改左邻右舍 5 years ago
zhaoyongnian b8253b039f 回滚代码,只更改左邻右舍 5 years ago
zhaoyongnian 5329fc03ff 背景色优化 5 years ago
zhaoyongnian 95c7dde697 优化 5 years ago
zhaoyongnian 334c52a446 注释接口getIndexSudokuState 5 years ago
zhaoyongnian 7b20a38c17 设置背景色 5 years ago
zhaoyongnian 8006445999 配置接口获取详情id 5 years ago
zhaoyongnian 8dc5745261 积分相关 5 years ago
zhaoyongnian b8c1875837 优化 5 years ago
zhaoyongnian 88d7a8263c 优化 5 years ago
zhaoyongnian 680e42d340 消息改通知 5 years ago
zhaoyongnian d59012e691 消息改通知 5 years ago
zhaoyongnian a47b30494c 回滚代码 5 years ago
zhaoyongnian b1d8b40bbe 拆分接口 5 years ago
zhaoyongnian c96c0fd0f8 优化 5 years ago
zhaoyongnian 9455c60ef8 优化 5 years ago
zhaoyongnian 908dc93599 积分相关 5 years ago
zhaoyongnian 186a209be1 积分相关 5 years ago
zhaoyongnian 2a43758b9b 积分埋点拆分接口 5 years ago
zhaoyongnian 7eca3b3b35 我的添加积分入口 5 years ago
zhaoyongnian 3650c29599 首页改版 5 years ago
zhaoyongnian bb3b221308 党员居民认证接口拆分 5 years ago
zhaoyongnian 44c055f3ac 积分埋点拆分 5 years ago
zhaoyongnian 50c33fefe3 积分优化 5 years ago
zhaoyongnian b2e282ed4d 积分 5 years ago
zhaoyongnian 6366f8ee18 积分 5 years ago
zhaoyongnian 0e4efaa44d 积分相关 5 years ago
zhaoyongnian e72277bbf5 积分相关 5 years ago
  1. 9
      epdc-resident-mp-yushan/app.json
  2. 9
      epdc-resident-mp-yushan/components/nodata/nodata.js
  3. 4
      epdc-resident-mp-yushan/components/nodata/nodata.json
  4. 5
      epdc-resident-mp-yushan/components/nodata/nodata.wxml
  5. 19
      epdc-resident-mp-yushan/components/nodata/nodata.wxss
  6. BIN
      epdc-resident-mp-yushan/images/home/info-notice.png
  7. BIN
      epdc-resident-mp-yushan/images/home/integral.png
  8. BIN
      epdc-resident-mp-yushan/images/home/no-notice.png
  9. BIN
      epdc-resident-mp-yushan/images/home/yes-notice.png
  10. 174
      epdc-resident-mp-yushan/pages/complete/components/personalInfo/personalInfo.js
  11. 1
      epdc-resident-mp-yushan/pages/discussion/discussion.wxss
  12. 2
      epdc-resident-mp-yushan/pages/index/components/notice/notice.js
  13. 6
      epdc-resident-mp-yushan/pages/index/components/notice/notice.wxml
  14. 4
      epdc-resident-mp-yushan/pages/index/components/notice/notice.wxss
  15. 6
      epdc-resident-mp-yushan/pages/index/components/sudoku/sudoku.js
  16. 6
      epdc-resident-mp-yushan/pages/index/components/sudoku/sudoku.wxml
  17. 103
      epdc-resident-mp-yushan/pages/index/index.js
  18. 13
      epdc-resident-mp-yushan/pages/index/index.wxml
  19. 14
      epdc-resident-mp-yushan/pages/index/index.wxss
  20. 14
      epdc-resident-mp-yushan/pages/mine/mine.js
  21. 8
      epdc-resident-mp-yushan/pages/mine/mine.wxml
  22. 12
      epdc-resident-mp-yushan/pages/mine/mine.wxss
  23. 6
      epdc-resident-mp-yushan/pages/toRegister/toRegister.js
  24. 53
      epdc-resident-mp-yushan/subpages/association/pages/replyOrRemark/replyOrRemark.js
  25. 64
      epdc-resident-mp-yushan/subpages/association/pages/topicDetail/topicDetail.js
  26. 42
      epdc-resident-mp-yushan/subpages/association/utils/api.js
  27. 104
      epdc-resident-mp-yushan/subpages/discussion/pages/discussionDetail/discussionDetail.js
  28. 250
      epdc-resident-mp-yushan/subpages/discussion/pages/remarkOrReply/remarkOrReply.js
  29. 147
      epdc-resident-mp-yushan/subpages/discussion/utils/api.js
  30. 85
      epdc-resident-mp-yushan/subpages/home/pages/newsDetail/newsDetail.js
  31. 3
      epdc-resident-mp-yushan/subpages/home/pages/newsDetail/newsDetail.wxss
  32. BIN
      epdc-resident-mp-yushan/subpages/integralCentre/images/background-img.png
  33. BIN
      epdc-resident-mp-yushan/subpages/integralCentre/images/exchange.png
  34. BIN
      epdc-resident-mp-yushan/subpages/integralCentre/images/ic_yueduliang.png
  35. BIN
      epdc-resident-mp-yushan/subpages/integralCentre/images/note.png
  36. BIN
      epdc-resident-mp-yushan/subpages/integralCentre/images/record.png
  37. BIN
      epdc-resident-mp-yushan/subpages/integralCentre/images/t-dj-no.png
  38. BIN
      epdc-resident-mp-yushan/subpages/integralCentre/images/t-dj-yes.png
  39. BIN
      epdc-resident-mp-yushan/subpages/integralCentre/images/t-jd-no.png
  40. BIN
      epdc-resident-mp-yushan/subpages/integralCentre/images/t-jd-yes.png
  41. BIN
      epdc-resident-mp-yushan/subpages/integralCentre/images/t-wg-no.png
  42. BIN
      epdc-resident-mp-yushan/subpages/integralCentre/images/t-wg-yes.png
  43. BIN
      epdc-resident-mp-yushan/subpages/integralCentre/images/timg.png
  44. 237
      epdc-resident-mp-yushan/subpages/integralCentre/pages/index/index.js
  45. 9
      epdc-resident-mp-yushan/subpages/integralCentre/pages/index/index.json
  46. 60
      epdc-resident-mp-yushan/subpages/integralCentre/pages/index/index.wxml
  47. 213
      epdc-resident-mp-yushan/subpages/integralCentre/pages/index/index.wxss
  48. 97
      epdc-resident-mp-yushan/subpages/integralCentre/pages/noticeDetail/noticeDetail.js
  49. 6
      epdc-resident-mp-yushan/subpages/integralCentre/pages/noticeDetail/noticeDetail.json
  50. 27
      epdc-resident-mp-yushan/subpages/integralCentre/pages/noticeDetail/noticeDetail.wxml
  51. 256
      epdc-resident-mp-yushan/subpages/integralCentre/pages/noticeDetail/noticeDetail.wxss
  52. 124
      epdc-resident-mp-yushan/subpages/integralCentre/pages/record/record.js
  53. 9
      epdc-resident-mp-yushan/subpages/integralCentre/pages/record/record.json
  54. 21
      epdc-resident-mp-yushan/subpages/integralCentre/pages/record/record.wxml
  55. 82
      epdc-resident-mp-yushan/subpages/integralCentre/pages/record/record.wxss
  56. 10
      epdc-resident-mp-yushan/subpages/safety/components/sudoku/sudoku.wxss
  57. 10
      epdc-resident-mp-yushan/utils/api.js
  58. 22
      epdc-resident-mp-yushan/utils/home.js
  59. 71
      epdc-resident-mp-yushan/utils/integralCentre.js

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

@ -93,6 +93,15 @@
"pages/gridManage/gridManage"
]
},
{
"root": "subpages/integralCentre",
"name": "integralCentre",
"pages": [
"pages/index/index",
"pages/record/record",
"pages/noticeDetail/noticeDetail"
]
},
{
"root": "subpages/property",
"name": "property",

9
epdc-resident-mp-yushan/components/nodata/nodata.js

@ -0,0 +1,9 @@
Component({
properties: {
isShow: {
type: Boolean
}
},
data: {},
methods: {}
});

4
epdc-resident-mp-yushan/components/nodata/nodata.json

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

5
epdc-resident-mp-yushan/components/nodata/nodata.wxml

@ -0,0 +1,5 @@
<!--components/nodata/nodata.wxml-->
<view class="box" wx:if="{{isShow}}">
<image src="https://epdc-kongcun.elinkit.com.cn/epdcFile/M00/00/07/rBAB71646bOAXiYnAAB-svV4uWY962.png" class="image"/>
<text class="text">暂无数据~</text>
</view>

19
epdc-resident-mp-yushan/components/nodata/nodata.wxss

@ -0,0 +1,19 @@
/* components/nodata/nodata.wxss */
.box{
width: 100%;
height: auto;
box-sizing: border-box;
text-align: center;
margin-top: 100rpx;
}
.image{
width: 450rpx;
height: 240rpx;
}
.text{
width: 100%;
height: auto;
font-size: 28rpx;
color: #BCBCBC;
display: block;
}

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

174
epdc-resident-mp-yushan/pages/complete/components/personalInfo/personalInfo.js

@ -307,7 +307,7 @@ Component({
wx.showLoading({
title: '提交中...'
})
api.completeInfo(para).then(res => {
api.completeResidentInfoV2(para).then(res => {
wx.hideLoading()
if (res.data.resultCode == 1) {
wx.showModal({
@ -342,36 +342,67 @@ Component({
})
} else {
wx.showLoading({
title: '提交中...'
title: "提交中..."
})
api.completeInfoV2(para).then(res => {
wx.hideLoading()
if (res.data.resultCode == 1) {
wx.showModal({
title: '认证信息提交成功',
showCancel: false,
content: res.data.resultMsg,
success: res => {
wx.reLaunch({
url: '/pages/index/index'
})
}
})
} else {
wx.showToast({
title: '认证成功',
icon: 'none',
duration: 2000,
complete: () => {
setTimeout(() => {
if (this.data.type === "partyMember") {
api.completePartyInfoV2(para).then(res => {
wx.hideLoading()
if (res.data.resultCode == 1) {
wx.showModal({
title: "认证信息提交成功",
showCancel: false,
content: res.data.resultMsg,
success: () => {
wx.reLaunch({
url: '/pages/index/index'
url: "/pages/indexNew/indexNew"
})
}, 2000)
}
})
}
})
}
})
} else {
wx.showToast({
title: "认证成功",
icon: "none",
duration: 2000,
complete: () => {
setTimeout(() => {
wx.reLaunch({
url: "/pages/indexNew/indexNew"
})
}, 2000)
}
})
}
})
} else if (this.data.type === "resident") {
api.completeResidentInfoV2(para).then(res => {
wx.hideLoading()
if (res.data.resultCode == 1) {
wx.showModal({
title: "认证信息提交成功",
showCancel: false,
content: res.data.resultMsg,
success: () => {
wx.reLaunch({
url: "/pages/indexNew/indexNew"
})
}
})
} else {
wx.showToast({
title: "认证成功",
icon: "none",
duration: 2000,
complete: () => {
setTimeout(() => {
wx.reLaunch({
url: "/pages/indexNew/indexNew"
})
}, 2000)
}
})
}
})
}
}
},
// 提交完善信息,手机号输入方式
@ -429,7 +460,7 @@ Component({
wx.showLoading({
title: '提交中...'
})
api.completeInfo(para).then(res => {
api.completeResidentInfo(para).then(res => {
wx.hideLoading()
if (res.data.resultCode == 1) {
wx.showModal({
@ -464,36 +495,67 @@ Component({
})
} else {
wx.showLoading({
title: '提交中...'
title: "提交中..."
})
api.completeInfo(para).then(res => {
wx.hideLoading()
if (res.data.resultCode == 1) {
wx.showModal({
title: '认证信息提交成功',
showCancel: false,
content: res.data.resultMsg,
success: res => {
wx.reLaunch({
url: '/pages/index/index'
})
}
})
} else {
wx.showToast({
title: '认证成功',
icon: 'none',
duration: 2000,
complete: () => {
setTimeout(() => {
if (this.data.type === "partyMember") {
api.completePartyInfo(para).then(res => {
wx.hideLoading()
if (res.data.resultCode == 1) {
wx.showModal({
title: "认证信息提交成功",
showCancel: false,
content: res.data.resultMsg,
success: () => {
wx.reLaunch({
url: '/pages/index/index'
url: "/pages/indexNew/indexNew"
})
}, 2000)
}
})
}
})
}
})
} else {
wx.showToast({
title: "认证成功",
icon: "none",
duration: 2000,
complete: () => {
setTimeout(() => {
wx.reLaunch({
url: "/pages/indexNew/indexNew"
})
}, 2000)
}
})
}
})
} else if (this.data.type === "resident") {
api.completeResidentInfo(para).then(res => {
wx.hideLoading()
if (res.data.resultCode == 1) {
wx.showModal({
title: "认证信息提交成功",
showCancel: false,
content: res.data.resultMsg,
success: () => {
wx.reLaunch({
url: "/pages/indexNew/indexNew"
})
}
})
} else {
wx.showToast({
title: "认证成功",
icon: "none",
duration: 2000,
complete: () => {
setTimeout(() => {
wx.reLaunch({
url: "/pages/indexNew/indexNew"
})
}, 2000)
}
})
}
})
}
}
},
submitPersonalInfo () {

1
epdc-resident-mp-yushan/pages/discussion/discussion.wxss

@ -1,6 +1,7 @@
page {
width:100%;
height:100vh;
background: #f7f7f7;
}
.discussion {
width: 100%;

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

@ -1,6 +1,6 @@
Component({
properties: {
infoList: {
noticeList: {
type: Array,
value: []
},

6
epdc-resident-mp-yushan/pages/index/components/notice/notice.wxml

@ -1,14 +1,14 @@
<view class="notice" bindtap="navigateToInfoList">
<view class="border-content">
<image class="notice-logo" src="../../../../images/home/notice-logo.png" />
<image class="info-note" src="../../../../images/home/info-note.png" />
<image class="info-note" src="../../../../images/home/info-notice.png" />
<swiper circular="{{true}}" autoplay="{{true}}" interval="{{3000}}" vertical="{{true}}">
<swiper-item
wx:for="{{infoList}}"
wx:for="{{noticeList}}"
wx:for-index="index"
wx:for-item="item"
wx:key="index">
<view class="content">{{item.title}}</view>
<view class="content">{{item.noticeTitle}}</view>
</swiper-item>
</swiper>
<!-- <view class="num">{{unreadnum}}</view> -->

4
epdc-resident-mp-yushan/pages/index/components/notice/notice.wxss

@ -20,8 +20,8 @@
margin-left: -80rpx;
}
.notice .info-note {
width: 58rpx;
height: 30rpx;
width: 90rpx;
height: 23rpx;
margin: 5rpx 20rpx 0 10rpx;
}
.notice swiper {

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

@ -34,9 +34,9 @@ Component({
navigateToSafe () {
this.triggerEvent('navigateToSafe')
},
// 跳转到政策法规
navigateToPolicy () {
this.triggerEvent('navigateToPolicy')
// 跳转到积分排行
navigateToIntegral () {
this.triggerEvent('navigateToIntegral')
},
// 跳转到综合服务
navigateToSyntheticalService () {

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

@ -16,9 +16,9 @@
<image src="../../../../images/home/heart.png" />
<view class="name">互帮互助</view>
</view>
<view class="item" hover-stay-time="150" bindtap="navigateToPolicy">
<image src="../../../../images/home/policy.png" />
<view class="name">通知公告</view>
<view class="item" hover-stay-time="150" bindtap="navigateToIntegral">
<image src="../../../../images/home/integral.png" />
<view class="name">积分排行</view>
</view>
<view class="item" hover-stay-time="150" bindtap="navigateToSafe">
<image src="../../../../images/home/safe.png" />

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

@ -12,6 +12,7 @@ Page({
newsList: [], // 新闻列表
projectList: [], // 项目列表
infoList: [], // 消息列表
noticeList: [], // 通知公告列表
unReadNum: 0, // 未读数量
loadMoreType: 'none',
loadMoreVisible: false,
@ -47,6 +48,7 @@ Page({
this.getUserState()
},
onShow () {
this.getUnreadNum() // 实时获取有无未读消息
// 检查版本更新
checkoutVersion()
},
@ -188,37 +190,52 @@ Page({
console.log('获取消息列表失败')
})
},
// 九宫格检查状态
getIndexSudokuState () {
api.getIndexSudokuState().then(res => {
console.log('九宫格状态', res)
let consultAvailable = '0'
let appraiseAvailable = '0'
if (res.data.length > 0) {
res.data.forEach(item => {
if (item.name === '咨询' && item.availableFlag === '1') {
consultAvailable = '1'
} else if (item.name === '干部评价' && item.availableFlag === '1') {
appraiseAvailable = '1'
}
})
}
this.setData({
sudokuState: {
consultAvailable,
appraiseAvailable
}
})
}).catch(() => {
console.log('获取九宫格状态失败')
// 获取通知公告列表
getNoticeList () {
let para = {
pageIndex: 1,
pageSize: 10,
timestamp: this.data.timestamp
}
homeApi.getNoticeList(para).then(res => {
this.setData({
sudokuState: {
consultAvailable: '0',
appraiseAvailable: '0'
}
noticeList: res.data
})
}).catch(err => {
console.log(err)
})
},
// 九宫格检查状态
// getIndexSudokuState () {
// api.getIndexSudokuState().then(res => {
// console.log('九宫格状态', res)
// let consultAvailable = '0'
// let appraiseAvailable = '0'
// if (res.data.length > 0) {
// res.data.forEach(item => {
// if (item.name === '咨询' && item.availableFlag === '1') {
// consultAvailable = '1'
// } else if (item.name === '干部评价' && item.availableFlag === '1') {
// appraiseAvailable = '1'
// }
// })
// }
// this.setData({
// sudokuState: {
// consultAvailable,
// appraiseAvailable
// }
// })
// }).catch(() => {
// console.log('获取九宫格状态失败')
// this.setData({
// sudokuState: {
// consultAvailable: '0',
// appraiseAvailable: '0'
// }
// })
// })
// },
// 跳转到互帮互助
navigateToHeart () {
if (app.globalData.infoCompleted == 0) {
@ -277,9 +294,10 @@ Page({
loadMoreVisible: false
})
this.getBannerList()
this.getIndexSudokuState()
// this.getIndexSudokuState()
this.getProjectList()
this.getInfoList()
this.getNoticeList()
this.getUnreadNum()
this.getNewsList()
},
@ -297,10 +315,24 @@ Page({
url: `/subpages/discussion/pages/discussionDetail/discussionDetail?type=project&detailId=${e.detail.itemId}&showClassify=show`
})
},
// 跳转到消息列表
// 跳转到通知公告列表
navigateToInfoList () {
wx.navigateTo({
url: '/subpages/home/pages/notice/notice'
})
},
// 跳转到消息页面
navigateToNotice(){
wx.navigateTo({ url: '/subpages/home/pages/info/info' })
},
// 消息没有数据
noMore () {
wx.showToast({
title: "暂无更多消息~",
icon: "none",
duration: 1000
})
},
// 跳转到banner详情
navigatetoBannerDetail (e) {
const { id, url, newsFlag } = e.detail
@ -314,10 +346,15 @@ Page({
})
}
},
//政策法规
navigateToPolicy(){
wx.navigateTo({
url: '/subpages/home/pages/notice/notice'
//积分排行
navigateToIntegral(){
api.getUserInfo().then(res => {
// console.log('用户信息', res)
wx.navigateTo({
url: "/subpages/integralCentre/pages/index/index?points=" + res.data.points
})
}).catch(err => {
console.log(err)
})
},
//社区教育

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

@ -13,6 +13,12 @@
<view class="grid-name">{{departmentName}}</view>
<image class="more-grid" src="../../images/home/right-sword.png" />
</view>
<!-- 202.9.8 把原消息的入口放在这里了 -->
<view class="notice">
<image wx:if="{{infoList.length == 0}}" bindtap="noMore" src="../../images/home/no-notice.png"></image>
<image wx:elif="{{infoList.length > 0 && unReadNum == 0}}" bindtap="navigateToNotice" src="../../images/home/no-notice.png"></image>
<image wx:elif="{{infoList.length > 0 && unReadNum > 0}}" bindtap="navigateToNotice" src="../../images/home/yes-notice.png"></image>
</view>
</view>
<!-- banner列表 -->
@ -21,11 +27,10 @@
bannerList="{{bannerList}}">
</banner>
<!--消息列表-->
<!--通知公告列表 注 以前是消息列表,通知公告需求还没有定下来,数据获取的还是消息的列表数据-->
<notice
bind:navigateToInfoList="navigateToInfoList"
infoList="{{infoList}}"
unreadnum="{{unReadNum}}">
noticeList="{{noticeList}}">
</notice>
<!--sudoku九宫格-->
@ -37,7 +42,7 @@
bind:navigateToHeart="navigateToHeart"
bind:navigateToEducation="navigateToEducation"
bind:navigateToSafe="navigateToSafe"
bind:navigateToPolicy="navigateToPolicy"
bind:navigateToIntegral="navigateToIntegral"
bind:navigateToSynthetical="navigateToSynthetical">
</sudoku>

14
epdc-resident-mp-yushan/pages/index/index.wxss

@ -38,6 +38,9 @@ page {
width: 100%;
height: 100rpx;
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
}
.belong-grid .belong-grid-bg {
width: 100%;
@ -48,13 +51,22 @@ page {
z-index: 10;
}
.belong-grid .grid {
width: 100%;
width: calc(100% - 50rpx);
height: 100%;
position: relative;
z-index: 100;
display: flex;
align-items: center;
}
.belong-grid .notice {
width: 40rpx;
height: 40rpx;
margin-right: 10px;
}
.belong-grid .notice image{
width: 40rpx;
height: 40rpx;
}
.belong-grid .grid .party-logo {
width: 32rpx;
height: 32rpx;

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

@ -17,7 +17,9 @@ Page({
userInfo: {
faceImg: '',
nickname: '',
partyFlag: ''
partyFlag: '',
points: 0,
grade: 0
},
completeInfoDialogVisible: false,
infoCompleted: 0
@ -231,7 +233,8 @@ Page({
userInfo: {
faceImg: '',
nickname: '',
partyFlag: '0'
points: 0,
grade: 0
}
})
console.log(err)
@ -293,5 +296,12 @@ Page({
wx.navigateTo({
url: '/subpages/mine/pages/gridManage/gridManage'
})
},
//跳转到积分中心
navigateToIntegralCentre () {
this.getUserInfo();//防止积分变化
wx.navigateTo({
url: "/subpages/integralCentre/pages/index/index?points=" + this.data.userInfo.points
})
}
})

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

@ -25,6 +25,14 @@
</view>
</view>
</view>
<view class="bottom">
<text class="text1">等级:{{userInfo.grade}}</text>
<text class="text2" bindtap="navigateToIntegralCentre" data-points="{{userInfo.points}}">积分:{{userInfo.points}}</text>
<text class="text3"></text>
<!-- <text class="text3" bindtap="jqqd">积分兑换</text> -->
</view>
<!-- <view class="bottom">
<view class="operation" bindtap="navigateToInviteRecord">
<image src="../../images/mine/yaoqingjilu.png" />

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

@ -127,11 +127,21 @@ page {
margin-left: 9rpx;
}
.personal-info .box .content .bottom {
margin-top: 30rpx;
margin-top: 60rpx;
box-sizing: border-box;
width: 100%;
height: 30rpx;
display: flex;
align-items: center;
justify-content: space-around;
}
.personal-info .box .content .bottom text{
color: #fff;
font-size: 28rpx;
line-height: 30rpx;
flex: 1;
text-align: center;
}
.personal-info .box .content .bottom .operation {
flex: 1;
display: flex;

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

@ -21,7 +21,7 @@ Page({
}
})
let that = this
const versionNum = '1.2.3'
const versionNum = '1.2.4'
api.getScanSwitch(versionNum).then(function (res) {
console.log(res.data)
let state = res.data.scanFlag
@ -42,9 +42,9 @@ Page({
// })
},
experience() {
app.globalData.tempGridId = '1258691044142047233' // 1222032503139762178
app.globalData.tempGridId = '1261183379400663042' // 1222032503139762178
wx.reLaunch({
url: '/pages/index/index?scene=1258691044142047233'
url: '/pages/index/index?scene=1261183379400663042'
})
},
scan() {

53
epdc-resident-mp-yushan/subpages/association/pages/replyOrRemark/replyOrRemark.js

@ -1,4 +1,6 @@
import { remarkOrReply } from '../../utils/api'
import { // remarkOrReply,
topicCom,
topicReply } from '../../utils/api'
Page({
data: {
@ -44,17 +46,44 @@ Page({
wx.showLoading({
title: '加载中'
})
remarkOrReply(para).then(res => {
wx.hideLoading()
console.log('评论或者回复', res)
wx.showToast({
title: '评论成功',
icon: 'none',
duration: 2000
if (this.data.faCommentId.length > 0) { // 对评论进行回复
topicReply(para).then(res => {
wx.hideLoading()
console.log("回复", res)
wx.showToast({
title: "评论成功",
icon: "none",
duration: 2000
})
wx.navigateBack()
}).catch(err => {
console.log(err)
})
wx.navigateBack()
}).catch(err => {
console.log(err)
})
}else{
topicCom(para).then(res => {
wx.hideLoading()
console.log("评论", res)
wx.showToast({
title: "评论成功",
icon: "none",
duration: 2000
})
wx.navigateBack()
}).catch(err => {
console.log(err)
})
}
// remarkOrReply(para).then(res => {
// wx.hideLoading()
// console.log('评论或者回复', res)
// wx.showToast({
// title: '评论成功',
// icon: 'none',
// duration: 2000
// })
// wx.navigateBack()
// }).catch(err => {
// console.log(err)
// })
}
})

64
epdc-resident-mp-yushan/subpages/association/pages/topicDetail/topicDetail.js

@ -1,4 +1,4 @@
import { getTopicDetail, getRemarkList, closeTopic, publishStatement, getCloseReason } from '../../utils/api'
import { getTopicDetail, getRemarkList, closeTopic, publishStatement, getCloseReason, topicComLike, topicComUnlike } from '../../utils/api'
import { getTimestamp } from '../../utils/common'
const app = getApp()
@ -292,10 +292,10 @@ Page({
} catch (err) {
return false
}
publishStatement(para).then(res => {
topicComLike(para).then(res => {
this.getTopicAltitudeNum()
console.log('支持', res)
this.data.remarkList.forEach((item,index) => {
console.log("支持", res)
this.data.remarkList.forEach((item, index) => {
if (item.commentId === e.detail.commentId) {
this.setData({
[`remarkList[${index}].userLike`]: true,
@ -304,8 +304,8 @@ Page({
[`remarkList[${index}].opposeNum`]: parseInt(this.data.remarkList[index].opposeNum) > 0 ? parseInt(this.data.remarkList[index].opposeNum) - 1 : 0
})
wx.showToast({
title: '表态成功',
icon: 'none',
title: "表态成功",
icon: "none",
duration: 2000
})
}
@ -313,6 +313,27 @@ Page({
}).catch(err => {
console.log(err)
})
// publishStatement(para).then(res => {
// this.getTopicAltitudeNum()
// console.log('支持', res)
// this.data.remarkList.forEach((item,index) => {
// if (item.commentId === e.detail.commentId) {
// this.setData({
// [`remarkList[${index}].userLike`]: true,
// [`remarkList[${index}].userDislike`]: false,
// [`remarkList[${index}].approveNum`]: parseInt(this.data.remarkList[index].approveNum) + 1,
// [`remarkList[${index}].opposeNum`]: parseInt(this.data.remarkList[index].opposeNum) > 0 ? parseInt(this.data.remarkList[index].opposeNum) - 1 : 0
// })
// wx.showToast({
// title: '表态成功',
// icon: 'none',
// duration: 2000
// })
// }
// })
// }).catch(err => {
// console.log(err)
// })
},
// 反对某条评论 debounce 防抖
debiunceDispportReply (e) {
@ -362,20 +383,20 @@ Page({
} catch (err) {
return false
}
publishStatement(para).then(res => {
topicComUnlike(para).then(res => {
this.getTopicAltitudeNum()
console.log('反对', res)
console.log("反对", res)
this.data.remarkList.forEach((item, index) => {
if (item.commentId === e.detail.commentId) {
this.setData({
[`remarkList[${index}].userLike`]: false,
[`remarkList[${index}].userDislike`]: true,
[`remarkList[${index}].approveNum`]: parseInt(this.data.remarkList[index].approveNum) > 0 ? parseInt(this.data.remarkList[index].approveNum) - 1: 0,
[`remarkList[${index}].approveNum`]: parseInt(this.data.remarkList[index].approveNum) > 0 ? parseInt(this.data.remarkList[index].approveNum) - 1 : 0,
[`remarkList[${index}].opposeNum`]: parseInt(this.data.remarkList[index].opposeNum) + 1
})
wx.showToast({
title: '表态成功',
icon: 'none',
title: "表态成功",
icon: "none",
duration: 2000
})
}
@ -383,6 +404,27 @@ Page({
}).catch(err => {
console.log(err)
})
// publishStatement(para).then(res => {
// this.getTopicAltitudeNum()
// console.log('反对', res)
// this.data.remarkList.forEach((item, index) => {
// if (item.commentId === e.detail.commentId) {
// this.setData({
// [`remarkList[${index}].userLike`]: false,
// [`remarkList[${index}].userDislike`]: true,
// [`remarkList[${index}].approveNum`]: parseInt(this.data.remarkList[index].approveNum) > 0 ? parseInt(this.data.remarkList[index].approveNum) - 1: 0,
// [`remarkList[${index}].opposeNum`]: parseInt(this.data.remarkList[index].opposeNum) + 1
// })
// wx.showToast({
// title: '表态成功',
// icon: 'none',
// duration: 2000
// })
// }
// })
// }).catch(err => {
// console.log(err)
// })
},
// 对评论进行回复
replyRemark (e) {

42
epdc-resident-mp-yushan/subpages/association/utils/api.js

@ -184,6 +184,27 @@ export function remarkOrReply ({ topicId, faCommentId, content }) {
})
}
/**
* 话题评论 v2
*/
export function topicCom ({ topicId, faCommentId, content }) {
return request.post("group/comment/topicCom", {
topicId,
faCommentId,
content
})
}
/**
* 话题回复 v2
*/
export function topicReply ({ topicId, faCommentId, content }) {
return request.post("group/comment/topicReply", {
topicId,
faCommentId,
content
})
}
/**
* 关闭话题
*/
@ -223,6 +244,27 @@ export function publishStatement ({ attitude, commentId, topicId }) {
})
}
/**
* 话题评论点赞 v2
*/
export function topicComLike ({ attitude, commentId, topicId }) {
return request.post("group/comment/topicComLike", {
attitude,
commentId,
topicId
})
}
/**
* 话题评论点踩 v2
*/
export function topicComUnlike ({ attitude, commentId, topicId }) {
return request.post("group/comment/topicComUnlike", {
attitude,
commentId,
topicId
})
}
/**
* 生成网格小程序码
*/

104
epdc-resident-mp-yushan/subpages/discussion/pages/discussionDetail/discussionDetail.js

@ -2,8 +2,16 @@ import {
getIssueDetail,
getIssueTypeStatistics,
getRemarkList,
showRemarkStatement,
showIssueStatement,
// showRemarkStatement,
issueComLike,
issueComUnlike,
itemComLike,
itemComUnlike,
// showIssueStatement,
issueSupport,
issueOpposition,
itemSupport,
itemOpposition,
getProjectDetail,
getProjectTypeStatistics,
getIssueHandleProgressV2,
@ -354,11 +362,24 @@ Page({
issueId: this.data.detailType === 'issue' ? this.data.issueId : '',
itemId: this.data.detailType === 'project' ? this.data.projectId : ''
}
showRemarkStatement(para).then(res => {
console.log('评论支持', res)
}).catch(err => {
console.log(err)
})
if (this.data.detailType == "issue") { //议题
issueComLike(para).then(res => {
console.log("评论支持", res)
}).catch(err => {
console.log(err)
})
} else {
itemComLike(para).then(res => {
console.log("评论支持", res)
}).catch(err => {
console.log(err)
})
}
// showRemarkStatement(para).then(res => {
// console.log('评论支持', res)
// }).catch(err => {
// console.log(err)
// })
},
debounceDispportRemark (e) {
clearTimeout(this.data.dispportTimer)
@ -397,11 +418,24 @@ Page({
issueId: this.data.detailType === 'issue' ? this.data.issueId : '',
itemId: this.data.detailType === 'project' ? this.data.projectId : ''
}
showRemarkStatement(para).then(res => {
console.log('评论不支持', res)
}).catch(err => {
console.log(err)
})
if (this.data.detailType == "issue") { //议题
issueComUnlike(para).then(res => {
console.log("评论不支持", res)
}).catch(err => {
console.log(err)
})
} else {
itemComUnlike(para).then(res => {
console.log("评论不支持", res)
}).catch(err => {
console.log(err)
})
}
// showRemarkStatement(para).then(res => {
// console.log('评论不支持', res)
// }).catch(err => {
// console.log(err)
// })
},
// 对 议题/项目 进行评论
navigateToReply () {
@ -459,11 +493,24 @@ Page({
issueId: this.data.detailType === 'issue' ? this.data.issueId : '',
itemId: this.data.detailType === 'project' ? this.data.projectId : ''
}
showIssueStatement(para).then(res => {
console.log('点赞议题或项目', res)
}).catch(err => {
console.log(err)
})
// showIssueStatement(para).then(res => {
// console.log('点赞议题或项目', res)
// }).catch(err => {
// console.log(err)
// })
if (this.data.detailType == "issue") { //议题
issueSupport(para).then(res => { //v2新接口 2020.5.8
console.log("点赞议题", res)
}).catch(err => {
console.log(err)
})
} else { //项目 itemSupport,
itemSupport(para).then(res => { //v2新接口 2020.5.8
console.log("点赞项目", res)
}).catch(err => {
console.log(err)
})
}
},
debounceDispportIssueOrProject () {
clearTimeout(this.data.dispportTimer)
@ -497,11 +544,24 @@ Page({
issueId: this.data.detailType === 'issue' ? this.data.issueId : '',
itemId: this.data.detailType === 'project' ? this.data.projectId : ''
}
showIssueStatement(para).then(res => {
console.log('点踩议题或项目', res)
}).catch(err => {
console.log(err)
})
// showIssueStatement(para).then(res => {
// console.log('点踩议题或项目', res)
// }).catch(err => {
// console.log(err)
// })
if (this.data.detailType == "issue") { //议题
issueOpposition(para).then(res => { //v2新接口 2020.5.8
console.log("点踩议题", res)
}).catch(err => {
console.log(err)
})
} else {
itemOpposition(para).then(res => { //v2新接口 2020.5.8
console.log("点踩项目", res)
}).catch(err => {
console.log(err)
})
}
},
// 跳转到 分类列表
navigateToCategoryList () {

250
epdc-resident-mp-yushan/subpages/discussion/pages/remarkOrReply/remarkOrReply.js

@ -1,4 +1,7 @@
import { remarkOrReply } from '../../utils/api'
import {
// remarkOrReply,
issueCom, issueComReply, itemCom, itemComReply
} from "../../utils/api"
Page({
data: {
@ -49,24 +52,233 @@ Page({
wx.showLoading({
title: '加载中...'
})
remarkOrReply(para).then(res => {
wx.hideLoading()
console.log('评论或回复', res)
wx.showToast({
title: '评论成功',
icon: 'none',
duration: 1000
})
const pages = getCurrentPages()
const page = pages[pages.length - 2]
if (page.getRemarkList) {
page.getRemarkList()
if (this.data.faCommentId) { //评论 回复 回调
if (this.data.detailType === "issue") { //议题
issueComReply(para).then(res => {
wx.hideLoading()
console.log("评论或回复", res)
if (res.code == 0) {
wx.showToast({
title: "评论成功",
icon: "none",
duration: 1000
})
const pages = getCurrentPages()
const page = pages[pages.length - 2]
if (page.getRemarkList) {
page.getRemarkList()
}
setTimeout(() => {
wx.navigateBack()
}, 500)
} else if (res.code == 533) {
this.data.violationsCount++
if (this.data.violationsCount == 1){
wx.showToast({
title: res.msg,
icon: "none",
duration: 2000
})
} else if (this.data.violationsCount == 2) {
wx.showModal({
title: '提示',
content: '您提交的内容再次被判定为违规,您确定是否要提交?',
success (res) {
if (res.confirm) {
console.log('用户点击确定')
that.setData({
isConReview: true
})
that.remarkOrReply()
} else if (res.cancel) {
console.log('用户点击取消')
that.setData({
violationsCount: 0,
isConReview: false
})
}
}
})
}
}
}).catch(err => {
console.log(err)
})
} else { //项目
itemComReply(para).then(res => {
wx.hideLoading()
console.log("评论或回复", res)
if (res.code == 0) {
wx.showToast({
title: "评论成功",
icon: "none",
duration: 1000
})
const pages = getCurrentPages()
const page = pages[pages.length - 2]
if (page.getRemarkList) {
page.getRemarkList()
}
setTimeout(() => {
wx.navigateBack()
}, 500)
} else if (res.code == 533) {
this.data.violationsCount++
if (this.data.violationsCount == 1){
wx.showToast({
title: res.msg,
icon: "none",
duration: 2000
})
} else if (this.data.violationsCount == 2) {
wx.showModal({
title: '提示',
content: '您提交的内容再次被判定为违规,您确定是否要提交?',
success (res) {
if (res.confirm) {
console.log('用户点击确定')
that.setData({
isConReview: true
})
that.remarkOrReply()
} else if (res.cancel) {
console.log('用户点击取消')
that.setData({
violationsCount: 0,
isConReview: false
})
}
}
})
}
}
}).catch(err => {
console.log(err)
})
}
setTimeout(() => {
wx.navigateBack()
}, 500)
}).catch(err => {
console.log(err)
})
} else { //对 议题/项目 进行评论
if (this.data.detailType === "issue") { //议题
issueCom(para).then(res => {
wx.hideLoading()
console.log("评论或回复", res)
if (res.code == 0) {
wx.showToast({
title: "评论成功",
icon: "none",
duration: 1000
})
const pages = getCurrentPages()
const page = pages[pages.length - 2]
if (page.getRemarkList) {
page.getRemarkList()
}
setTimeout(() => {
wx.navigateBack()
}, 500)
} else if (res.code == 533) {
this.data.violationsCount++
if (this.data.violationsCount == 1){
wx.showToast({
title: res.msg,
icon: "none",
duration: 2000
})
} else if (this.data.violationsCount == 2) {
wx.showModal({
title: '提示',
content: '您提交的内容再次被判定为违规,您确定是否要提交?',
success (res) {
if (res.confirm) {
console.log('用户点击确定')
that.setData({
isConReview: true
})
that.remarkOrReply()
} else if (res.cancel) {
console.log('用户点击取消')
that.setData({
violationsCount: 0,
isConReview: false
})
}
}
})
}
}
}).catch(err => {
console.log(err)
})
} else { //项目
itemCom(para).then(res => {
wx.hideLoading()
console.log("评论或回复", res)
if (res.code == 0) {
wx.showToast({
title: "评论成功",
icon: "none",
duration: 1000
})
const pages = getCurrentPages()
const page = pages[pages.length - 2]
if (page.getRemarkList) {
page.getRemarkList()
}
setTimeout(() => {
wx.navigateBack()
}, 500)
} else if (res.code == 533) {
this.data.violationsCount++
if (this.data.violationsCount == 1){
wx.showToast({
title: res.msg,
icon: "none",
duration: 2000
})
} else if (this.data.violationsCount == 2) {
wx.showModal({
title: '提示',
content: '您提交的内容再次被判定为违规,您确定是否要提交?',
success (res) {
if (res.confirm) {
console.log('用户点击确定')
that.setData({
isConReview: true
})
that.remarkOrReply()
} else if (res.cancel) {
console.log('用户点击取消')
that.setData({
violationsCount: 0,
isConReview: false
})
}
}
})
}
}
}).catch(err => {
console.log(err)
})
}
}
// remarkOrReply(para).then(res => {
// wx.hideLoading()
// console.log('评论或回复', res)
// wx.showToast({
// title: '评论成功',
// icon: 'none',
// duration: 1000
// })
// const pages = getCurrentPages()
// const page = pages[pages.length - 2]
// if (page.getRemarkList) {
// page.getRemarkList()
// }
// setTimeout(() => {
// wx.navigateBack()
// }, 500)
// }).catch(err => {
// console.log(err)
// })
}
})

147
epdc-resident-mp-yushan/subpages/discussion/utils/api.js

@ -81,6 +81,59 @@ export function remarkOrReply ({ issueId, faCommentId, content, itemId }) {
})
}
/**
* 议题评论 v2
*/
export function issueCom ({ issueId, faCommentId, content, itemId, isConReview }) {
return request.post("events/comment/issueCom", {
issueId,
faCommentId,
content,
itemId,
isConReview
})
}
/**
* 议题评论的回复 v2
*/
export function issueComReply ({ issueId, faCommentId, content, itemId, isConReview }) {
return request.post("events/comment/issueComReply", {
issueId,
faCommentId,
content,
itemId,
isConReview
})
}
/**
* 项目评论 v2
*/
export function itemCom ({ issueId, faCommentId, content, itemId, isConReview }) {
return request.post("events/comment/itemCom", {
issueId,
faCommentId,
content,
itemId,
isConReview
})
}
/**
* 项目评论的回复 v2
*/
export function itemComReply ({ issueId, faCommentId, content, itemId, isConReview }) {
return request.post("events/comment/itemComReply", {
issueId,
faCommentId,
content,
itemId,
isConReview
})
}
/**
* 表态 评论 支持/不支持
*/
@ -92,6 +145,53 @@ export function showRemarkStatement ({ attitude, commentId, issueId, itemId }) {
itemId
})
}
/**
* 议题评论点赞 v2
*/
export function issueComLike ({ attitude, commentId, issueId, itemId }) {
return request.post("events/comment/issueComLike", {
attitude,
commentId,
issueId,
itemId
})
}
/**
* 议题评论点踩 v2
*/
export function issueComUnlike ({ attitude, commentId, issueId, itemId }) {
return request.post("events/comment/issueComUnlike", {
attitude,
commentId,
issueId,
itemId
})
}
/**
* 项目评论点赞 v2
*/
export function itemComLike ({ attitude, commentId, issueId, itemId }) {
return request.post("events/comment/itemComLike", {
attitude,
commentId,
issueId,
itemId
})
}
/**
* 项目评论点踩 v2
*/
export function itemComUnlike ({ attitude, commentId, issueId, itemId }) {
return request.post("events/comment/itemComUnlike", {
attitude,
commentId,
issueId,
itemId
})
}
/**
* 表态议题 支持/不支持
@ -104,6 +204,53 @@ export function showIssueStatement ({ attitude, issueId, itemId }) {
})
}
/**
* 表态议题 v2接口 议题反对
*/
export function issueOpposition ({ attitude, issueId, itemId }) {
return request.post("events/issue/issueOpposition", {
attitude,
issueId,
itemId
})
}
/**
* 表态议题 v2接口 议题支持
*/
export function issueSupport ({ attitude, issueId, itemId }) {
return request.post("events/issue/issueSupport", {
attitude,
issueId,
itemId
})
}
/**
* 项目支持 v2接口
*/
export function itemSupport ({ attitude, issueId, itemId }) {
return request.post("events/issue/itemSupport", {
attitude,
issueId,
itemId
})
}
/**
* 项目反对 v2接口
*/
export function itemOpposition ({ attitude, issueId, itemId }) {
return request.post("events/issue/itemOpposition", {
attitude,
issueId,
itemId
})
}
/**
* 获取 议题列表
*/

85
epdc-resident-mp-yushan/subpages/home/pages/newsDetail/newsDetail.js

@ -9,7 +9,8 @@ Page({
dispportStatus: 'dispport',
noticeObj: {},
infoCompleted: 0,
noticeObjContent: ''
noticeObjContent: '',
residentValue:0 //配置时间
},
onLoad (options) {
this.setData({
@ -18,6 +19,8 @@ Page({
})
this.getNewsDetail(options.id)
this.browseNews(options.id)
// 获取默认配置
this.getResidentConfig()
},
getNewsDetail (id) {
let that = this
@ -128,13 +131,85 @@ Page({
newsId: this.data.detailId,
attitude: attitudeState
}
if (attitudeState == 0) { //表态 0赞;1踩;2取消赞;3取消踩
api.newsSupport(para).then(() => {
}).catch(err => {
console.log(err)
})
} else if (attitudeState == 1) {
api.newsOpposition(para).then(() => {
}).catch(err => {
console.log(err)
})
} else {
// const res = await newsPosition(para)
// console.log('新闻表态', res)
api.newsPosition(para).then(() => {
}).catch(err => {
console.log(err)
})
}
// const res = await newsPosition(para)
// console.log('新闻表态', res)
api.newsPosition(para).then(res => {
// api.newsPosition(para).then(res => {
}).catch(err => {
console.log(err)
})
// }).catch(err => {
// console.log(err)
// })
}
},
// 获取默认配置, 阅读时间, 获取默认网格
getResidentConfig (){
let that = this
api.getResidentConfig().then(res => {
if (res.code === 0 && res.msg === "success") {
res.data.forEach(item => {
if (item.residentType === "poins_config") {
that.setData({
residentValue:parseInt(item.residentValue)
})
}
})
that.countDown()
}
}).catch(err => {
console.log(err)
})
},
// 倒计时
countDown () {
this.data.timer = setInterval(() => {
console.log("加积分倒计时"+this.data.residentValue)
if (this.data.residentValue > 1) {
this.data.residentValue--
this.setData({
residentValue: this.data.residentValue
})
} else {
this.browsePoints()
clearInterval(this.data.timer)
}
}, 1000)
},
// 加积分
browsePoints () {
let that = this
const para = {
newsId: that.data.detailId
}
api.browsePoints(para).then(res => {
console.log("加积分成功",res)
}).catch(err => {
console.log(err)
})
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
clearInterval(this.data.timer)
}
})

3
epdc-resident-mp-yushan/subpages/home/pages/newsDetail/newsDetail.wxss

@ -1,3 +1,6 @@
page{
background: #f7f7f7;
}
.notice-detail {
width: 100%;
height: 100%;

BIN
epdc-resident-mp-yushan/subpages/integralCentre/images/background-img.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

BIN
epdc-resident-mp-yushan/subpages/integralCentre/images/exchange.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 KiB

After

Width:  |  Height:  |  Size: 207 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
epdc-resident-mp-yushan/subpages/integralCentre/images/note.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
epdc-resident-mp-yushan/subpages/integralCentre/images/record.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
epdc-resident-mp-yushan/subpages/integralCentre/images/t-dj-no.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
epdc-resident-mp-yushan/subpages/integralCentre/images/t-dj-yes.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
epdc-resident-mp-yushan/subpages/integralCentre/images/t-jd-no.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
epdc-resident-mp-yushan/subpages/integralCentre/images/t-jd-yes.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
epdc-resident-mp-yushan/subpages/integralCentre/images/t-wg-no.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
epdc-resident-mp-yushan/subpages/integralCentre/images/t-wg-yes.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
epdc-resident-mp-yushan/subpages/integralCentre/images/timg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

237
epdc-resident-mp-yushan/subpages/integralCentre/pages/index/index.js

@ -0,0 +1,237 @@
// subpages/integralCentre/pages/index/index.js
import {
userPointsRankinglist,
gradeRankinglist
} from "../../../../utils/integralCentre"
const api = require('../../../../utils/home')
import {
getTimestamp
} from "../../../../utils/common"
Page({
/**
* 页面的初始数据
*/
data: {
nodatapointsRanking: false,
points: 0, //积分
pageIndex: 1,
pageSize: 15,
pointsRankinglist: [], //积分排行
rankingType: 0, //排名方式
typeList: [{ //排名方式:0-周,1-月
type: "0",
name: "网格",
select: true
},
{
type: "1",
name: "街道",
select: false
},
{
type: "2",
name: "等级",
select: false
}
],
wg_y:'../../images/t-wg-yes.png',
wg_n:'../../images/t-wg-no.png',
jd_y:'../../images/t-jd-yes.png',
jd_n:'../../images/t-jd-no.png',
dj_y:'../../images/t-dj-yes.png',
dj_n:'../../images/t-dj-no.png',
timestamp: getTimestamp(),
loadMoreType: "loading",
loadMoreVisible: true,
noticePointsRule:'', // 规则
noticePointsGoods:'' // 兑换福利id
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({ //前面页面传过来的积分总数
points: options.points
})
this.pointsRankinglist(); //初始化加载积分记录列表
this.getResidentConfig(); //配置接口(通用)获取积分规则 兑换福利的详情id
},
// 排行切换
onButtonChange: function (e) {
const list = this.data.typeList
let that = this;
list.forEach(item => {
if (item.type === e.currentTarget.dataset.type) {
item.select = true
} else {
item.select = false
}
})
that.setData({
typeList: list,
rankingType: e.currentTarget.dataset.type,
pageIndex: 1,
pageSize: 15,
timestamp: this.data.timestamp,
pointsRankinglist: [],
nodatapointsRanking: false,
loadMoreType: "loading",
loadMoreVisible: true,
})
if ( e.currentTarget.dataset.type == "2") {
that.gradeRankinglist()
} else {
that.pointsRankinglist()
}
},
// 积分记录-积分排行接口
pointsRankinglist () {
let that = this
const para = {
pageIndex: 1,
pageSize: 20,
timestamp: this.data.timestamp,
rankingType: this.data.rankingType, //排名方式:0-周,1-月
}
userPointsRankinglist(para).then(res => {
that.setData({
pointsRankingUser: res.data.currentUser,
points:res.data.currentUser.points,
pointsRankinglist: that.data.pointsRankinglist.concat(res.data.rank),
})
if (that.data.pointsRankinglist.length > 0) {
that.setData({
nodatapointsRanking: false,
loadMoreType: "none",
})
} else {
that.setData({
nodatapointsRanking: true,
loadMoreType: "none",
loadMoreVisible: false,
})
}
}).catch(err => {
that.setData({
pointsRankinglist: [],
nodatapointsRanking: true,
loadMoreType: "none",
loadMoreVisible: false,
})
console.log(err)
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
//6.28 等级排行榜
gradeRankinglist () {
let that = this
const para = {
pageIndex: 1,
pageSize: 20,
timestamp: getTimestamp()
}
gradeRankinglist(para).then(res => {
that.setData({
pointsRankingUser: res.data.currentUser,
points:res.data.currentUser.points,
pointsRankinglist: that.data.pointsRankinglist.concat(res.data.rank),
})
if (that.data.pointsRankinglist.length > 0) {
that.setData({
nodatapointsRanking: false,
loadMoreType: "none",
})
} else {
that.setData({
nodatapointsRanking: true,
loadMoreType: "none",
loadMoreVisible: false,
})
}
}).catch(err => {
that.setData({
pointsRankinglist: [],
nodatapointsRanking: true,
loadMoreType: "none",
loadMoreVisible: false,
})
console.log(err)
})
},
// 获取默认配置, 阅读时间, 获取默认网格
getResidentConfig (){
let that = this
api.getResidentConfig().then(res => {
if (res.code === 0 && res.msg === "success") {
res.data.forEach(item => {
if (item.residentCode === "notice_points_rule") { // 积分规则
that.setData({
noticePointsRule:item.residentValue
})
} else if(item.residentCode === "notice_points_goods"){ // 兑换福利
that.setData({
noticePointsGoods:item.residentValue
})
}
})
}
}).catch(err => {
console.log(err)
})
},
bindtapRecord () {
wx.navigateTo({
url: `/subpages/integralCentre/pages/record/record?points=${this.data.points}`
})
},
bindtapIntegralGoods () {
wx.navigateTo({
url: `/subpages/integralCentre/pages/noticeDetail/noticeDetail?modulecode=notice_points_goods&residentValue=${this.data.noticePointsGoods}`
})
},
bindtapIntegralRule () {
wx.navigateTo({
url: `/subpages/integralCentre/pages/noticeDetail/noticeDetail?modulecode=notice_points_rule&residentValue=${this.data.noticePointsRule}`
})
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

9
epdc-resident-mp-yushan/subpages/integralCentre/pages/index/index.json

@ -0,0 +1,9 @@
{
"navigationBarTitleText": "积分中心",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#D63534",
"usingComponents": {
"load-more": "../../../../components/loadMore/loadMore",
"no-data":"../../../../components/nodata/nodata"
}
}

60
epdc-resident-mp-yushan/subpages/integralCentre/pages/index/index.wxml

@ -0,0 +1,60 @@
<view class="home">
<view class='title'>
<text class="number">{{points}}</text>
<text class="name">积分</text>
</view>
<!-- 积分兑换 -->
<view class="exchange" bindtap="bindtapIntegralGoods">
<image src="../../images/exchange.png" />
</view>
<!-- 积分记录 积分规则 -->
<view class="classification">
<view class="classification-item" bindtap="bindtapRecord">
<image src="../../images/record.png" />
<view class="classification-name">积分记录</view>
</view>
<view class="classification-item" bindtap="bindtapIntegralRule">
<image src="../../images/note.png" />
<view class="classification-name">积分规则</view>
</view>
</view>
<!-- tab 切换 -->
<view class="tab-more">
<button wx:for="{{typeList}}" wx:key="index" wx:for-index="index" data-type="{{item.type}}" id="item-{{ item.type }}" bindtap="onButtonChange" class="{{item.select ? 'tab-but-w' : 'tab-but-y'}}" form-type='submit' plain='true' hover-class="hover-btn">
<view class="{{item.select ? 'tab-but-name-w' : 'tab-but-name-y'}}">{{item.name}}</view>
<image wx:if="{{item.type == 0}}" class="tab-but-img-w" src="{{item.select ? wg_y : wg_n}}"></image>
<image wx:elif="{{item.type == 1}}" class="tab-but-img-w" src="{{item.select ? jd_y : jd_n}}"></image>
<image wx:else class="tab-but-img-w" src="{{item.select ? dj_y : dj_n}}"></image>
</button>
</view>
<!-- 我当前数据 -->
<view class="myRanking" wx:if="{{pointsRankingUser}}">
<view class="myRanking-item">
<view class="myRanking-left">
<view class="number-first">{{pointsRankingUser.rank}}</view>
<image class="img-first" src="{{pointsRankingUser.faceImg}}"></image>
<view class="name-first">{{pointsRankingUser.realName||pointsRankingUser.nickName}}</view>
</view>
<view class="myintegral">
{{pointsRankingUser.points||pointsRankingUser.grade}}
</view>
</view>
</view>
<!-- 排名列表 -->
<view class="list">
<view class="myRanking ranking" wx:for-index="index" wx:for-item="item" wx:key="index" wx:for="{{pointsRankinglist}}">
<view class="myRanking-item">
<view class="myRanking-left">
<view class="number-first" class="{{index < 3 ? '' : 'number-first'}} {{index===0 ? 'color1_' : index===1 ? 'color2_' : index===2 ? 'color2_' : ''}}">{{item.rank}}</view>
<image class="img-first" src="{{item.faceImg}}"></image>
<view class="name">{{item.realName||item.nickName}}</view>
</view>
<view class="integral">
{{item.points||item.grade}}
</view>
</view>
</view>
<load-more wx:if="{{loadMoreVisible}}" loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more>
</view>
<no-data isShow="{{nodatapointsRanking}}"></no-data>
</view>

213
epdc-resident-mp-yushan/subpages/integralCentre/pages/index/index.wxss

@ -0,0 +1,213 @@
page {
background: #f7f7f7;
}
.home {
width: 100%;
height: 100%;
}
.title {
width: 100%;
height: 228rpx;
background: linear-gradient(180deg, #D63534 0%, #DB4C42 100%);
display: flex;
flex-direction: column;
align-items: center;
}
.title .number {
height: 86rpx;
font-size: 86rpx;
line-height: 86rpx;
font-weight: bold;
color: rgba(255, 255, 255, 1);
margin-top: 55rpx;
}
.title .name {
height: 32rpx;
font-size: 32rpx;
line-height: 32rpx;
font-weight: 500;
color: rgba(255, 255, 255, 1);
margin-top: 15rpx;
}
/* 积分兑换 */
.exchange{
width: 100%;
height: 118rpx;
background: #fff;
}
.exchange image{
width: 100%;
height: 118rpx;
}
/* 积分记录 积分规则 */
.classification{
width: 100%;
height: 92rpx;
background: #fff;
display: flex;
justify-content: space-between;
align-items: center;
}
.classification .classification-item{
height: 34px;
display: flex;
align-items: center;
margin: 0 30rpx;
}
.classification .classification-item image{
width: 34rpx;
height: 34rpx;
}
.classification .classification-item .classification-name{
font-size: 28rpx;
font-weight: 500;
color: #999999;
margin-left: 6rpx;
}
/* tab切换 */
.tab-more{
margin-top: 16rpx;
width: 100%;
height: 148rpx;
background: #ffffff;
box-sizing: border-box;
padding: 40rpx 30rpx 0 30rpx;
display: flex;
/* justify-content: space-between; */
align-items: center;
}
.tab-more .tab-but-w{
width: 30%;
height: 90rpx;
background: #FFFFFF;
box-shadow: 1rpx 6rpx 16rpx 0rpx rgba(203, 203, 203, 0.23);
border-radius: 12rpx;
border: none;
display: flex;
justify-content: center;
align-items: center;
}
.tab-more .tab-but-y{
width: 30%;
height: 90rpx;
background: linear-gradient(86deg, #FECA04, #FF9E02);
box-shadow: 1px 6px 16px 0px rgba(202, 132, 44, 0.23);
border-radius: 12rpx;
border: none;
display: flex;
justify-content: center;
align-items: center;
}
.tab-but-name-w{
font-size: 30rpx;
font-weight: 500;
color: #666666;
}
.tab-but-img-w{
width: 42rpx;
height: 42rpx;
margin-left: 22rpx;
}
.tab-but-name-y{
font-size: 32rpx;
font-weight: bold;
color: #FFFFFF;
}
button::after{
border: none;
}
button {
padding: 0;
}
.hover-btn {
box-shadow: 0 0 10rpx rgba(63, 63, 63, 0.1) !important;
}
/* 排名列表 */
.myRanking{
width: 100%;
height: 138rpx;
background: #fff;
box-sizing: border-box;
padding: 0 55rpx;
}
.ranking{
width: 100%;
height: 138rpx;
background: #fff;
box-sizing: border-box;
padding: 0 55rpx;
margin-top: 1rpx;
}
.myRanking .myRanking-item {
display: flex;
justify-content: space-between;
align-items: center;
height: 138rpx;
}
.ranking .myRanking-item:last-child {
border-bottom: 1rpx solid #E5E5E5;
}
.myRanking .myRanking-item .myRanking-left{
display: flex;
align-items: center;
}
.myRanking .myRanking-item .myRanking-left .number-first{
font-size:38rpx;
font-weight:bold;
font-style:italic;
color:rgba(51,51,51,1);
}
.myRanking .myRanking-item .myRanking-left .img-first{
width: 90rpx;
height: 90rpx;
border-radius: 50%;
margin-left: 48rpx;
}
.myRanking .myRanking-item .myRanking-left .name-first{
font-size: 32rpx;
font-weight: 800;
color: #343434;
margin-left: 21rpx;
}
.myRanking .myRanking-item .myRanking-left .name{
font-size: 32rpx;
font-weight: 500;
color: #343434;
margin-left: 21rpx;
}
.myRanking .myRanking-item .myintegral{
font-size: 34rpx;
font-weight: 800;
color: #B20005;
}
.myRanking .myRanking-item .integral{
font-size: 32rpx;
font-weight: 500;
color: #B20005;
}
.list{
margin-top: 20rpx;
background: #fff;
}
.color1_{
color:#d42e31;
font-size:38rpx;
font-weight:bold;
font-style:italic;
}
.color2_{
color:#dd5800;
font-size:38rpx;
font-weight:bold;
font-style:italic;
}
.color3_{
color:#ffa800;
font-size:38rpx;
font-weight:bold;
font-style:italic;
}

97
epdc-resident-mp-yushan/subpages/integralCentre/pages/noticeDetail/noticeDetail.js

@ -0,0 +1,97 @@
const api = require('../../../../utils/integralCentre')
import util from '../../../../utils/util'
Page({
/**
* 页面的初始数据
*/
data: {
noticeObj: {},
noticeObjContent: "",
noticeCategory:'',
residentValue:'', // 详情的id
preloadVisible: true,
nodata: false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
noticeCategory:options.modulecode,
residentValue:options.residentValue
})
if(options.modulecode == 'notice_points_rule'){
wx.setNavigationBarTitle({
title: '积分规则'
})
} else {
wx.setNavigationBarTitle({
title: '积分兑换福利'
})
}
this.noticeDetail(this.data.residentValue)
},
noticeDetail (noticeId){
let that = this;
api.noticeDetail(noticeId).then(function (res) {
that.setData({
noticeObj: res.data,
noticeObjContent: util.formatRichText(res.data.noticeContent),
preloadVisible: false
})
}).catch(err => {
console.log(err)
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

6
epdc-resident-mp-yushan/subpages/integralCentre/pages/noticeDetail/noticeDetail.json

@ -0,0 +1,6 @@
{
"usingComponents": {
"no-data": "../../../../components/nodata/nodata"
},
"navigationBarTitleText": ""
}

27
epdc-resident-mp-yushan/subpages/integralCentre/pages/noticeDetail/noticeDetail.wxml

@ -0,0 +1,27 @@
<wxs module="filter" src="../../../../utils/filter.wxs"></wxs>
<view class="notice-detail" hidden="{{nodata}}">
<view class="selfContent" wx:if="{{!preloadVisible}}">
<view class="detail-title">{{noticeObj.noticeTitle}}</view>
<view class="detail-subtitle">
<view class="left">
<span>{{noticeObj.deptName}}</span>
<span>{{filter.formatTime(noticeObj.noticeTime, 'yyyy-MM-dd')}}</span>
</view>
<!-- <view class="right">
<view class="readNum">
<image src="../../images/ic_yueduliang.png" />
</view>
<view class="num">{{noticeObj.readingAmount}}</view>
</view> -->
</view>
<view class="richContent">
<rich-text space="nbsp" nodes="{{noticeObjContent}}"></rich-text>
</view>
</view>
<view class="preload" wx:else>
<view class="preload-title"></view>
<view class="preload-content"></view>
</view>
</view>
<no-data isShow="{{nodata}}"></no-data>

256
epdc-resident-mp-yushan/subpages/integralCentre/pages/noticeDetail/noticeDetail.wxss

@ -0,0 +1,256 @@
page{
background: #f7f7f7;
}
.notice-detail {
width: 100%;
height: 100%;
box-sizing: border-box;
padding: 20rpx;
background: #f7f7f7;
}
.richContent img{
width: 100%!important;
height: auto;
}
.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;
}
.default {
border: 1px solid #eaeaea;
}
.default span {
color: #999999;
}
.active {
border: 1px solid #ffab00;
}
.active span {
color: #ffb700;
}
/* preload start */
.preload {
width: 100%;
background: #fff;
box-sizing: border-box;
border-radius: 16rpx;
padding: 0 24rpx;
overflow: hidden;
margin-bottom: 20rpx;
}
.preload-title {
width: 100%;
height: 80rpx;
border-radius: 8rpx;
background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 37%, #f2f2f2 63%);
animation: loading 1.4s ease infinite;
background-size: 400% 100%;
margin-top: 20rpx;
}
.preload-content {
width: 100%;
height: 200rpx;
border-radius: 8rpx;
background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 37%, #f2f2f2 63%);
animation: loading 1.4s ease infinite;
background-size: 400% 100%;
margin-top: 20rpx;
}
@keyframes loading {
0% {
background-position: 100% 50%
}
100% {
background-position: 0 50%
}
}
/* preload end */
/* 轮播图start */
.altitle {
position: absolute;
width: 100%;
height: 66rpx;
background-color: black;
margin-top: 237rpx;
border-bottom-right-radius: 16rpx;
border-bottom-left-radius: 16rpx;
opacity: 0.5;
font-size: 22rpx;
font-weight: 500;
color: rgba(255, 255, 255, 1);
}
.altitle-name {
margin: 10rpx 20rpx;
}
.container {
width: 100vw;
}
.page-body {
padding-top: 30rpx;
background: #fff;
height: 340rpx;
}
.page-section {
width: 100%;
margin-bottom: 60rpx;
}
.page-section_center {
display: flex;
flex-direction: column;
align-items: center;
}
.page-section:last-child {
margin-bottom: 0;
}
.page-section-gap {
box-sizing: border-box;
padding: 0 30rpx;
}
.page-section-spacing {
box-sizing: border-box;
height: 340rpx;
background-color: #fff;
}
.page-section-title {
font-size: 28rpx;
color: #999;
margin-bottom: 10rpx;
padding-left: 30rpx;
padding-right: 30rpx;
}
.page-section-gap .page-section-title {
padding-left: 0;
padding-right: 0;
}
.swiper-item {
display: block;
height: 340rpx;
}
.swiper-item video {
height: 340rpx;
width: 100%;
}
.notice-detail .banner {
overflow: hidden;
height: 340rpx !important;
display: flex;
width: 100%;
border-radius: 16rpx !important;
margin: 0rpx 0rpx 20rpx 0rpx;
}
.dots {
display: flex;
justify-content: center;
margin-top: -16rpx;
z-index: 999;
position: relative;
}
.dots .dot {
width: 8rpx;
height: 8rpx;
border-radius: 8rpx;
margin-left: 10rpx;
background: #d2d5da;
transition: all 0.3s;
}
.dots .dot.active {
width: 24rpx;
background: #fff;
}
.page-section-title {
margin-top: 60rpx;
position: relative;
}
swiper {
height: 340rpx;
box-shadow: 0px 4px 29px 0px rgba(63, 63, 63, 0.1);
border-radius: 16rpx;
overflow: hidden;
-webkit-backface-visibility: hidden;
-webkit-transform: translate3d(0, 0, 0);
}
/* 轮播图end */

124
epdc-resident-mp-yushan/subpages/integralCentre/pages/record/record.js

@ -0,0 +1,124 @@
import {
pointsRecordlist
} from "../../../../utils/integralCentre"
import {
getTimestamp
} from "../../../../utils/common"
Page({
/**
* 页面的初始数据
*/
data: {
points: 0,
pointsRecordlist: [], //积分记录列表
nodatapointsRecord: false,
pageIndex: 1,
pageSize: 15,
loadMoreType: "none",
loadMoreVisible: false,
timestamp: getTimestamp()
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
points: options.points
})
this.pointsRecordlist(); //初始化加载积分记录列表
},
// 积分记录-积分记录接口
pointsRecordlist () {
let that = this
const para = {
pageIndex: this.data.pageIndex,
pageSize: this.data.pageSize,
timestamp: this.data.timestamp,
}
pointsRecordlist(para).then(res => {
that.setData({
pointsRecordlist: that.data.pointsRecordlist.concat(res.data),
loadMoreType: res.data.length === that.data.pageSize ? "loading" : "none",
})
if (that.data.pointsRecordlist.length > 0) {
that.setData({
nodatapointsRecord: false,
})
} else {
that.setData({
nodatapointsRecord: true,
loadMoreVisible: false,
})
}
}).catch(err => {
that.setData({
loadMoreType: "none",
loadMoreVisible: false,
pointsRecordlist: [],
nodatapointsRecord: true,
})
console.log(err)
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
this.setData({
loadMoreVisible: true
})
if (this.data.loadMoreType === "loading") {
this.setData({
pageIndex: this.data.pageIndex + 1,
pageSize: this.data.pageSize,
timestamp: this.data.timestamp,
nodatapointsRecord: false,
})
this.pointsRecordlist(); //初始化加载积分记录列表
}
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

9
epdc-resident-mp-yushan/subpages/integralCentre/pages/record/record.json

@ -0,0 +1,9 @@
{
"navigationBarTitleText": "积分记录",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#D63534",
"usingComponents": {
"load-more": "../../../../components/loadMore/loadMore",
"no-data":"../../../../components/nodata/nodata"
}
}

21
epdc-resident-mp-yushan/subpages/integralCentre/pages/record/record.wxml

@ -0,0 +1,21 @@
<view class="home">
<view class="title-top">
<image src="../../images/background-img.png" />
<view class="number">{{points}}</view>
<view class="name">积分</view>
</view>
<view class="list">
<view class="list-item" wx:for-index="index" wx:for-item="item" wx:key="index" wx:for="{{pointsRecordlist}}">
<view class="list-item-left">
<view class="reason">{{item.ruleDesc}}</view>
<view class="date">{{item.operationTime}}</view>
</view>
<view class="fraction">
<text wx:if="{{item.operationType == 0}}">-</text>
<text wx:else>+</text>{{item.points}}</view>
</view>
<no-data isShow="{{nodatapointsRecord}}"></no-data>
</view>
<!--加载更多提示-->
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more>
</view>

82
epdc-resident-mp-yushan/subpages/integralCentre/pages/record/record.wxss

@ -0,0 +1,82 @@
page {
/* background: #f7f7f7; */
}
.home {
width: 100%;
height: 100%;
}
.title-top{
width: 100%;
height: 260rpx;
}
.title-top image{
width: 100%;
height: 260rpx;
position: absolute;
z-index: 8;
display: flex;
align-items: center;
justify-content: center;
}
.title-top .number{
position: absolute;
z-index: 9;
height: 86rpx;
width: 100%;
font-size: 86rpx;
line-height: 86rpx;
font-weight: bold;
color: #FFFFFF;
text-align: center;
margin-top: 55rpx;
}
.title-top .name{
position: absolute;
z-index: 9;
height: 32rpx;
width: 100%;
text-align: center;
margin-top: 156rpx;
font-size: 32rpx;
font-weight: 500;
color: #FFFFFF;
line-height: 32rpx;
}
.list{
background: #FFFFFF;
margin-top: 30rpx;
padding: 0 30rpx;
box-sizing: border-box;
}
.list .list-item{
width: 100%;
height: 138rpx;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1rpx solid #E5E5E5;
}
.list .list-item:last-child {
border: none;
}
.list .list-item .list-item-left{
height: 138rpx;
}
.list .list-item .list-item-left .reason{
font-size: 32rpx;
font-weight: 500;
color: #343434;
margin-top: 27rpx;
}
.list .list-item .list-item-left .date{
font-size: 28rpx;
font-weight: 500;
color: #9A9A9A;
margin-top: 10rpx;
}
.list .list-item .fraction{
font-size: 32rpx;
font-weight: 500;
color: #B20005;
}

10
epdc-resident-mp-yushan/subpages/safety/components/sudoku/sudoku.wxss

@ -5,16 +5,16 @@
}
.content {
width: 100%;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: 150rpx;
box-sizing: border-box;
display: inline-block;
}
.item {
display: flex;
display: inline-flex;
flex-direction: column;
justify-content: center;
align-items: center;
box-sizing: border-box;
width: 33%;
margin-top: 20rpx;
}
.item .image {
width:220rpx;

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

@ -11,6 +11,8 @@ module.exports = {
getGridList: getGridList,
changeGrid: changeGrid,
completeInfo: completeInfo,
completeResidentInfoV2:completeResidentInfoV2,
completePartyInfoV2:completePartyInfoV2,
completeCompanyInfo: completeCompanyInfo,
completeCompanyMoreInfo: completeCompanyMoreInfo,
prepareComplete: prepareComplete,
@ -140,6 +142,14 @@ function gridLeaderRegister(mobile, smsCode, wxCode) {
function completeInfo(data) {
return fly.post('app-user/user/completeInfo', data)
}
// 居民 完善个人信息v2 不需要穿验证码
function completeResidentInfoV2 (para) {
return fly.post("app-user/user/v2/completeResidentInfo", para)
}
// 党员 完善个人信息 v2 不需要穿验证码
function completePartyInfoV2 (para) {
return fly.post("app-user/user/v2/completePartyInfo", para)
}
function completeCompanyInfo(data) {
return fly.post('custom/enterprise/completeRequisiteInfo', data)

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

@ -6,9 +6,13 @@ module.exports = {
browseNotice: browseNotice,
browseNews: browseNews,
newsPosition: newsPosition,
newsSupport:newsSupport,
newsOpposition:newsOpposition,
getInfoList: getInfoList,
infoDetail: infoDetail,
getConsultion: getConsultion
getConsultion: getConsultion,
browsePoints:browsePoints,
getResidentConfig:getResidentConfig
}
function getNoticeList(param) {
return fly.get('news/notice/list', param)
@ -34,6 +38,22 @@ function browseNews(param) {
function newsPosition(param) {
return fly.post('news/news/statement', param)
}
// 新闻支持 v2
function newsSupport (param) {
return fly.post("news/news/newsSupport", param)
}
// 新闻反对 v2
function newsOpposition (param) {
return fly.post("news/news/newsOpposition", param)
}
function infoDetail(param) {
return fly.post('news/information/read', param)
}
// 新闻浏览加积分
function browsePoints (param) {
return fly.post("news/news/browsePoints", param)
}
// 获取居民端配置
function getResidentConfig () {
return fly.get("residentConfig/getResidentConfig")
}

71
epdc-resident-mp-yushan/utils/integralCentre.js

@ -0,0 +1,71 @@
var fly = require('./request.js')
module.exports = {
pointsRecordlist: pointsRecordlist,
userPointsRankinglist:userPointsRankinglist,
gradeRankinglist:gradeRankinglist,
noticelist: noticelist,
noticeDetail:noticeDetail
}
/***********积分**********/
/**
* 积分记录-积分记录接口
* timestamp String 第一页查询发起时的时间
* pageIndex Number 页码
* pageSize Number 页容量
*/
function pointsRecordlist ({
timestamp,
pageIndex,
pageSize
}) {
return fly.get("points/pointsRecord/list", {
timestamp,
pageIndex,
pageSize
})
}
/**
* 积分记录-锦水-积分排行接口 v2 排名方式发生改变
* timestamp String 第一页查询发起时的时间
* pageIndex Number 页码
* pageSize Number 页容量
* rankingType Number 排名方式0-网格1-街道
*/
function userPointsRankinglist ({
timestamp,
pageIndex,
pageSize,
rankingType
}) {
return fly.get("app-user/userPointsRanking/list", {
timestamp,
pageIndex,
pageSize,
rankingType
})
}
/**
* 积分记录-等级排行接口 6.28
* timestamp String 第一页查询发起时的时间
* pageIndex Number 页码
* pageSize Number 页容量
*/
function gradeRankinglist ({
timestamp,
pageIndex,
pageSize
}) {
return fly.get("app-user/user/gradeRanking/list", {
timestamp,
pageIndex,
pageSize
})
}
// 通知列表(通)
function noticelist (params) {
return fly.get("news/v2/notice/list", params)
}
// 通知详情
function noticeDetail (noticeId) {
return fly.get(`news/notice/detail/${noticeId}`)
}
Loading…
Cancel
Save