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