|
|
|
|
@ -9,7 +9,8 @@
|
|
|
|
|
<view class="orderBoxInfo flex-col">
|
|
|
|
|
<view class="orderBoxInfoRow flex-row" style="margin-bottom: 20rpx;">
|
|
|
|
|
<text class="iconfont icon-youkexuzhi"></text>
|
|
|
|
|
<text class="orderBoxInfoRowTxt">订单信息:{{$u.timeFormat(new Date(info.activity.start_time), 'mm月dd日')}} {{getHm(info.activity.start_time)}}-{{getHm(info.activity.end_time)}}丨{{info.total}} 位观众</text>
|
|
|
|
|
<text
|
|
|
|
|
class="orderBoxInfoRowTxt">订单信息:{{$u.timeFormat(new Date(info.activity.start_time), 'mm月dd日')}} {{getHm(info.activity.start_time)}}-{{getHm(info.activity.end_time)}}丨{{info.total}}位观众</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="orderBoxInfoRow flex-row">
|
|
|
|
|
<text class="iconfont icon-iconfontgerenzhongxin"></text>
|
|
|
|
|
@ -34,7 +35,7 @@
|
|
|
|
|
<text>{{info.code}}</text>
|
|
|
|
|
<view>
|
|
|
|
|
<view :class="isuse?'imgs isuse':'imgs'">
|
|
|
|
|
<image :src="imgsrc" mode="aspectFill"></image>
|
|
|
|
|
<canvas canvas-id="qrcode" style="width: 300rpx;margin: 0 auto;" />
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<text class="ewminfo">{{isuse?'已使用':'请前往现场核销订单二维码'}}</text>
|
|
|
|
|
@ -45,7 +46,7 @@
|
|
|
|
|
<view class="orderBox">
|
|
|
|
|
<view class="orderBoxTitle flex-row" style="justify-content: space-between;">
|
|
|
|
|
<text class="orderBoxTitleTxt">观众信息</text>
|
|
|
|
|
<text :class="isuse?'share shareuse orderBoxInfoRowTxt':'share orderBoxInfoRowTxt'">
|
|
|
|
|
<text v-if="false" :class="isuse?'share shareuse orderBoxInfoRowTxt':'share orderBoxInfoRowTxt'">
|
|
|
|
|
分享二维码
|
|
|
|
|
</text>
|
|
|
|
|
</view>
|
|
|
|
|
@ -66,7 +67,7 @@
|
|
|
|
|
<view class="orderBoxList p0">
|
|
|
|
|
<view class="orderBoxTitle flex-row">
|
|
|
|
|
<text class="stars orderBoxTitleTxt">*</text>
|
|
|
|
|
<text class="orderBoxTitleTxt">参观须知</text>
|
|
|
|
|
<text class="orderBoxTitleTxt">参与须知</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="orderBoxTitle flex-row">
|
|
|
|
|
<text
|
|
|
|
|
@ -77,39 +78,32 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import uQRCode from "@/utils/qrcode.js"
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
info: {
|
|
|
|
|
isteam: true
|
|
|
|
|
},
|
|
|
|
|
imgsrc: 'https://cdn.uviewui.com/uview/album/1.jpg'
|
|
|
|
|
info: {}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onLoad(options) {
|
|
|
|
|
if (!this.util.isNull(options.id)) {
|
|
|
|
|
this.loadInfo(options.id);
|
|
|
|
|
this.loadQR(options.id);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
loadQR(id) {
|
|
|
|
|
qrFun: function(text) {
|
|
|
|
|
uQRCode.make({
|
|
|
|
|
canvasId: 'qrcode',
|
|
|
|
|
componentInstance: this,
|
|
|
|
|
text: text,
|
|
|
|
|
size: 150,
|
|
|
|
|
margin: 0,
|
|
|
|
|
backgroundColor: '#ffffff',
|
|
|
|
|
foregroundColor: '#000000',
|
|
|
|
|
fileType: 'jpg',
|
|
|
|
|
errorCorrectLevel: uQRCode.errorCorrectLevel.H,
|
|
|
|
|
success: res => {
|
|
|
|
|
|
|
|
|
|
var that = this;
|
|
|
|
|
this.util.request({
|
|
|
|
|
api: '/api/mobile/activity/person-qrcode',
|
|
|
|
|
data: {
|
|
|
|
|
id: id
|
|
|
|
|
},
|
|
|
|
|
utilSuccess: function(res) {
|
|
|
|
|
//that.info = res;
|
|
|
|
|
console.log(res)
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(res) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: "none",
|
|
|
|
|
title: res
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
@ -122,6 +116,7 @@
|
|
|
|
|
},
|
|
|
|
|
utilSuccess: function(res) {
|
|
|
|
|
that.info = res;
|
|
|
|
|
that.qrFun(res.code);
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(res) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
@ -130,11 +125,11 @@
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getHm(val){
|
|
|
|
|
if(val){
|
|
|
|
|
return val.substring(11,val.length)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getHm(val) {
|
|
|
|
|
if (val) {
|
|
|
|
|
return this.$moment(val).format("hh:MM")
|
|
|
|
|
} else return "";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|