|
|
@ -19,14 +19,14 @@ |
|
|
|
|
|
|
|
<!-- 景点、美食二维码 --> |
|
|
|
<view v-if="isQrcode" style="margin-top: -66rpx;"> |
|
|
|
<view class="qrcode-remain">还剩<span>{{remainNum}}</span>张未核销</view> |
|
|
|
<view class="qrcode-remain" v-if="!info.order_child[0].extract_id">还剩<span>{{remainNum}}</span>张未核销</view> |
|
|
|
|
|
|
|
<swiper class="qrcode-box" :circular="false" previous-margin="120rpx" next-margin="120rpx" :duration="800" |
|
|
|
:current="current" @change="swiperChange"> |
|
|
|
<swiper-item v-for="(item, index) in info.order_child" :key="index" class="flex-center"> |
|
|
|
<view class="qrcode-item flex-column"> |
|
|
|
<view class="qrcode-title">{{item.specifications_name}}</view> |
|
|
|
<image :src="showImg(item.qrcodeimg)" mode="aspectFill"></image> |
|
|
|
<image :src="item.qrcodeimg" style="width: 300rpx;height: 300rpx;" mode="aspectFill"></image> |
|
|
|
<canvas :id="'qrcodeT'+index" :canvas-id="'qrcodeT'+index" |
|
|
|
style="width:150px;height:150px;z-index: -20;bottom: -500px;position: absolute;"></canvas> |
|
|
|
<view class="qrcode-subtitle">核销码:{{item.child_id}}</view> |
|
|
@ -247,7 +247,7 @@ |
|
|
|
{{info.order_child[0].goods_data.address}} |
|
|
|
</view> |
|
|
|
<view class="shop-subtitle" v-if="info.order_child[0].goods_data.distance"> |
|
|
|
距您约{{info.order_child[0].goods_data.distance > 1000 ? info.order_child[0].goods_data.distance / 1000 + 'km' : info.order_child[0].goods_data.distance + 'm'}} |
|
|
|
距您约{{info.order_child[0].goods_data.distance > 1000 ? (info.order_child[0].goods_data.distance / 1000).toFixed(2) + 'km' : info.order_child[0].goods_data.distance + 'm'}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -461,7 +461,7 @@ |
|
|
|
} |
|
|
|
|
|
|
|
// 景点、美食二维码 |
|
|
|
if (['ticket', 'food'].includes(this.info.order_child[0].goods_genre)) { |
|
|
|
if (['ticket', 'food'].includes(this.info.order_child[0].goods_genre) || (this.info.order_child[0].contact_id && this.info.order_child[0].extract_id)) { |
|
|
|
if (['PAYMENT_SUCCESSFULLY', 'WAIT_REFUND', 'REFUND_SUCCESS', 'WAIT_COMMENT', 'COMPLETED'] |
|
|
|
.includes(this.info.status)) { |
|
|
|
this.isQrcode = true |
|
|
@ -490,7 +490,6 @@ |
|
|
|
}, |
|
|
|
// 生成二维码 |
|
|
|
getCodeImg(code, index) { |
|
|
|
console.log(code) |
|
|
|
new QRCode('qrcodeT' + index, { |
|
|
|
text: code, |
|
|
|
width: 150, |
|
|
@ -498,9 +497,8 @@ |
|
|
|
padding: 2, |
|
|
|
colorDark: 'rgb(0,0,0)', |
|
|
|
colorLight: 'rgb(255,255,255)', |
|
|
|
correctLevel: QRCode.CorrectLevel.H, // 二维码可辨识度 |
|
|
|
correctLevel: QRCode.CorrectLevel.M, // 二维码可辨识度 |
|
|
|
callback: res => { |
|
|
|
console.log(res) |
|
|
|
this.$set(this.info.order_child[index], 'qrcodeimg', res.path); |
|
|
|
this.$forceUpdate(); |
|
|
|
} |
|
|
@ -762,7 +760,6 @@ |
|
|
|
image { |
|
|
|
width: 300rpx; |
|
|
|
height: 300rpx; |
|
|
|
border-radius: 10rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.qrcode-title { |
|
|
|