Browse Source

upload

newCard
HolyKnightIX 2 years ago
parent
commit
9d75be2d6a
6 changed files with 32 additions and 10 deletions
  1. +1
    -1
      pages/ConsumeDetail/ConsumeDetail.js
  2. +7
    -4
      pages/ConsumeDetail/ConsumeDetail.wxml
  3. +7
    -3
      pages/cardorder/cardUse/cardUse.js
  4. +1
    -0
      pages/cardorder/cardUse/cardUse.json
  5. +15
    -2
      pages/cardorder/index/index.js
  6. +1
    -0
      pages/cardorder/index/index.json

+ 1
- 1
pages/ConsumeDetail/ConsumeDetail.js View File

@@ -136,7 +136,7 @@ Page({
let that = this; let that = this;


if (options.cardId) { if (options.cardId) {
that.cardpayList(options.cardId);
// that.cardpayList(options.cardId);
that.cardDetail(options.cardId); that.cardDetail(options.cardId);
} }




+ 7
- 4
pages/ConsumeDetail/ConsumeDetail.wxml View File

@@ -6,7 +6,8 @@
<view class='titles clearfix'> <view class='titles clearfix'>
<text class='fl'>有效期:{{cardDetail.expiredTime}}</text> <text class='fl'>有效期:{{cardDetail.expiredTime}}</text>
<view class='fr'>余额: <view class='fr'>余额:
<text>{{cardDetail.remainingAmount/100}}</text>元</view>
<text>{{cardDetail.remainingAmount/100}}</text>元
</view>
</view> </view>
</view> </view>
<text class='title'>适用门店</text> <text class='title'>适用门店</text>
@@ -24,7 +25,7 @@
</view> </view>
<view class='bottom' bindtap='more' wx:if="{{showMore}}">{{more}}</view> <view class='bottom' bindtap='more' wx:if="{{showMore}}">{{more}}</view>
<text class='title' wx:if="{{supportTransfer!=1}}">交易记录</text> <text class='title' wx:if="{{supportTransfer!=1}}">交易记录</text>
<view wx:for="{{data}}" wx:key="index" class='list'>
<!-- <view wx:for="{{data}}" wx:key="index" class='list'>
<view class='record clearfix record1'> <view class='record clearfix record1'>
<text class='fl'>{{item.merchantName}}</text> <text class='fl'>{{item.merchantName}}</text>
<text class='fr'>-{{item.deductionAmount/100}}元</text> <text class='fr'>-{{item.deductionAmount/100}}元</text>
@@ -33,13 +34,15 @@
<text class='fl'>{{item.updateDate}}</text> <text class='fl'>{{item.updateDate}}</text>
<text class='fr'>余 {{item.cardRemainAmount/100}}元</text> <text class='fr'>余 {{item.cardRemainAmount/100}}元</text>
</view> </view>
</view>
</view> -->
<view class="dingdan" wx:if="{{data.length==0&&supportTransfer!=1}}"> <view class="dingdan" wx:if="{{data.length==0&&supportTransfer!=1}}">
<image src="{{dingdanUrl}}" mode="widthFix"></image> <image src="{{dingdanUrl}}" mode="widthFix"></image>
<text>暂无交易明细</text> <text>暂无交易明细</text>
</view> </view>
<view class='share-bottom'> <view class='share-bottom'>
<!-- <button class='goback' wx:if="{{supportTransfer==1}}" bindtap='gotoIndex'><image src='{{home}}' mode="widthFix"></image></button> --> <!-- <button class='goback' wx:if="{{supportTransfer==1}}" bindtap='gotoIndex'><image src='{{home}}' mode="widthFix"></image></button> -->
<button type="primary" open-type="share" wx:if="{{supportTransfer==1}}" class='support-tansfer'><image src="{{weixinTitle}}" class='share' mode="widthFix"></image>转赠给微信好友</button>
<button type="primary" open-type="share" wx:if="{{supportTransfer==1}}" class='support-tansfer'>
<image src="{{weixinTitle}}" class='share' mode="widthFix"></image>转赠给微信好友
</button>
</view> </view>
</view> </view>

+ 7
- 3
pages/cardorder/cardUse/cardUse.js View File

@@ -22,7 +22,8 @@ Page({
tempFilePath: '', tempFilePath: '',
QRdata: {}, QRdata: {},
isShowQR: true, isShowQR: true,
showhieRq: false
showhieRq: false,
cardId: ''
}, },


cardDetail(couponOrderId) { cardDetail(couponOrderId) {
@@ -249,6 +250,9 @@ Page({
console.log(options); console.log(options);
if (options.cardId) { if (options.cardId) {
this.cardDetail(options.cardId); this.cardDetail(options.cardId);
this.setData({
cardId: options.cardId
})
} }
}, },


@@ -263,7 +267,7 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
this.cardDetail(this.data.cardId);
}, },


/** /**
@@ -284,7 +288,7 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() { onPullDownRefresh() {
this.cardDetail(this.data.cardId);
}, },


/** /**


+ 1
- 0
pages/cardorder/cardUse/cardUse.json View File

@@ -7,5 +7,6 @@
"shop": "../../../components/shop/shop" "shop": "../../../components/shop/shop"
}, },
"navigationBarTitleText": "使用消费卡", "navigationBarTitleText": "使用消费卡",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#F4F5F9" "navigationBarBackgroundColor": "#F4F5F9"
} }

+ 15
- 2
pages/cardorder/index/index.js View File

@@ -256,12 +256,25 @@ Page({
}); });
this.getList(detail.key, 1); this.getList(detail.key, 1);
}, },

onShow() {
const that = this;
this.getList(that.data.current_scroll, that.data.page);
},

onReachBottom: function () { onReachBottom: function () {
var that = this;
const that = this;
that.data.page++; that.data.page++;
that.setData({ that.setData({
page: that.data.page page: that.data.page
}); });
that.getList(that.data.current_scroll, that.data.page); that.getList(that.data.current_scroll, that.data.page);
}
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
const that = this;
this.getList(that.data.current_scroll, that.data.page);
},
}); });

+ 1
- 0
pages/cardorder/index/index.json View File

@@ -5,5 +5,6 @@
"navbar": "../../../components/navbar/navbar" "navbar": "../../../components/navbar/navbar"
}, },
"navigationBarTitleText": "我的卡包", "navigationBarTitleText": "我的卡包",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#F4F5F9" "navigationBarBackgroundColor": "#F4F5F9"
} }

Loading…
Cancel
Save