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.

385 lines
8.0 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<template>
<view>
<view class="orderBoxList">
<view class="orderBox">
<view class="orderBoxTitle flex-row">
<text class="orderBoxTitleTxt">预约信息</text>
</view>
<view class="orderBoxInfo flex-col">
<view class="orderBoxInfoRow flex-row" style="margin-bottom: 20rpx;">
<text class="iconfont icon-youkexuzhi"></text>
<text class="orderBoxInfoRowTxt">预约时间{{info.time||""}}</text>
</view>
<!-- <view class="orderBoxInfoRow flex-row" style="margin-bottom: 20rpx;">
<text class="iconfont icon-iconfontgerenzhongxin"></text>
<text class="orderBoxInfoRowTxt">车牌信息{{info.plate||""}}</text>
</view> -->
<view class="orderBoxInfoRow flex-row">
<text class="iconfont icon-iconfontgerenzhongxin"></text>
<text class="orderBoxInfoRowTxt">联系电话{{info.mobile||""}}</text>
</view>
</view>
<view class="orderBoxTime">
<text>下单时间{{info.created_at||""}}</text>
</view>
<view>
<view class='flex-row justify-between' style="margin: 20rpx;margin-bottom: 0;">
<text :style="info.status==1?'':'color:#828282'">{{info.plate||''}}</text>
<text v-if="info.status==1" style='color:#32950b'>{{info.status_name}}</text>
<text v-else style='color:#828282'>{{info.status_name}}</text>
</view>
</view>
<view style='text-align: center;'>
<view class="imgs">
<view :class="info.status!=1?'isuse':''">
<cover-image v-if="info.status==2" src="../../static/img/used.png" alt=""></cover-image>
<canvas canvas-id="qrcode" style="width: 170px;height:170px;margin: 0 auto;">
<cover-view v-if="showview">
</cover-view>
</canvas>
</view>
<!-- <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> -->
</view>
</view>
<view class="orderBoxTitle flex-row" style="margin-top: 20rpx;">
<text class="stars orderBoxTitleTxt">*</text>
<text class="orderBoxTitleTxt">停车须知</text>
</view>
<view class=" flex-row" style="margin-top: 20rpx;line-height: 2.3;">
<rich-text :nodes="notice.value" class="orderBoxInfoRowTxt"></rich-text>
</view>
</view>
</view>
</view>
</template>
<script>
import uQRCode from "@/utils/qrcode.js"
export default {
data() {
return {
info: {},
notice: {},
showview:false,
statusList: [{
name: '已取消',
idx: 0
}, {
name: '待完成',
idx: "1"
}, {
name: '已完成',
idx: "2"
}, {
name: '已过期',
idx: "3"
}]
}
},
onShareAppMessage() {
return this.util.shareInfo
},
onShareTimeline(){
return this.util.shareInfo
},
onLoad(options) {
let that = this;
this.loadConfigInfo();
if (!this.util.isNull(options.id)) {
that.loadInfo(options.id);
}
},
methods: {
qrFun: function(text, qrcode) {
var id = "qrcode";
if (qrcode) {
id = qrcode
}
uQRCode.make({
canvasId: id,
componentInstance: this,
text: text,
size: 170,
// margin: 10,
backgroundColor: '#ffffff',
foregroundColor: '#000000',
fileType: 'jpg',
errorCorrectLevel: uQRCode.errorCorrectLevel.H,
success: res => {
}
})
},
loadConfigInfo() {
var that = this;
this.util.request({
api: '/api/mobile/other/config-show',
data: {
tag: "car_park_notice"
},
utilSuccess: function(res) {
that.notice = res;
},
utilFail: function(res) {
uni.showToast({
icon: "none",
title: res,
duration: 2000
})
}
})
},
loadInfo(id) {
var that = this;
this.util.request({
api: '/api/mobile/user/my-carpark-order-show',
data: {
id: id
},
utilSuccess: function(res) {
// if (res.visit_order) {
// res.time = res.visit_order.date + " " + res.visit_order.time;
// } else {
// if (res.activity_order) {
// res.time = that.$moment(res.activity_order.activity.start_time).format(
// "YYYY-MM-DD HH:mm")+""+that.$moment(res.activity_order.activity.end_time).format(
// "HH:mm");
// //res.time = res.activity_order.date + " " + res.activity_order.time;
// }
// }
that.statusList.map(item=>{
if(item.idx==res.status){
res.status_name = item.name
}
})
that.qrFun(res.code);
setTimeout(function() {
that.showview = true
}, 500)
that.info = res;
},
utilFail: function(res) {
uni.showToast({
icon: "none",
title: res,
duration: 2000
})
}
})
}
}
}
</script>
<style>
.orderBoxFooter {
padding: 20rpx 0 0 0;
}
.fbtn {
background: #cf995a;
border-radius: 8rpx;
font-size: 24rpx;
color: #FFFFFF;
padding: 7rpx 17rpx;
}
.cancel {
background: #F7F6F4;
color: #828282;
}
.iconfont {
color: #6EAC97;
margin-right: 20rpx;
font-size: 24rpx;
}
.infotop {
background: #FFFFFF;
box-shadow: 2rpx 3rpx 10rpx 0px rgba(107, 94, 77, 0.3);
}
page {
background-color: #f7f6f4;
}
.orderBoxList {
padding: 26rpx;
box-sizing: border-box;
}
.orderBox {
min-height: 393rpx;
background: #FFFFFF;
border-radius: 16rpx;
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: #cf995a;
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 {
font-size: 24rpx;
font-family: PingFang SC;
color: #828282;
width:100%;
}
.orderBoxTime {
color: #CFCFCF;
padding: 23rpx 0;
border-bottom: 2rpx solid #F7F6F4;
font-size: 24rpx;
}
.p0 {
padding-top: 0
}
.ewmcode {
text-align: center;
font-size: 28rpx
}
.imgs {
margin: 30rpx 0 0rpx 0;
font-size: 0;
display: inline-block;
}
.imgs view {
position: relative;
display: inline-block;
margin-bottom: 20rpx;
box-shadow: 2px 2px 8rpx gray;
padding: 10rpx;
background: #fff;
}
.imgs cover-image {
position: absolute;
width: 200rpx;
height: 200rpx;
z-index: 999;
opacity: 1;
right: 0rpx;
bottom: 0rpx;
}
.imgs canvas {
display: inline-block;
vertical-align: middle;
}
.imgsname {
display: inline-block;
text-align: center;
margin-left: 15rpx;
}
.imgs text {
display: block;
/* margin-left: 40rpx; */
}
.imgs .isuse cover-view {
/* opacity: .4; */
background-color: rgba(255, 255, 255, 0.6);
width: 170px;
height: 170px;
}
.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: #cf995a;
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: #cf995a;
margin-right: 12rpx
}
</style>