16 changed files with 568 additions and 250 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/start/start", |
|||
"pages/indexNew/indexNew", |
|||
"pages/index/index", |
|||
"pages/mine/mine", |
|||
"pages/association/association", |
|||
"pages/discussion/discussion", |
|||
"pages/toRegister/toRegister", |
|||
"pages/toScan/toScan", |
|||
"pages/complete/complete", |
|||
"pages/formid/formid", |
|||
"pages/register/register", |
|||
"pages/detail/detail", |
|||
"pages/accept/accept", |
|||
"pages/gridLeaderRegister/gridLeaderRegister", |
|||
"pages/heart/heart", |
|||
"pages/heartNew/heartNew" |
|||
], |
|||
"subPackages": [ |
|||
{ |
|||
"root": "subpages/home", |
|||
"name": "home", |
|||
"pages": [ |
|||
"pages/webview/webview", |
|||
"pages/agreement/agreement", |
|||
"pages/notice/notice", |
|||
"pages/noticeNew/noticeNew", |
|||
"pages/info/info", |
|||
"pages/noticeDetail/noticeDetail", |
|||
"pages/newsDetail/newsDetail", |
|||
"pages/newsList/newsList", |
|||
"pages/messageDetail/messageDetail" |
|||
] |
|||
}, |
|||
{ |
|||
"root": "subpages/changegrid", |
|||
"name": "changeGrid", |
|||
"pages": [ |
|||
"pages/changeGrid/changeGrid" |
|||
] |
|||
}, |
|||
{ |
|||
"root": "subpages/association", |
|||
"name": "association", |
|||
"pages": [ |
|||
"pages/joinassociation/joinassociation", |
|||
"pages/createassociation/createassociation", |
|||
"pages/associationMember/associationMember", |
|||
"pages/associationDetail/associationDetail", |
|||
"pages/inviteFriend/inviteFriend", |
|||
"pages/incomingVerify/incomingVerify", |
|||
"pages/unpassAssociation/unpassAssociation", |
|||
"pages/topicList/topicList", |
|||
"pages/addTopic/addTopic", |
|||
"pages/topicDetail/topicDetail", |
|||
"pages/replyOrRemark/replyOrRemark", |
|||
"pages/changeToIssue/changeToIssue" |
|||
] |
|||
}, |
|||
{ |
|||
"root": "subpages/associationNew", |
|||
"name": "associationNew", |
|||
"pages": [ |
|||
"pages/associationlist/associationlist", |
|||
"pages/community/community", |
|||
"pages/gMembersList/gMembersList", |
|||
"pages/gOfficialsList/gOfficialsList", |
|||
"pages/talklist/talklist", |
|||
"pages/eventlist/eventlist", |
|||
"pages/addTopic/addTopic", |
|||
"pages/guideInfo/guideInfo" |
|||
] |
|||
}, |
|||
{ |
|||
"root": "subpages/discussion", |
|||
"name": "discussion", |
|||
"pages": [ |
|||
"pages/addIssue/addIssue", |
|||
"pages/discussionDetail/discussionDetail", |
|||
"pages/publishEvaluation/publishEvaluation", |
|||
"pages/remarkOrReply/remarkOrReply", |
|||
"pages/searchDiscussion/searchDiscussion", |
|||
"pages/categoryList/categoryList" |
|||
] |
|||
}, |
|||
{ |
|||
"root": "subpages/mine", |
|||
"name": "mine", |
|||
"pages": [ |
|||
"pages/eventDetail/eventDetail", |
|||
"pages/inviteRecord/inviteRecord", |
|||
"pages/gridManage/gridManage" |
|||
] |
|||
}, |
|||
{ |
|||
"root": "subpages/integralCentre", |
|||
"name": "integralCentre", |
|||
"pages": [ |
|||
"pages/index/index" |
|||
] |
|||
}, |
|||
{ |
|||
"root": "subpages/heart", |
|||
"pages": [ |
|||
"pages/heartDetail/heartDetail", |
|||
"pages/leaderboard/leaderboard", |
|||
"pages/leaderboardNew/leaderboardNew", |
|||
"pages/myNews/myNews", |
|||
"pages/clockIn/clockIn", |
|||
"pages/volunteer/volunteer", |
|||
"pages/signed/signed", |
|||
"pages/refusedOrEndedDetail/refusedOrEndedDetail", |
|||
"pages/cancelDetail/cancelDetail", |
|||
"pages/noticeDetail/noticeDetail", |
|||
"pages/myApply/myApply", |
|||
"pages/myApplyList/myApplyList", |
|||
"pages/myApplyDetail/myApplyDetail", |
|||
"pages/bannerDetail/bannerDetail", |
|||
"pages/groupBuyList/groupBuyList", |
|||
"pages/groupBuyListMy/groupBuyListMy", |
|||
"pages/groupBuyDetail/groupBuyDetail", |
|||
"pages/groupBuyConfirmList/groupBuyConfirmList", |
|||
"pages/evaluate/evaluate", |
|||
"pages/dropByList/dropByList", |
|||
"pages/groupBuyPublish/groupBuyPublish", |
|||
"pages/dropByPublish/dropByPublish", |
|||
"pages/noticeNewDetail/noticeNewDetail", |
|||
"pages/noticeNewList/noticeNewList" |
|||
] |
|||
}, |
|||
{ |
|||
"root": "subpages/oneKeyService", |
|||
"pages": [ |
|||
"pages/index/index", |
|||
"pages/directTo/directTo", |
|||
"pages/archives/archives", |
|||
"pages/archivesDept/archivesDept", |
|||
"pages/archivesDetail/archivesDetail", |
|||
"pages/noticeDetail/noticeDetail", |
|||
"pages/moduleList/moduleList", |
|||
"pages/reportIssue/reportIssue", |
|||
"pages/reportIssueList/reportIssueList", |
|||
"pages/reportIssueDetail/reportIssueDetail" |
|||
] |
|||
} |
|||
], |
|||
"preloadRule": { |
|||
"pages/indexNew/indexNew": { |
|||
"network": "all", |
|||
"packages": [ |
|||
"subpages/changegrid" |
|||
] |
|||
}, |
|||
"pages/discussion/discussion": { |
|||
"network": "all", |
|||
"packages": [ |
|||
"discussion" |
|||
] |
|||
}, |
|||
"pages/association/association": { |
|||
"network": "all", |
|||
"packages": [ |
|||
"subpages/association" |
|||
] |
|||
}, |
|||
"pages/mine/mine": { |
|||
"network": "all", |
|||
"packages": [ |
|||
"mine" |
|||
] |
|||
} |
|||
}, |
|||
"window": { |
|||
"backgroundTextStyle": "light", |
|||
"navigationBarBackgroundColor": "#fff", |
|||
"navigationBarTitleText": "WeChat", |
|||
"navigationBarTextStyle": "black" |
|||
}, |
|||
"networkTimeout": { |
|||
"request": 6000 |
|||
}, |
|||
"permission": { |
|||
"scope.userLocation": { |
|||
"desc": "e锦水将获取您的位置信息" |
|||
} |
|||
}, |
|||
"sitemapLocation": "sitemap.json" |
|||
{ |
|||
"pages": [ |
|||
"pages/start/start", |
|||
"pages/indexNew/indexNew", |
|||
"pages/index/index", |
|||
"pages/mine/mine", |
|||
"pages/association/association", |
|||
"pages/discussion/discussion", |
|||
"pages/toRegister/toRegister", |
|||
"pages/toScan/toScan", |
|||
"pages/complete/complete", |
|||
"pages/formid/formid", |
|||
"pages/register/register", |
|||
"pages/detail/detail", |
|||
"pages/accept/accept", |
|||
"pages/gridLeaderRegister/gridLeaderRegister", |
|||
"pages/heart/heart", |
|||
"pages/heartNew/heartNew" |
|||
], |
|||
"subPackages": [ |
|||
{ |
|||
"root": "subpages/home", |
|||
"name": "home", |
|||
"pages": [ |
|||
"pages/webview/webview", |
|||
"pages/agreement/agreement", |
|||
"pages/notice/notice", |
|||
"pages/noticeNew/noticeNew", |
|||
"pages/info/info", |
|||
"pages/noticeDetail/noticeDetail", |
|||
"pages/newsDetail/newsDetail", |
|||
"pages/newsList/newsList", |
|||
"pages/messageDetail/messageDetail" |
|||
] |
|||
}, |
|||
{ |
|||
"root": "subpages/changegrid", |
|||
"name": "changeGrid", |
|||
"pages": [ |
|||
"pages/changeGrid/changeGrid" |
|||
] |
|||
}, |
|||
{ |
|||
"root": "subpages/association", |
|||
"name": "association", |
|||
"pages": [ |
|||
"pages/joinassociation/joinassociation", |
|||
"pages/createassociation/createassociation", |
|||
"pages/associationMember/associationMember", |
|||
"pages/associationDetail/associationDetail", |
|||
"pages/inviteFriend/inviteFriend", |
|||
"pages/incomingVerify/incomingVerify", |
|||
"pages/unpassAssociation/unpassAssociation", |
|||
"pages/topicList/topicList", |
|||
"pages/addTopic/addTopic", |
|||
"pages/topicDetail/topicDetail", |
|||
"pages/replyOrRemark/replyOrRemark", |
|||
"pages/changeToIssue/changeToIssue" |
|||
] |
|||
}, |
|||
{ |
|||
"root": "subpages/associationNew", |
|||
"name": "associationNew", |
|||
"pages": [ |
|||
"pages/associationlist/associationlist", |
|||
"pages/community/community", |
|||
"pages/gMembersList/gMembersList", |
|||
"pages/gOfficialsList/gOfficialsList", |
|||
"pages/talklist/talklist", |
|||
"pages/eventlist/eventlist", |
|||
"pages/addTopic/addTopic", |
|||
"pages/guideInfo/guideInfo" |
|||
] |
|||
}, |
|||
{ |
|||
"root": "subpages/discussion", |
|||
"name": "discussion", |
|||
"pages": [ |
|||
"pages/addIssue/addIssue", |
|||
"pages/discussionDetail/discussionDetail", |
|||
"pages/publishEvaluation/publishEvaluation", |
|||
"pages/remarkOrReply/remarkOrReply", |
|||
"pages/searchDiscussion/searchDiscussion", |
|||
"pages/categoryList/categoryList" |
|||
] |
|||
}, |
|||
{ |
|||
"root": "subpages/mine", |
|||
"name": "mine", |
|||
"pages": [ |
|||
"pages/eventDetail/eventDetail", |
|||
"pages/inviteRecord/inviteRecord", |
|||
"pages/gridManage/gridManage" |
|||
] |
|||
}, |
|||
{ |
|||
"root": "subpages/integralCentre", |
|||
"name": "integralCentre", |
|||
"pages": [ |
|||
"pages/index/index", |
|||
"pages/exchangeIndex/exchangeIndex" |
|||
] |
|||
}, |
|||
{ |
|||
"root": "subpages/heart", |
|||
"pages": [ |
|||
"pages/heartDetail/heartDetail", |
|||
"pages/leaderboard/leaderboard", |
|||
"pages/leaderboardNew/leaderboardNew", |
|||
"pages/myNews/myNews", |
|||
"pages/clockIn/clockIn", |
|||
"pages/volunteer/volunteer", |
|||
"pages/signed/signed", |
|||
"pages/refusedOrEndedDetail/refusedOrEndedDetail", |
|||
"pages/cancelDetail/cancelDetail", |
|||
"pages/noticeDetail/noticeDetail", |
|||
"pages/myApply/myApply", |
|||
"pages/myApplyList/myApplyList", |
|||
"pages/myApplyDetail/myApplyDetail", |
|||
"pages/bannerDetail/bannerDetail", |
|||
"pages/groupBuyList/groupBuyList", |
|||
"pages/groupBuyListMy/groupBuyListMy", |
|||
"pages/groupBuyDetail/groupBuyDetail", |
|||
"pages/groupBuyConfirmList/groupBuyConfirmList", |
|||
"pages/evaluate/evaluate", |
|||
"pages/dropByList/dropByList", |
|||
"pages/groupBuyPublish/groupBuyPublish", |
|||
"pages/dropByPublish/dropByPublish", |
|||
"pages/noticeNewDetail/noticeNewDetail", |
|||
"pages/noticeNewList/noticeNewList" |
|||
] |
|||
}, |
|||
{ |
|||
"root": "subpages/oneKeyService", |
|||
"pages": [ |
|||
"pages/index/index", |
|||
"pages/directTo/directTo", |
|||
"pages/archives/archives", |
|||
"pages/archivesDept/archivesDept", |
|||
"pages/archivesDetail/archivesDetail", |
|||
"pages/noticeDetail/noticeDetail", |
|||
"pages/moduleList/moduleList", |
|||
"pages/reportIssue/reportIssue", |
|||
"pages/reportIssueList/reportIssueList", |
|||
"pages/reportIssueDetail/reportIssueDetail" |
|||
] |
|||
} |
|||
], |
|||
"preloadRule": { |
|||
"pages/indexNew/indexNew": { |
|||
"network": "all", |
|||
"packages": [ |
|||
"subpages/changegrid" |
|||
] |
|||
}, |
|||
"pages/discussion/discussion": { |
|||
"network": "all", |
|||
"packages": [ |
|||
"discussion" |
|||
] |
|||
}, |
|||
"pages/association/association": { |
|||
"network": "all", |
|||
"packages": [ |
|||
"subpages/association" |
|||
] |
|||
}, |
|||
"pages/mine/mine": { |
|||
"network": "all", |
|||
"packages": [ |
|||
"mine" |
|||
] |
|||
} |
|||
}, |
|||
"window": { |
|||
"backgroundTextStyle": "light", |
|||
"navigationBarBackgroundColor": "#fff", |
|||
"navigationBarTitleText": "WeChat", |
|||
"navigationBarTextStyle": "black" |
|||
}, |
|||
"networkTimeout": { |
|||
"request": 6000 |
|||
}, |
|||
"permission": { |
|||
"scope.userLocation": { |
|||
"desc": "e锦水将获取您的位置信息" |
|||
} |
|||
}, |
|||
"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