17 changed files with 571 additions and 253 deletions
@ -0,0 +1,25 @@ |
|||||
|
const request = require("../utils/request") |
||||
|
/** |
||||
|
* 获取积分核销兑换码 |
||||
|
*/ |
||||
|
export function getCode() { |
||||
|
return request.get("userpointsverification/getqrcode") |
||||
|
} |
||||
|
/** |
||||
|
* 获取居民兑换记录接口 |
||||
|
* @param behaviorCode 积分动作编码 |
||||
|
* @param pageIndex Number 页码 |
||||
|
* @param pageSize Number 页容量 |
||||
|
*/ |
||||
|
|
||||
|
export function getPointsLogs({ |
||||
|
behaviorCode, |
||||
|
pageIndex, |
||||
|
pageSize |
||||
|
}) { |
||||
|
return request.get("userpointsverification/getpointslogs", { |
||||
|
behaviorCode, |
||||
|
pageIndex, |
||||
|
pageSize |
||||
|
}) |
||||
|
} |
@ -1,189 +1,190 @@ |
|||||
{ |
{ |
||||
"pages": [ |
"pages": [ |
||||
"pages/start/start", |
"pages/start/start", |
||||
"pages/indexNew/indexNew", |
"pages/indexNew/indexNew", |
||||
"pages/index/index", |
"pages/index/index", |
||||
"pages/mine/mine", |
"pages/mine/mine", |
||||
"pages/association/association", |
"pages/association/association", |
||||
"pages/discussion/discussion", |
"pages/discussion/discussion", |
||||
"pages/toRegister/toRegister", |
"pages/toRegister/toRegister", |
||||
"pages/toScan/toScan", |
"pages/toScan/toScan", |
||||
"pages/complete/complete", |
"pages/complete/complete", |
||||
"pages/formid/formid", |
"pages/formid/formid", |
||||
"pages/register/register", |
"pages/register/register", |
||||
"pages/detail/detail", |
"pages/detail/detail", |
||||
"pages/accept/accept", |
"pages/accept/accept", |
||||
"pages/gridLeaderRegister/gridLeaderRegister", |
"pages/gridLeaderRegister/gridLeaderRegister", |
||||
"pages/heart/heart", |
"pages/heart/heart", |
||||
"pages/heartNew/heartNew" |
"pages/heartNew/heartNew" |
||||
], |
], |
||||
"subPackages": [ |
"subPackages": [ |
||||
{ |
{ |
||||
"root": "subpages/home", |
"root": "subpages/home", |
||||
"name": "home", |
"name": "home", |
||||
"pages": [ |
"pages": [ |
||||
"pages/webview/webview", |
"pages/webview/webview", |
||||
"pages/agreement/agreement", |
"pages/agreement/agreement", |
||||
"pages/notice/notice", |
"pages/notice/notice", |
||||
"pages/noticeNew/noticeNew", |
"pages/noticeNew/noticeNew", |
||||
"pages/info/info", |
"pages/info/info", |
||||
"pages/noticeDetail/noticeDetail", |
"pages/noticeDetail/noticeDetail", |
||||
"pages/newsDetail/newsDetail", |
"pages/newsDetail/newsDetail", |
||||
"pages/newsList/newsList", |
"pages/newsList/newsList", |
||||
"pages/messageDetail/messageDetail" |
"pages/messageDetail/messageDetail" |
||||
] |
] |
||||
}, |
}, |
||||
{ |
{ |
||||
"root": "subpages/changegrid", |
"root": "subpages/changegrid", |
||||
"name": "changeGrid", |
"name": "changeGrid", |
||||
"pages": [ |
"pages": [ |
||||
"pages/changeGrid/changeGrid" |
"pages/changeGrid/changeGrid" |
||||
] |
] |
||||
}, |
}, |
||||
{ |
{ |
||||
"root": "subpages/association", |
"root": "subpages/association", |
||||
"name": "association", |
"name": "association", |
||||
"pages": [ |
"pages": [ |
||||
"pages/joinassociation/joinassociation", |
"pages/joinassociation/joinassociation", |
||||
"pages/createassociation/createassociation", |
"pages/createassociation/createassociation", |
||||
"pages/associationMember/associationMember", |
"pages/associationMember/associationMember", |
||||
"pages/associationDetail/associationDetail", |
"pages/associationDetail/associationDetail", |
||||
"pages/inviteFriend/inviteFriend", |
"pages/inviteFriend/inviteFriend", |
||||
"pages/incomingVerify/incomingVerify", |
"pages/incomingVerify/incomingVerify", |
||||
"pages/unpassAssociation/unpassAssociation", |
"pages/unpassAssociation/unpassAssociation", |
||||
"pages/topicList/topicList", |
"pages/topicList/topicList", |
||||
"pages/addTopic/addTopic", |
"pages/addTopic/addTopic", |
||||
"pages/topicDetail/topicDetail", |
"pages/topicDetail/topicDetail", |
||||
"pages/replyOrRemark/replyOrRemark", |
"pages/replyOrRemark/replyOrRemark", |
||||
"pages/changeToIssue/changeToIssue" |
"pages/changeToIssue/changeToIssue" |
||||
] |
] |
||||
}, |
}, |
||||
{ |
{ |
||||
"root": "subpages/associationNew", |
"root": "subpages/associationNew", |
||||
"name": "associationNew", |
"name": "associationNew", |
||||
"pages": [ |
"pages": [ |
||||
"pages/associationlist/associationlist", |
"pages/associationlist/associationlist", |
||||
"pages/community/community", |
"pages/community/community", |
||||
"pages/gMembersList/gMembersList", |
"pages/gMembersList/gMembersList", |
||||
"pages/gOfficialsList/gOfficialsList", |
"pages/gOfficialsList/gOfficialsList", |
||||
"pages/talklist/talklist", |
"pages/talklist/talklist", |
||||
"pages/eventlist/eventlist", |
"pages/eventlist/eventlist", |
||||
"pages/addTopic/addTopic", |
"pages/addTopic/addTopic", |
||||
"pages/guideInfo/guideInfo" |
"pages/guideInfo/guideInfo" |
||||
] |
] |
||||
}, |
}, |
||||
{ |
{ |
||||
"root": "subpages/discussion", |
"root": "subpages/discussion", |
||||
"name": "discussion", |
"name": "discussion", |
||||
"pages": [ |
"pages": [ |
||||
"pages/addIssue/addIssue", |
"pages/addIssue/addIssue", |
||||
"pages/discussionDetail/discussionDetail", |
"pages/discussionDetail/discussionDetail", |
||||
"pages/publishEvaluation/publishEvaluation", |
"pages/publishEvaluation/publishEvaluation", |
||||
"pages/remarkOrReply/remarkOrReply", |
"pages/remarkOrReply/remarkOrReply", |
||||
"pages/searchDiscussion/searchDiscussion", |
"pages/searchDiscussion/searchDiscussion", |
||||
"pages/categoryList/categoryList" |
"pages/categoryList/categoryList" |
||||
] |
] |
||||
}, |
}, |
||||
{ |
{ |
||||
"root": "subpages/mine", |
"root": "subpages/mine", |
||||
"name": "mine", |
"name": "mine", |
||||
"pages": [ |
"pages": [ |
||||
"pages/eventDetail/eventDetail", |
"pages/eventDetail/eventDetail", |
||||
"pages/inviteRecord/inviteRecord", |
"pages/inviteRecord/inviteRecord", |
||||
"pages/gridManage/gridManage" |
"pages/gridManage/gridManage" |
||||
] |
] |
||||
}, |
}, |
||||
{ |
{ |
||||
"root": "subpages/integralCentre", |
"root": "subpages/integralCentre", |
||||
"name": "integralCentre", |
"name": "integralCentre", |
||||
"pages": [ |
"pages": [ |
||||
"pages/index/index" |
"pages/index/index", |
||||
] |
"pages/exchangeIndex/exchangeIndex" |
||||
}, |
] |
||||
{ |
}, |
||||
"root": "subpages/heart", |
{ |
||||
"pages": [ |
"root": "subpages/heart", |
||||
"pages/heartDetail/heartDetail", |
"pages": [ |
||||
"pages/leaderboard/leaderboard", |
"pages/heartDetail/heartDetail", |
||||
"pages/leaderboardNew/leaderboardNew", |
"pages/leaderboard/leaderboard", |
||||
"pages/myNews/myNews", |
"pages/leaderboardNew/leaderboardNew", |
||||
"pages/clockIn/clockIn", |
"pages/myNews/myNews", |
||||
"pages/volunteer/volunteer", |
"pages/clockIn/clockIn", |
||||
"pages/signed/signed", |
"pages/volunteer/volunteer", |
||||
"pages/refusedOrEndedDetail/refusedOrEndedDetail", |
"pages/signed/signed", |
||||
"pages/cancelDetail/cancelDetail", |
"pages/refusedOrEndedDetail/refusedOrEndedDetail", |
||||
"pages/noticeDetail/noticeDetail", |
"pages/cancelDetail/cancelDetail", |
||||
"pages/myApply/myApply", |
"pages/noticeDetail/noticeDetail", |
||||
"pages/myApplyList/myApplyList", |
"pages/myApply/myApply", |
||||
"pages/myApplyDetail/myApplyDetail", |
"pages/myApplyList/myApplyList", |
||||
"pages/bannerDetail/bannerDetail", |
"pages/myApplyDetail/myApplyDetail", |
||||
"pages/groupBuyList/groupBuyList", |
"pages/bannerDetail/bannerDetail", |
||||
"pages/groupBuyListMy/groupBuyListMy", |
"pages/groupBuyList/groupBuyList", |
||||
"pages/groupBuyDetail/groupBuyDetail", |
"pages/groupBuyListMy/groupBuyListMy", |
||||
"pages/groupBuyConfirmList/groupBuyConfirmList", |
"pages/groupBuyDetail/groupBuyDetail", |
||||
"pages/evaluate/evaluate", |
"pages/groupBuyConfirmList/groupBuyConfirmList", |
||||
"pages/dropByList/dropByList", |
"pages/evaluate/evaluate", |
||||
"pages/groupBuyPublish/groupBuyPublish", |
"pages/dropByList/dropByList", |
||||
"pages/dropByPublish/dropByPublish", |
"pages/groupBuyPublish/groupBuyPublish", |
||||
"pages/noticeNewDetail/noticeNewDetail", |
"pages/dropByPublish/dropByPublish", |
||||
"pages/noticeNewList/noticeNewList" |
"pages/noticeNewDetail/noticeNewDetail", |
||||
] |
"pages/noticeNewList/noticeNewList" |
||||
}, |
] |
||||
{ |
}, |
||||
"root": "subpages/oneKeyService", |
{ |
||||
"pages": [ |
"root": "subpages/oneKeyService", |
||||
"pages/index/index", |
"pages": [ |
||||
"pages/directTo/directTo", |
"pages/index/index", |
||||
"pages/archives/archives", |
"pages/directTo/directTo", |
||||
"pages/archivesDept/archivesDept", |
"pages/archives/archives", |
||||
"pages/archivesDetail/archivesDetail", |
"pages/archivesDept/archivesDept", |
||||
"pages/noticeDetail/noticeDetail", |
"pages/archivesDetail/archivesDetail", |
||||
"pages/moduleList/moduleList", |
"pages/noticeDetail/noticeDetail", |
||||
"pages/reportIssue/reportIssue", |
"pages/moduleList/moduleList", |
||||
"pages/reportIssueList/reportIssueList", |
"pages/reportIssue/reportIssue", |
||||
"pages/reportIssueDetail/reportIssueDetail" |
"pages/reportIssueList/reportIssueList", |
||||
] |
"pages/reportIssueDetail/reportIssueDetail" |
||||
} |
] |
||||
], |
} |
||||
"preloadRule": { |
], |
||||
"pages/indexNew/indexNew": { |
"preloadRule": { |
||||
"network": "all", |
"pages/indexNew/indexNew": { |
||||
"packages": [ |
"network": "all", |
||||
"subpages/changegrid" |
"packages": [ |
||||
] |
"subpages/changegrid" |
||||
}, |
] |
||||
"pages/discussion/discussion": { |
}, |
||||
"network": "all", |
"pages/discussion/discussion": { |
||||
"packages": [ |
"network": "all", |
||||
"discussion" |
"packages": [ |
||||
] |
"discussion" |
||||
}, |
] |
||||
"pages/association/association": { |
}, |
||||
"network": "all", |
"pages/association/association": { |
||||
"packages": [ |
"network": "all", |
||||
"subpages/association" |
"packages": [ |
||||
] |
"subpages/association" |
||||
}, |
] |
||||
"pages/mine/mine": { |
}, |
||||
"network": "all", |
"pages/mine/mine": { |
||||
"packages": [ |
"network": "all", |
||||
"mine" |
"packages": [ |
||||
] |
"mine" |
||||
} |
] |
||||
}, |
} |
||||
"window": { |
}, |
||||
"backgroundTextStyle": "light", |
"window": { |
||||
"navigationBarBackgroundColor": "#fff", |
"backgroundTextStyle": "light", |
||||
"navigationBarTitleText": "WeChat", |
"navigationBarBackgroundColor": "#fff", |
||||
"navigationBarTextStyle": "black" |
"navigationBarTitleText": "WeChat", |
||||
}, |
"navigationBarTextStyle": "black" |
||||
"networkTimeout": { |
}, |
||||
"request": 6000 |
"networkTimeout": { |
||||
}, |
"request": 6000 |
||||
"permission": { |
}, |
||||
"scope.userLocation": { |
"permission": { |
||||
"desc": "e锦水将获取您的位置信息" |
"scope.userLocation": { |
||||
} |
"desc": "e锦水将获取您的位置信息" |
||||
}, |
} |
||||
"sitemapLocation": "sitemap.json" |
}, |
||||
|
"sitemapLocation": "sitemap.json" |
||||
} |
} |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 8.6 KiB |
@ -0,0 +1,79 @@ |
|||||
|
import { |
||||
|
getCode, |
||||
|
getPointsLogs |
||||
|
} from "../../../../api/integralCentre.js" |
||||
|
Page({ |
||||
|
data: { |
||||
|
codeUrl: '', |
||||
|
behaviorCode: 'points_exchange', //积分动作编码
|
||||
|
pageIndex: 1, |
||||
|
pageSize: 10, |
||||
|
pointList: [], |
||||
|
loadMoreVisible: false, //false
|
||||
|
loadMoreType: "none", |
||||
|
showLoading: true, |
||||
|
nodata: false, |
||||
|
_timer: null, |
||||
|
}, |
||||
|
onLoad: function () { |
||||
|
this.getCode() |
||||
|
this.getPointsLogs() |
||||
|
if (this.data._timer) { |
||||
|
clearInterval() |
||||
|
} |
||||
|
let _timer = null |
||||
|
_timer = setInterval(() => { |
||||
|
console.log('刷新') |
||||
|
this.getCode() |
||||
|
}, 1000 * 180) |
||||
|
}, |
||||
|
getCode() { |
||||
|
this.setData({ |
||||
|
showLoading: true |
||||
|
}) |
||||
|
getCode().then(res => { |
||||
|
this.setData({ |
||||
|
codeUrl: res.data.codeUrl, |
||||
|
showLoading: false |
||||
|
}) |
||||
|
}).catch(err => {}) |
||||
|
}, |
||||
|
getNewCode() { |
||||
|
this.getCode() |
||||
|
}, |
||||
|
// 获取居民兑换记录接口
|
||||
|
getPointsLogs() { |
||||
|
let para = { |
||||
|
pageIndex: this.data.pageIndex, |
||||
|
pageSize: this.data.pageSize, |
||||
|
behaviorCode: this.data.behaviorCode, |
||||
|
} |
||||
|
getPointsLogs(para).then((res) => { |
||||
|
this.setData({ |
||||
|
loadMoreVisible: true, |
||||
|
loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none', |
||||
|
pointList: this.data.pointList.concat(res.data) |
||||
|
}) |
||||
|
if (this.data.pointList.length == 0) { |
||||
|
this.setData({ |
||||
|
loadMoreVisible: false, |
||||
|
nodata: true |
||||
|
}) |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.setData({ |
||||
|
nodata: true |
||||
|
}) |
||||
|
}) |
||||
|
}, |
||||
|
/** |
||||
|
* 页面上拉触底事件的处理函数 |
||||
|
*/ |
||||
|
onReachBottom: function () { |
||||
|
console.log('下拉了') |
||||
|
if (this.data.loadMoreType === 'loading') { |
||||
|
this.data.pageIndex += 1, |
||||
|
this.getPointsLogs() |
||||
|
} |
||||
|
}, |
||||
|
}) |
@ -0,0 +1,9 @@ |
|||||
|
{ |
||||
|
"usingComponents": { |
||||
|
"load-more": "../../../../components/loadMore/loadMore", |
||||
|
"no-data": "../../../../components/nodata/nodata" |
||||
|
}, |
||||
|
"navigationBarTitleText": "积分中心", |
||||
|
"navigationBarTextStyle": "white", |
||||
|
"navigationBarBackgroundColor": "#DD5245" |
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
<view class="exchange-index"> |
||||
|
<view class="exchange-header"> |
||||
|
<view class="background"></view> |
||||
|
<view class="exchange-code"> |
||||
|
<view class="code-text"> |
||||
|
<image src="../../images/code.png" class="code" /> |
||||
|
<text>兑换码</text> |
||||
|
</view> |
||||
|
<image src="{{codeUrl}}" class="code-img" bind:tap="getNewCode" wx:if="{{!showLoading}}" /> |
||||
|
<view class="code-img" wx:if="{{showLoading}}"> |
||||
|
<image src="../../../../images/loading.gif" class='loading' /> |
||||
|
</view> |
||||
|
<view class="code-footer" bind:tap="getNewCode">请点击兑换码刷新</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="exchange-time"> |
||||
|
<view class="time-title"> |
||||
|
<text class="" style="margin-left:90rpx">兑换时间</text> |
||||
|
<text class="" style="margin-left:220rpx">说明</text> |
||||
|
<text class="" style="margin-left:160rpx">积分</text> |
||||
|
</view> |
||||
|
<view class="time-item-box"> |
||||
|
<view class="time-item" wx:for="{{pointList}}"> |
||||
|
<text class="time-item-time">{{item.operationTime}}</text> |
||||
|
<text class="time-item-remark">{{item.remark?item.remark:'暂无核销记录说明'}}</text> |
||||
|
<!-- <text class="time-item-num">-1000</text> --> |
||||
|
<text class="time-item-num">{{item.operationType==='1'? '+':'-'}}{{item.points}}</text> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
<no-data isShow="{{nodata}}" wx:if="{{nodata}}"></no-data> |
||||
|
<load-more loadMoreVisible="{{loadMoreVisible}}" loadMoreType="{{loadMoreType}}" load-more-child='load-more-exchange'></load-more> |
||||
|
</view> |
@ -0,0 +1,113 @@ |
|||||
|
page { |
||||
|
/* background: #f7f7f7; */ |
||||
|
} |
||||
|
|
||||
|
.exchange-index { |
||||
|
width: 100%; |
||||
|
box-sizing: border-box; |
||||
|
} |
||||
|
|
||||
|
.exchange-header { |
||||
|
height: 680rpx; |
||||
|
/* border: 1rpx solid red; */ |
||||
|
} |
||||
|
|
||||
|
.exchange-header .background { |
||||
|
box-sizing: border-box; |
||||
|
width: 100%; |
||||
|
height: 80rpx; |
||||
|
background: #DD5245; |
||||
|
} |
||||
|
|
||||
|
.exchange-header .exchange-code { |
||||
|
box-sizing: border-box; |
||||
|
width: 660rpx; |
||||
|
height: 630rpx; |
||||
|
margin: 0 auto; |
||||
|
position: absolute; |
||||
|
top: 2%; |
||||
|
left: 50%; |
||||
|
transform: translate(-50%, 0%); |
||||
|
background: #FFFFFF; |
||||
|
border-radius: 20rpx; |
||||
|
padding: 40rpx 30rpx; |
||||
|
box-shadow: 0px 0px 20rpx #eee; |
||||
|
} |
||||
|
|
||||
|
.exchange-code .code-text { |
||||
|
color: 32rpx; |
||||
|
font-weight: bold; |
||||
|
} |
||||
|
|
||||
|
.exchange-code .code-text text { |
||||
|
vertical-align: middle; |
||||
|
} |
||||
|
|
||||
|
.exchange-code .code-text .code { |
||||
|
width: 32rpx; |
||||
|
height: 32rpx; |
||||
|
vertical-align: middle; |
||||
|
margin-right: 10rpx; |
||||
|
} |
||||
|
|
||||
|
.exchange-code .code-img { |
||||
|
width: 400rpx; |
||||
|
height: 400rpx; |
||||
|
margin-left: 110rpx; |
||||
|
margin-top: 50rpx; |
||||
|
} |
||||
|
|
||||
|
.loading { |
||||
|
width: 60rpx; |
||||
|
height: 60rpx; |
||||
|
margin-top: 170rpx; |
||||
|
margin-left: 150rpx; |
||||
|
} |
||||
|
|
||||
|
.exchange-code .code-footer { |
||||
|
margin-left: 200rpx; |
||||
|
font-size: 28rpx; |
||||
|
color: #999; |
||||
|
} |
||||
|
|
||||
|
.exchange-time .time-title { |
||||
|
box-sizing: border-box; |
||||
|
width: 100%; |
||||
|
font-weight: bold; |
||||
|
font-size: 30rpx; |
||||
|
color: #151515; |
||||
|
} |
||||
|
|
||||
|
.time-item-box { |
||||
|
padding: 0 20rpx; |
||||
|
} |
||||
|
|
||||
|
.exchange-time .time-item-box .time-item { |
||||
|
box-sizing: border-box; |
||||
|
width: 100%; |
||||
|
display: flex; |
||||
|
justify-content: space-around; |
||||
|
font-size: 30rpx; |
||||
|
margin-top: 50rpx; |
||||
|
} |
||||
|
|
||||
|
.exchange-time .time-item-box .time-item .time-item-time { |
||||
|
width: 45%; |
||||
|
color: #151515; |
||||
|
} |
||||
|
|
||||
|
.exchange-time .time-item-box .time-item .time-item-remark { |
||||
|
width: 40%; |
||||
|
color: #151515; |
||||
|
} |
||||
|
|
||||
|
.exchange-time .time-item-box .time-item .time-item-num { |
||||
|
width: 15%; |
||||
|
color: #D60000; |
||||
|
text-align: center; |
||||
|
} |
||||
|
|
||||
|
/* 覆盖组件样式 */ |
||||
|
.load-more-exchange { |
||||
|
background: #fff !important; |
||||
|
} |
Loading…
Reference in new issue