| @@ -41,7 +41,8 @@ | |||||
| "pages/scanPay/scanPay", | "pages/scanPay/scanPay", | ||||
| "pages/paySuccess/paySuccess", | "pages/paySuccess/paySuccess", | ||||
| "pages/ConsumeDetail/ConsumeDetail", | "pages/ConsumeDetail/ConsumeDetail", | ||||
| "pages/externallinks/index" | |||||
| "pages/externallinks/index", | |||||
| "pages/czdetail/czdetail" | |||||
| ], | ], | ||||
| "navigateToMiniProgramAppIdList": [ | "navigateToMiniProgramAppIdList": [ | ||||
| "wx192b7d2e8dcbefd0", | "wx192b7d2e8dcbefd0", | ||||
| @@ -0,0 +1,117 @@ | |||||
| var config = require("../../config/config.js"); | |||||
| var app = getApp(); | |||||
| const Http = require("../../utils/HttpBasics"); | |||||
| let util = require("../../utils/util"); | |||||
| Page({ | |||||
| /** | |||||
| * 页面的初始数据 | |||||
| */ | |||||
| data: { | |||||
| score: 10, | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面加载 | |||||
| */ | |||||
| onLoad: function(options) { | |||||
| }, | |||||
| gotorule: function() { | |||||
| wx.navigateTo({ | |||||
| url: '/pages/grade/grade', | |||||
| }) | |||||
| }, | |||||
| record: function() { | |||||
| let that = this; | |||||
| Http.get({ | |||||
| url: config.api.scoreHistory, | |||||
| data: { | |||||
| pageNum: 1, | |||||
| pageSize: 100 | |||||
| } | |||||
| }) | |||||
| .then(res => { | |||||
| console.log(res) | |||||
| if (res.data.list.length > 0) { | |||||
| res.data.list.map(file=>{ | |||||
| file.createDate = util.formatTime(file.createDate, "yyyy-MM-dd hh:mm:ss") | |||||
| }); | |||||
| that.setData({ | |||||
| list:res.data.list | |||||
| }) | |||||
| } | |||||
| }) | |||||
| .catch(err => { | |||||
| wx.showModal({ | |||||
| title: '抱歉', | |||||
| content: err.message, | |||||
| showCancel:false | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| getScore: function() { | |||||
| let that = this; | |||||
| Http.get({ | |||||
| url: config.api.getScore, | |||||
| data: {} | |||||
| }) | |||||
| .then(res => { | |||||
| console.log(res) | |||||
| that.setData({ | |||||
| score: res.data.score, | |||||
| levelName: res.data.levelName, | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面初次渲染完成 | |||||
| */ | |||||
| onReady: function() { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面显示 | |||||
| */ | |||||
| onShow: function() { | |||||
| let that = this; | |||||
| that.getScore(); | |||||
| that.record(); | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面隐藏 | |||||
| */ | |||||
| onHide: function() { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面卸载 | |||||
| */ | |||||
| onUnload: function() { | |||||
| }, | |||||
| /** | |||||
| * 页面相关事件处理函数--监听用户下拉动作 | |||||
| */ | |||||
| onPullDownRefresh: function() { | |||||
| }, | |||||
| /** | |||||
| * 页面上拉触底事件的处理函数 | |||||
| */ | |||||
| onReachBottom: function() { | |||||
| }, | |||||
| /** | |||||
| * 用户点击右上角分享 | |||||
| */ | |||||
| onShareAppMessage: function() { | |||||
| } | |||||
| }) | |||||
| @@ -0,0 +1,3 @@ | |||||
| { | |||||
| "navigationBarTitleText": "成长值" | |||||
| } | |||||
| @@ -0,0 +1,18 @@ | |||||
| <view class='head'> | |||||
| <text>当前</text> | |||||
| <text>{{score}}</text> | |||||
| <view class='rule' bindtap='gotorule'>规则</view> | |||||
| <image class='bg' src='./../../../assets/images/bgg.png' mode='widthFix'></image> | |||||
| </view> | |||||
| <view class=''> | |||||
| <text class='title'>成长值明细</text> | |||||
| <view class='content clearfix' wx:for="{{list}}" wx:key="{{index}}"> | |||||
| <view class='le'> | |||||
| <text>{{item.scoreAmount}}</text> | |||||
| <text>{{item.createDate}}</text> | |||||
| </view> | |||||
| <view class='fr'> | |||||
| <text>+{{item.scoreAmount}}分</text> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| @@ -0,0 +1,100 @@ | |||||
| /* pages/czdetail/czdetail.wxss */ | |||||
| .head { | |||||
| height: 252rpx; | |||||
| background: #02c0ff; | |||||
| position: relative; | |||||
| } | |||||
| .rule { | |||||
| position: absolute; | |||||
| right: 0; | |||||
| top: 0; | |||||
| bottom: 0; | |||||
| margin: auto; | |||||
| width: 124rpx; | |||||
| height: 48rpx; | |||||
| line-height: 48rpx; | |||||
| text-align: center; | |||||
| background: #fff; | |||||
| font-size: 28rpx; | |||||
| font-weight: 400; | |||||
| color: rgba(2, 192, 255, 1); | |||||
| border-bottom-left-radius: 50rpx; | |||||
| border-top-left-radius: 50rpx; | |||||
| } | |||||
| .head text { | |||||
| display: block; | |||||
| text-align: center; | |||||
| color: #fff; | |||||
| } | |||||
| .head text:nth-of-type(1) { | |||||
| font-size: 28rpx; | |||||
| font-family: PingFang-SC-Regular; | |||||
| font-weight: 400; | |||||
| color: rgba(255, 255, 255, 1); | |||||
| } | |||||
| .head text:nth-of-type(2) { | |||||
| font-size: 70rpx; | |||||
| font-family: PingFang-SC-Bold; | |||||
| font-weight: bold; | |||||
| color: rgba(255, 255, 255, 1); | |||||
| } | |||||
| .bg { | |||||
| position: absolute; | |||||
| bottom: 0; | |||||
| left: 0; | |||||
| right: 0; | |||||
| width: 100%; | |||||
| height: 55rpx; | |||||
| } | |||||
| .content { | |||||
| position: relative; | |||||
| padding: 0 35rpx; | |||||
| height: 145rpx; | |||||
| border-bottom: 1px solid #eaeaea; | |||||
| } | |||||
| .content>view:nth-of-type(2n+1) text { | |||||
| display: block; | |||||
| } | |||||
| .content>view:nth-of-type(2n+1) text:nth-of-type(1) { | |||||
| margin-top: 24rpx; | |||||
| } | |||||
| .content>view:nth-of-type(2n+1) text:nth-of-type(2) { | |||||
| margin-top: 10rpx; | |||||
| font-size: 26rpx; | |||||
| font-family: PingFang-SC-Bold; | |||||
| color: rgba(153, 153, 153, 1); | |||||
| } | |||||
| .content>view:nth-of-type(2n+1) { | |||||
| float: left; | |||||
| width: 78%; | |||||
| } | |||||
| .content>view:nth-of-type(2n) { | |||||
| width: 20%; | |||||
| float: right; | |||||
| text-align: right; | |||||
| line-height: 145rpx; | |||||
| } | |||||
| .title { | |||||
| display: block; | |||||
| text-align: center; | |||||
| font-size: 30rpx; | |||||
| font-family: PingFang-SC-Regular; | |||||
| font-weight: 400; | |||||
| color: rgba(51, 51, 51, 1); | |||||
| } | |||||
| .fr text{ | |||||
| color: #FF3535; | |||||
| } | |||||
| @@ -38,7 +38,7 @@ Page({ | |||||
| */ | */ | ||||
| gotograde:function(){ | gotograde:function(){ | ||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: '/pages/grade/grade', | |||||
| url: '/pages/czdetail/czdetail', | |||||
| }) | }) | ||||
| }, | }, | ||||
| // getrun:function(){ | // getrun:function(){ | ||||
| @@ -72,16 +72,6 @@ | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| </navigator> | </navigator> | ||||
| <!-- 显示兑换列表 --> | |||||
| <navigator url="/pages/grade/grade"> | |||||
| <view class="user-btn app-border-bottom"> | |||||
| <view> | |||||
| <image class='icons' src="{{giftUrl}}" mode='widthFix'></image>成长值规则</view> | |||||
| <view> | |||||
| <text class="iconfont icon-right"></text> | |||||
| </view> | |||||
| </view> | |||||
| </navigator> | |||||
| </view> | </view> | ||||
| <view class="margin"></view> | <view class="margin"></view> | ||||
| <!-- <button bindtap="navigateTo" class="user-out-btn">退出登陆</button> --> | <!-- <button bindtap="navigateTo" class="user-out-btn">退出登陆</button> --> | ||||