Commit be41af7a104dd67f28705e816b00ab5455cf1845

Authored by pengye
1 parent c84d6698

付款页券列表、提示显示不完整

... ... @@ -19,6 +19,7 @@ Page({
},
sid: '', //扫码进入带的参数商家id
couponModal: '',
myToast:'',
/**
* 生命周期函数--监听页面加载
*/
... ... @@ -88,10 +89,10 @@ Page({
}
date.setHours(0, 0, 0, 0);
let newTimestamp = Math.floor(date.getTime() / 1000);
cdateText = util.unixtoTime(newTimestamp, 'YYYY-MM-DD HH:II')
cdateText = util.unixtoTime(newTimestamp, 'YYYY-MM-DD')
detail.cdateText = cdateText;
if (detail.aexpiration == '0' || detail.aexpiration == '') {
edateText = util.unixtoTime(detail.etime, 'YYYY-MM-DD HH:II')
edateText = util.unixtoTime(detail.etime, 'YYYY-MM-DD')
detail.deadlineDate = detail.etime
} else {
let time = new Date(detail.cdate * 1000);
... ... @@ -99,7 +100,7 @@ Page({
time.setHours(23, 59, 0, 0);
let deadlineDate = Math.floor(time.getTime() / 1000);
detail.deadlineDate = deadlineDate
edateText = util.unixtoTime(deadlineDate, 'YYYY-MM-DD HH:II')
edateText = util.unixtoTime(deadlineDate, 'YYYY-MM-DD')
}
detail.endDateStr = cdateText + '至' + edateText
})
... ... @@ -231,7 +232,7 @@ Page({
})
},
// 付款
confirmPayment() {
confirmPayment: util.throttle(function () {
let that = this;
let actualPrice = this.data.actualPrice
if (actualPrice <= 0) {
... ... @@ -270,30 +271,19 @@ Page({
})
that.getCoupon()
console.log('支付成功', ress);
return wx.showToast({
title: '支付成功',
duration: 1000,
icon: 'none',
})
return that.myToast.showToast('支付成功', 2000)
}
console.log('支付失败', ress);
wx.showToast({
title: '支付失败,请重新下单',
duration: 1000,
})
return that.myToast.showToast('支付失败,请重新下单', 2000)
},
fail(ress) {
console.log('支付失败', ress);
wx.showToast({
title: '支付失败,请重新下单',
duration: 1000,
icon: 'none',
})
return that.myToast.showToast('支付失败,请重新下单', 2000)
},
})
}
})
},
},3000),
// 核销所勾选的券
writeOff() {
console.log('勾选的券', this.data.finalList);
... ... @@ -715,7 +705,7 @@ Page({
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
this.myToast = this.selectComponent("#myToast")
},
/**
... ...
... ... @@ -3,6 +3,7 @@
"navigationBarTextStyle": "black",
"usingComponents": {
"nav": "/components/nav/nav",
"my-modal": "/components/modal/modal"
"my-modal": "/components/modal/modal",
"toast": "/components/toast/index"
}
}
\ No newline at end of file
... ...
... ... @@ -23,13 +23,14 @@
</view>
<view class="payBtn font32r" bindtap="confirmPayment">付款</view>
</view>
<toast id="myToast"></toast>
<my-modal id="couponModal" fadeStyle="slideUp" height="{{couponArr.length > '3' ? '80%' : '60%'}}">
<view slot="modalName" class="titleModal">
<view class="couponTotal">所有优惠券</view>
<view bindtap="checkCertificate" class="btn font32r">确认选择</view>
</view>
<view slot="modalContent">
<view class="couponBox">
<scroll-view class="couponBox" scroll-y="true">
<checkbox-group bindchange="checkboxChange">
<view wx:for="{{couponArr}}" class="couponItems {{item.showCpupon == '0' ? 'couponNo' : ''}}">
<view class="itemLeft">
... ... @@ -57,6 +58,6 @@
<checkbox disabled="{{item.showCpupon == '0'}}" value="{{item.activity_id}}" checked="{{item.checked}}" />
</view>
</checkbox-group>
</view>
</scroll-view>
</view>
</my-modal>
\ No newline at end of file
... ...
... ... @@ -236,7 +236,7 @@ checkbox::before {
}
.mymodal .mymodal-content {
height: 90% !important;
height: 80% !important;
}
.couponNo {
... ...