|
|
|
@ -1,11 +1,11 @@ |
|
|
|
|
<template> |
|
|
|
|
<view class="m-content"> |
|
|
|
|
<uni-nav-bar color="#fff" :fixed="true" :border="false" class="m-nav-bar" status-bar left-icon="left" left-text="" title="扫码检票" @clickLeft="back" /> |
|
|
|
|
<view class="m-ticket-status" v-if="checkInfo!=null"> |
|
|
|
|
<view class="m-ticket-status" v-if="checkInfo!=null&&!load"> |
|
|
|
|
<view class="m-head-bg"> |
|
|
|
|
<view class="m-head-content used" :class="checkInfo.ticketCheckedNums == checkInfo.ticketChecksNums?'used':'success'"> |
|
|
|
|
<view class="m-head-content" :class="checkInfo.ticketCheckedNums > checkInfo.ticketChecksNums?'used':'success'"> |
|
|
|
|
<!-- <img class="success" src="/static/images/index/success.png" alt="" /> --> |
|
|
|
|
<span>{{checkInfo.ticketCheckedNums == checkInfo.ticketChecksNums?'已使用':'检票成功'}}</span> |
|
|
|
|
<span>{{checkInfo.ticketCheckedNums > checkInfo.ticketChecksNums?'已使用':'检票成功'}}</span> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="m-ticket-out"> |
|
|
|
@ -33,7 +33,7 @@ |
|
|
|
|
</view> |
|
|
|
|
<view class="m-inf-row"> |
|
|
|
|
<view class="m-row-label">本次检票次数</view> |
|
|
|
|
<view class="m-row-value">{{checkInfo.ticketCheckedNums+1}}</view> |
|
|
|
|
<view class="m-row-value">{{checkInfo.ticketCheckedNums > checkInfo.ticketChecksNums?'0':'1'}}</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="m-inf-row"> |
|
|
|
|
<view class="m-row-label">检票时间</view> |
|
|
|
@ -43,7 +43,7 @@ |
|
|
|
|
<view class="m-driver-bottom"></view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="m-ticket-err" v-else> |
|
|
|
|
<view class="m-ticket-err" v-if="!load&&checkInfo==null"> |
|
|
|
|
<image src="@/static/images/index/err.png" alt="" /> |
|
|
|
|
<view class="m-err-tips"> |
|
|
|
|
票据无效 |
|
|
|
@ -62,40 +62,49 @@ |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
checkInfo:null |
|
|
|
|
checkInfo:null, |
|
|
|
|
load:false |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
onLoad(params) { |
|
|
|
|
console.log(params) |
|
|
|
|
if(params.result&¶ms.result!=''){ |
|
|
|
|
this.load = true |
|
|
|
|
uni.showLoading({ |
|
|
|
|
title:'请稍后' |
|
|
|
|
}) |
|
|
|
|
const obj = { |
|
|
|
|
// ticketQrCode:params.result, |
|
|
|
|
ticketQrCode:'SC202408221345563143348_1', |
|
|
|
|
// devCode:uni.getStorageSync('SNcode') |
|
|
|
|
devCode:'V30723CU20870' |
|
|
|
|
ticketQrCode:params.result, |
|
|
|
|
// ticketQrCode:'SC202408221345563143348_1', |
|
|
|
|
devCode:uni.getStorageSync('SNcode') |
|
|
|
|
// devCode:'V30723CU20870' |
|
|
|
|
} |
|
|
|
|
handsetCheckTicket(obj).then(res=>{ |
|
|
|
|
uni.hideLoading() |
|
|
|
|
this.load = false |
|
|
|
|
console.log(res) |
|
|
|
|
this.checkInfo = res.data |
|
|
|
|
}).catch(err=>{ |
|
|
|
|
uni.hideLoading() |
|
|
|
|
this.load = false |
|
|
|
|
console.log(err) |
|
|
|
|
this.checkInfo = null |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
//SC202408221354539668016_1,SC202408221354540164129_1 |
|
|
|
|
const obj = { |
|
|
|
|
// const obj = { |
|
|
|
|
// ticketQrCode:params.result, |
|
|
|
|
ticketQrCode:'SC202408221425517427956_1', |
|
|
|
|
// ticketQrCode:'SC202408221425517427956_1', |
|
|
|
|
// devCode:uni.getStorageSync('SNcode') |
|
|
|
|
devCode:'V30723CU20870' |
|
|
|
|
} |
|
|
|
|
handsetCheckTicket(obj).then(res=>{ |
|
|
|
|
console.log(res) |
|
|
|
|
this.checkInfo = res.data |
|
|
|
|
}).catch(err=>{ |
|
|
|
|
console.log(err) |
|
|
|
|
this.checkInfo = null |
|
|
|
|
}) |
|
|
|
|
// devCode:'V30723CU20870' |
|
|
|
|
// } |
|
|
|
|
// handsetCheckTicket(obj).then(res=>{ |
|
|
|
|
// console.log(res) |
|
|
|
|
// this.checkInfo = res.data |
|
|
|
|
// }).catch(err=>{ |
|
|
|
|
// console.log(err) |
|
|
|
|
// this.checkInfo = null |
|
|
|
|
// }) |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
checkTicket(){ |
|
|
|
@ -136,7 +145,7 @@ export default { |
|
|
|
|
|
|
|
|
|
.m-head-bg { |
|
|
|
|
position: absolute; |
|
|
|
|
top: 50upx; |
|
|
|
|
top: 65upx; |
|
|
|
|
width: 100%; |
|
|
|
|
height: 295upx; |
|
|
|
|
background-color: RGBA(51, 129, 241, 1); |
|
|
|
@ -192,7 +201,7 @@ export default { |
|
|
|
|
width: 90%; |
|
|
|
|
height: 170upx; |
|
|
|
|
position: absolute; |
|
|
|
|
top: 260upx; |
|
|
|
|
top: 275upx; |
|
|
|
|
left: 50%; |
|
|
|
|
transform: translateX(-50%); |
|
|
|
|
background-image: url('/static/images/index/ticket-out.png'); |
|
|
|
|