Commit c9d45ef534fcca33a8c6f186cdf05a5b9e2bb36d
1 parent
265d418c
商户券 有效期
Showing
1 changed file
with
16 additions
and
6 deletions
pages/businessCard/printCard.vue
| @@ -15,11 +15,12 @@ | @@ -15,11 +15,12 @@ | ||
| 15 | <image :src="qrUrl" style="width: 300px;height:300px;margin: 0 auto;" @longpress="savePosterPath(qrUrl)"></image> | 15 | <image :src="qrUrl" style="width: 300px;height:300px;margin: 0 auto;" @longpress="savePosterPath(qrUrl)"></image> |
| 16 | </view> | 16 | </view> |
| 17 | 17 | ||
| 18 | - <view>长按上面二维码可以保存为图片</view> | 18 | + <view style="padding: 5px 10px">长按上面二维码可以保存为图片</view> |
| 19 | 19 | ||
| 20 | <view class=" uni-card" style="padding: 10px 15px"> | 20 | <view class=" uni-card" style="padding: 10px 15px"> |
| 21 | - 二维码有效期(小时):(自打印时间算起) | ||
| 22 | - <uni-number-box @change="changeValue" min="1"/> | 21 | + <view style="padding-bottom: 10px;">选择二维码有效期</view> |
| 22 | + <!--<uni-number-box @change="changeValue" min="1"/>--> | ||
| 23 | + <uni-datetime-picker v-model="single" :start="startTime" /> | ||
| 23 | </view> | 24 | </view> |
| 24 | 25 | ||
| 25 | <view class="uni-padding-wrap uni-common-mt"> | 26 | <view class="uni-padding-wrap uni-common-mt"> |
| @@ -43,8 +44,10 @@ export default { | @@ -43,8 +44,10 @@ export default { | ||
| 43 | cardNum: '', // 库存 | 44 | cardNum: '', // 库存 |
| 44 | cardRelParkNo: '',//商券规则关联车场和商户编码 | 45 | cardRelParkNo: '',//商券规则关联车场和商户编码 |
| 45 | numberValue: '1', | 46 | numberValue: '1', |
| 46 | - hour: '9999999999999999999999', | 47 | + deadline: '2099-10-01 00:00:00', |
| 47 | qrUrl: '', // 图片地址 | 48 | qrUrl: '', // 图片地址 |
| 49 | + single: '', | ||
| 50 | + startTime:'' | ||
| 48 | } | 51 | } |
| 49 | }, | 52 | }, |
| 50 | onLoad(params) { | 53 | onLoad(params) { |
| @@ -64,6 +67,13 @@ export default { | @@ -64,6 +67,13 @@ export default { | ||
| 64 | onShow() { | 67 | onShow() { |
| 65 | var me = this; | 68 | var me = this; |
| 66 | }, | 69 | }, |
| 70 | + mounted() { | ||
| 71 | + setTimeout(() => { | ||
| 72 | + this.startTime = Date.now() | ||
| 73 | + this.single = Date.now() | ||
| 74 | + | ||
| 75 | + },500) | ||
| 76 | + }, | ||
| 67 | computed: {}, | 77 | computed: {}, |
| 68 | methods: { | 78 | methods: { |
| 69 | changeValue(value) { | 79 | changeValue(value) { |
| @@ -74,7 +84,7 @@ export default { | @@ -74,7 +84,7 @@ export default { | ||
| 74 | let paramsData = { | 84 | let paramsData = { |
| 75 | cardRelParkNo: this.cardRelParkNo, | 85 | cardRelParkNo: this.cardRelParkNo, |
| 76 | codeType: '2', | 86 | codeType: '2', |
| 77 | - hour: this.hour | 87 | + deadline: this.deadline |
| 78 | } | 88 | } |
| 79 | // 首页信息获取 接口 | 89 | // 首页信息获取 接口 |
| 80 | that.$myRequest({ | 90 | that.$myRequest({ |
| @@ -105,7 +115,7 @@ export default { | @@ -105,7 +115,7 @@ export default { | ||
| 105 | }) | 115 | }) |
| 106 | }, | 116 | }, |
| 107 | changeTime: function () { | 117 | changeTime: function () { |
| 108 | - this.hour = this.numberValue | 118 | + this.deadline = this.single |
| 109 | this.getCouponStaticQR() | 119 | this.getCouponStaticQR() |
| 110 | }, | 120 | }, |
| 111 | // 小程序保存图片 | 121 | // 小程序保存图片 |