| @@ -3,7 +3,7 @@ | |||||
| <view class='head'> | <view class='head'> | ||||
| <view class='titles'>{{cardDetail.title}}</view> | <view class='titles'>{{cardDetail.title}}</view> | ||||
| <view class='titles clearfix'> | <view class='titles clearfix'> | ||||
| <text class='fl'>{{cardDetail.expiredTime}}</text> | |||||
| <text class='fl'>有效期:{{cardDetail.expiredTime}}</text> | |||||
| <text class='fr'>余额:¥{{cardDetail.remainingAmount/100}}</text> | <text class='fr'>余额:¥{{cardDetail.remainingAmount/100}}</text> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| @@ -39,7 +39,7 @@ | |||||
| </view> | </view> | ||||
| <view class='record clearfix record2'> | <view class='record clearfix record2'> | ||||
| <text>{{item.updateDate}}</text> | <text>{{item.updateDate}}</text> | ||||
| <text>余额{{item.cardRemainAmount/100}}元</text> | |||||
| <text>余额:{{item.cardRemainAmount/100}}元</text> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| @@ -46,7 +46,7 @@ Page({ | |||||
| wx.scanCode({ | wx.scanCode({ | ||||
| success: (res) => { | success: (res) => { | ||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: `/pages/scanPay/scanPay?merChant=${res.result}&cardid=${e.currentTarget.dataset.cardid}&remainingAmount=${e.currentTarget.dataset.remainingamount}`, | |||||
| url: `/pages/scanPay/scanPay?merChant=${res.result}&cardid=${e.currentTarget.dataset.cardid}&cardRemainRealAmount=${e.currentTarget.dataset.cardRemainRealAmount}`, | |||||
| }) | }) | ||||
| }, | }, | ||||
| fail: (res) => { | fail: (res) => { | ||||
| @@ -21,6 +21,7 @@ Page({ | |||||
| havePlayEd: app.globalData.havePlayEd, | havePlayEd: app.globalData.havePlayEd, | ||||
| staticGamedata: {}, | staticGamedata: {}, | ||||
| showIf: false, | showIf: false, | ||||
| discountEnable:false, | |||||
| page: 1 // 刷新进入页面时已经加载了第一页数据,onReachBottom时 page++,从第2页开始加载 | page: 1 // 刷新进入页面时已经加载了第一页数据,onReachBottom时 page++,从第2页开始加载 | ||||
| }, | }, | ||||
| gotodiscountCardList:function(){ | gotodiscountCardList:function(){ | ||||
| @@ -33,6 +34,26 @@ Page({ | |||||
| url: '/pages/rushToBuy/index', | url: '/pages/rushToBuy/index', | ||||
| }) | }) | ||||
| }, | }, | ||||
| showSpecial:function(){ | |||||
| let that = this; | |||||
| Http.get({ | |||||
| url: config.api.scoreLevelInfo, | |||||
| data: {} | |||||
| }) | |||||
| .then(res => { | |||||
| // if true 则开启特享礼遇 | |||||
| if (res.data.discountEnable) { | |||||
| that.setData({ | |||||
| discountEnable: true | |||||
| }) | |||||
| } | |||||
| else { | |||||
| that.setData({ | |||||
| discountEnable: false | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| qrcode: function (e) { | qrcode: function (e) { | ||||
| var that = this; | var that = this; | ||||
| that.setData({ | that.setData({ | ||||
| @@ -291,6 +312,7 @@ Page({ | |||||
| } | } | ||||
| Http.setToken(res.data.token); | Http.setToken(res.data.token); | ||||
| that.checkUserCarStatus(); | that.checkUserCarStatus(); | ||||
| that.showSpecial(); | |||||
| that.getUserInfo(); | that.getUserInfo(); | ||||
| that.getBannerlist(); | that.getBannerlist(); | ||||
| if (app.couponChannelListCallback) { | if (app.couponChannelListCallback) { | ||||
| @@ -29,6 +29,6 @@ | |||||
| <view class="canvas-box"> | <view class="canvas-box"> | ||||
| <text class='memberIds'>{{levelName}}</text> | <text class='memberIds'>{{levelName}}</text> | ||||
| <canvas hidden="{{canvasHidden}}" style="width:500rpx;height:460rpx;background:0 0 0 .6;margin:-10rpx auto;overflow:hidden" canvas-id="mycanvas2" /> | <canvas hidden="{{canvasHidden}}" style="width:500rpx;height:460rpx;background:0 0 0 .6;margin:-10rpx auto;overflow:hidden" canvas-id="mycanvas2" /> | ||||
| <button class='button' bindtap='mySpecial'>专享折扣</button> | |||||
| <button class='button' bindtap='mySpecial' wx:if="{{discountEnable}}">专享折扣</button> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| @@ -50,6 +50,7 @@ page { | |||||
| .section >view image { | .section >view image { | ||||
| width: 73rpx; | width: 73rpx; | ||||
| height: 74rpx; | height: 74rpx; | ||||
| margin-bottom: 14rpx; | |||||
| } | } | ||||
| .section text { | .section text { | ||||
| height: 23rpx; | height: 23rpx; | ||||
| @@ -87,16 +88,15 @@ page { | |||||
| .canvas-box { | .canvas-box { | ||||
| position: fixed; | position: fixed; | ||||
| width: 500rpx; | width: 500rpx; | ||||
| height: 671rpx; | |||||
| overflow: hidden; | overflow: hidden; | ||||
| left: 0; | left: 0; | ||||
| top: 0; | |||||
| bottom: 0; | |||||
| top: 200rpx; | |||||
| right: 0; | right: 0; | ||||
| margin: auto; | margin: auto; | ||||
| background: #fff; | background: #fff; | ||||
| border-radius: 16rpx; | border-radius: 16rpx; | ||||
| z-index:100; | z-index:100; | ||||
| padding-bottom: 50rpx; | |||||
| } | } | ||||
| .showQrcode text { | .showQrcode text { | ||||