You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

413 lines
9.8 KiB

4 years ago
<template>
4 years ago
<view class="content_box">
4 years ago
<view class="orderBoxList">
<view class="orderBox">
<view class="orderBoxTitle flex-row">
<text class="orderBoxTitleTxt">{{info.type==1?"团队预约信息":"个人预约信息"}}</text>
</view>
<view class="orderBoxInfo flex-col">
4 years ago
<view class="orderBoxInfoRow flex-row">
4 years ago
<text class="iconfont icon-shijian"></text>
4 years ago
<text
4 years ago
class="orderBoxInfoRowTxt">活动时间{{timeFormat(info.activity.start_time, 'MM月DD日')}}{{getHm(info.activity.start_time)}}-{{getHm(info.activity.end_time)}}</text>
</view>
<view class="orderBoxInfoRow flex-row" style="margin-top: 20rpx;">
4 years ago
<text class="iconfont icon-renshu"></text>
<text class="orderBoxInfoRowTxt">活动人数{{info.total}}</text>
4 years ago
</view>
4 years ago
4 years ago
</view>
4 years ago
4 years ago
</view>
4 years ago
</view>
<view class="orderBoxTitle flex-row">
4 years ago
<text style="padding-top:25rpx" class="orderBoxTitleTxt">可扫活动码入场</text>
4 years ago
</view>
<view class="orderBoxList p0">
<view class="orderBox">
4 years ago
<view v-if="info.type==1" class="orderBoxInfo flex-col ewmcode">
4 years ago
<text>入场码{{info.code}}-0</text>
4 years ago
<view>
<view class="imgs" >
<view :class="info.status!=1?'isuse':''">
4 years ago
<cover-image v-if="info.status==2" src="../../static/img/used.png" alt=""></cover-image>
<!-- <img v-if="info.status!=1" src="../../static/img/used.png" alt=""> -->
4 years ago
<canvas canvas-id='qrcode' style="width: 170rpx;height:170rpx;margin: 0 auto;">
4 years ago
<cover-view v-if="showview">
</cover-view>
</canvas>
4 years ago
</view>
</view>
</view>
<!-- <text class="ewminfo">{{isuse?'已使用':'请前往现场核销订单二维码'}}</text> -->
</view>
<view v-if="info.type==2" class="orderBoxInfo flex-col ewmcode" :key='index' v-for="(item,index) in detailsinfo">
4 years ago
<text>入场码{{info.code}}-{{item.code}}</text>
4 years ago
<view>
<view class="imgs" >
<view :class="item.status!=1?'isuse':''">
4 years ago
<cover-image v-if="info.status==2" src="../../static/img/used.png" alt=""></cover-image>
<!-- <img v-if="item.status!=1" src="../../static/img/used.png" alt=""> -->
4 years ago
<canvas :canvas-id="'qrcode'+index" style="width: 170px;height:170px;margin: 0 auto;">
4 years ago
<cover-view v-if="showview">
</cover-view>
</canvas>
4 years ago
</view>
4 years ago
<view class="imgsname">
<text class="orderBoxTitleTxt">{{item.name}}</text>
<text class="orderBoxTitleTxt" style="font-size: 28rpx;" v-if="item.is_open==1">
可使用身份证
</text>
<text style="font-size: 28rpx;" class="orderBoxTitleTxt" v-if="item.is_open==0">
不可使用身份证
</text>
</view>
4 years ago
</view>
</view>
<!-- <text class="ewminfo">{{isuse?'已使用':'请前往现场核销订单二维码'}}</text> -->
4 years ago
</view>
</view>
4 years ago
</view>
<view style="padding-bottom:25rpx">
4 years ago
<view class="orderBoxInfoRow flex-row" style="margin-top: 25rpx;">
4 years ago
<!-- <text class="iconfont icon-iconfontgerenzhongxin"></text> -->
4 years ago
<text v-if="info.type==1" class="orderBoxInfoRowTxt">{{info.leader||""}} {{info.mobile||""}}</text>
<text v-if="info.type==2" class="orderBoxInfoRowTxt">{{info.mobile||""}}</text>
4 years ago
</view>
<view class="orderBoxInfoRow flex-row" v-if="info.type==1" style="margin-top: 20rpx;">
<!-- <text class="iconfont icon-danwei"></text> -->
<text class="orderBoxInfoRowTxt">单位名称{{info.unit||""}}</text>
</view>
<view class="orderBoxInfoRow flex-row" style="margin-top: 20rpx;margin-bottom: 20rpx;">
<text class="orderBoxInfoRowTxt">下单时间{{info.created_at||""}}</text>
</view>
4 years ago
</view>
4 years ago
<!-- <view class="orderBoxList p0">
4 years ago
<view class="orderBox">
<view class="orderBoxTitle flex-row" style="justify-content: space-between;">
4 years ago
<text class="orderBoxTitleTxt">参与人员信息</text>
4 years ago
<text v-if="false" :class="isuse?'share shareuse orderBoxInfoRowTxt':'share orderBoxInfoRowTxt'">
4 years ago
分享二维码
</text>
</view>
<view class="orderBoxInfo flex-col">
<view class="orderBoxInfoRow flex-row" style="margin-bottom: 20rpx;"
v-for="(item,index) in info.details">
<view>
<text class="iconfont icon-iconfontgerenzhongxin iconinfo"></text>
</view>
<view class="usercard">
<text class="orderBoxInfoRowTxt">{{item.name}}</text>
<text class="orderBoxInfoRowTxt">{{item.idcard}}</text>
</view>
</view>
</view>
</view>
4 years ago
</view> -->
4 years ago
</view>
</template>
<script>
4 years ago
import uQRCode from "@/utils/qrcode.js"
4 years ago
export default {
data() {
return {
4 years ago
info: {},
4 years ago
detailsinfo:[],
showview:false,
optionid:"",
4 years ago
timers:"",
isused:false,
4 years ago
}
},
onLoad(options) {
4 years ago
if (!this.util.isNull(options.id)) {
this.optionid = options.id
4 years ago
this.loadInfo(options.id);
4 years ago
}
4 years ago
},
onShow() {
var that = this
4 years ago
this.timers = setInterval(function(){
that.loadInfo(that.optionid);
4 years ago
},4000)
4 years ago
},
onHide() {
clearInterval(this.timers)
},
onUnload() {
clearInterval(this.timers)
4 years ago
},
methods: {
4 years ago
qrFun: function(text,qrcode) {
var id = "qrcode";
if(qrcode){
id = qrcode
}
4 years ago
uQRCode.make({
4 years ago
canvasId: id,
4 years ago
componentInstance: this,
text: text,
4 years ago
size: 170,
4 years ago
// margin: 10,
4 years ago
backgroundColor: '#ffffff',
foregroundColor: '#000000',
fileType: 'jpg',
errorCorrectLevel: uQRCode.errorCorrectLevel.H,
success: res => {
4 years ago
}
})
},
loadInfo(id) {
var that = this;
this.util.request({
api: '/api/mobile/user/my-activity-order-show',
data: {
id: id
},
utilSuccess: function(res) {
4 years ago
that.info = res;
that.detailsinfo = res.details;
4 years ago
if(res.status!=1){
clearInterval(that.timers)
}
4 years ago
if(res.type==1){
that.qrFun(res.code+"-"+"0");
4 years ago
setTimeout(function(){
that.showview = true
},500)
4 years ago
}
if(res.type==2){
for(var i=0;i<res.details.length;i++){
that.qrFun(res.code+"-"+res.details[i].code,'qrcode'+i);
4 years ago
4 years ago
}
4 years ago
setTimeout(function(){
that.showview = true
},500)
4 years ago
}
4 years ago
},
utilFail: function(res) {
uni.showToast({
icon: "none",
title: res
})
}
})
4 years ago
},
getHm(val) {
if (val) {
return this.$moment(val).format("hh:MM")
} else return "";
4 years ago
},
timeFormat(time, format) {
return this.$moment(time).format(format)
4 years ago
}
}
}
</script>
<style>
4 years ago
.content_box {
4 years ago
/* background: #FFFFFF; */
4 years ago
border-radius: 16rpx;
margin: 30rpx 27rpx;
}
4 years ago
.orderBoxFooter {
padding: 20rpx 0 0 0;
}
.fbtn {
background: #EF9525;
border-radius: 8rpx;
font-size: 24rpx;
color: #FFFFFF;
padding: 7rpx 17rpx;
}
.cancel {
background: #F7F6F4;
color: #828282;
}
.iconfont {
color: #6EAC97;
margin-right: 20rpx;
4 years ago
font-size: 35rpx;
4 years ago
}
.infotop {
background: #FFFFFF;
box-shadow: 2rpx 3rpx 10rpx 0px rgba(107, 94, 77, 0.3);
}
page {
background-color: #f7f6f4;
}
.orderBoxList {
padding: 26rpx;
4 years ago
box-sizing: border-box;
background: #fff;
border-radius: 20rpx;
4 years ago
}
.orderBox {
box-sizing: border-box;
padding: 29rpx 18rpx;
position: relative;
margin-bottom: 17rpx;
}
.orderBoxTitle {
padding: 0rpx 0rpx 25rpx 0rpx;
border-bottom: 2rpx solid #F7F6F4;
}
.orderBoxInfoRow {
align-items: center;
}
.orderBoxTitleTxt {
font-size: 32rpx;
color: #351C1B;
}
.orderBoxStatus {
background: #EF9525;
border-top-right-radius: 16rpx;
border-bottom-left-radius: 16rpx;
font-size: 24rpx;
padding: 19rpx 23rpx 17rpx 23rpx;
color: #FFFFFF;
position: absolute;
right: 0;
top: 0;
}
.orderBoxInfo {
padding: 29rpx 0rpx;
border-bottom: 2rpx solid #F7F6F4;
}
.orderBoxInfoRowTxt {
4 years ago
font-size: 30rpx!important;
4 years ago
font-family: PingFang SC;
color: #828282;
}
.orderBoxTime {
color: #CFCFCF;
padding: 23rpx 0;
border-bottom: 2rpx solid #F7F6F4;
font-size: 24rpx;
}
.p0 {
4 years ago
padding-top: 0;
border-left:32rpx solid #ef9525
4 years ago
}
.ewmcode {
text-align: center;
4 years ago
font-size: 28rpx;
text-align: left;
4 years ago
font-size: 28rpx;
margin-left: 18rpx;
padding-bottom:0;
4 years ago
}
.imgs {
4 years ago
margin: 30rpx 0 0rpx 0;
4 years ago
font-size: 0;
display: inline-block;
4 years ago
}
4 years ago
4 years ago
.imgs view{
position: relative;
display: inline-block;
4 years ago
margin-bottom: 20rpx;
4 years ago
}
4 years ago
.imgs cover-image {
4 years ago
position: absolute;
4 years ago
width: 200rpx;
height: 200rpx;
4 years ago
z-index: 999;
opacity: 1;
4 years ago
right: 0rpx;
bottom: 0rpx;
4 years ago
}
.imgs canvas{
display: inline-block;
vertical-align: middle;
}
4 years ago
.imgsname{
display: inline-block;
text-align: center;
margin-left: 15rpx;
}
4 years ago
.imgs text{
4 years ago
display: block;
/* margin-left: 40rpx; */
4 years ago
}
4 years ago
.imgs .isuse cover-view{
/* opacity: .4; */
background-color: rgba(255,255,255,0.6);
4 years ago
width: 170px;
height:170px;
4 years ago
}
.ewminfo {
color: #828282;
font-size: 24rpx;
}
.iconinfo {
font-size: 35rpx;
}
.usercard text {
display: block;
}
.share {
background: url(../../static/img/share.png) no-repeat left center;
background-size: 21rpx;
background-color: #EF9525;
background-position: 18rpx;
padding: 7rpx 20rpx;
padding-left: 46rpx;
border-radius: 10px;
color: #fff;
}
.shareuse {
background: url(../../static/img/share_used.png) no-repeat left center;
background-color: #F7F6F4;
color: #828282;
background-position: 18rpx;
background-size: 21rpx;
}
.stars {
color: #EF9525;
margin-right: 12rpx
}
4 years ago
</style>