jiazhipeng 1 year ago
parent
commit
0e212e5657
  1. 13
      subPackages/order/detail.vue

13
subPackages/order/detail.vue

@ -19,14 +19,14 @@
<!-- 景点美食二维码 --> <!-- 景点美食二维码 -->
<view v-if="isQrcode" style="margin-top: -66rpx;"> <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" <swiper class="qrcode-box" :circular="false" previous-margin="120rpx" next-margin="120rpx" :duration="800"
:current="current" @change="swiperChange"> :current="current" @change="swiperChange">
<swiper-item v-for="(item, index) in info.order_child" :key="index" class="flex-center"> <swiper-item v-for="(item, index) in info.order_child" :key="index" class="flex-center">
<view class="qrcode-item flex-column"> <view class="qrcode-item flex-column">
<view class="qrcode-title">{{item.specifications_name}}</view> <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" <canvas :id="'qrcodeT'+index" :canvas-id="'qrcodeT'+index"
style="width:150px;height:150px;z-index: -20;bottom: -500px;position: absolute;"></canvas> style="width:150px;height:150px;z-index: -20;bottom: -500px;position: absolute;"></canvas>
<view class="qrcode-subtitle">核销码:{{item.child_id}}</view> <view class="qrcode-subtitle">核销码:{{item.child_id}}</view>
@ -247,7 +247,7 @@
{{info.order_child[0].goods_data.address}} {{info.order_child[0].goods_data.address}}
</view> </view>
<view class="shop-subtitle" v-if="info.order_child[0].goods_data.distance"> <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> </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'] if (['PAYMENT_SUCCESSFULLY', 'WAIT_REFUND', 'REFUND_SUCCESS', 'WAIT_COMMENT', 'COMPLETED']
.includes(this.info.status)) { .includes(this.info.status)) {
this.isQrcode = true this.isQrcode = true
@ -490,7 +490,6 @@
}, },
// //
getCodeImg(code, index) { getCodeImg(code, index) {
console.log(code)
new QRCode('qrcodeT' + index, { new QRCode('qrcodeT' + index, {
text: code, text: code,
width: 150, width: 150,
@ -498,9 +497,8 @@
padding: 2, padding: 2,
colorDark: 'rgb(0,0,0)', colorDark: 'rgb(0,0,0)',
colorLight: 'rgb(255,255,255)', colorLight: 'rgb(255,255,255)',
correctLevel: QRCode.CorrectLevel.H, // correctLevel: QRCode.CorrectLevel.M, //
callback: res => { callback: res => {
console.log(res)
this.$set(this.info.order_child[index], 'qrcodeimg', res.path); this.$set(this.info.order_child[index], 'qrcodeimg', res.path);
this.$forceUpdate(); this.$forceUpdate();
} }
@ -762,7 +760,6 @@
image { image {
width: 300rpx; width: 300rpx;
height: 300rpx; height: 300rpx;
border-radius: 10rpx;
} }
.qrcode-title { .qrcode-title {

Loading…
Cancel
Save