Commit 4d8ef1ba authored by qipeng's avatar qipeng

预售票首次取票

parent d4941371
...@@ -90,6 +90,12 @@ ...@@ -90,6 +90,12 @@
</view> </view>
</view> </view>
</template> </template>
<!-- 预售票当日取票-->
<template v-if="showNumberBtn==true">
<view class="sameDayCollection" v-for="(item,index) in sortData" :key="index">
<view class="collectionBtn" @click="sortFirst(item)">取号</view>
</view>
</template>
<!--sceneSortStatus 是否上下架 1是上架--> <!--sceneSortStatus 是否上下架 1是上架-->
<view class="order-queueUp order-allType order-positionTop" v-if="orderInfo.isFetch==1&&sortsInfo&&sortData[0].config.sceneSortStatus==1&&orderInfo.orderStatus==4||orderInfo.isFetch==1&&sortsInfo&&sortData[0].config.sceneSortStatus==1&&orderInfo.orderStatus==2||orderInfo.isFetch==1&&sortsInfo&&sortData[0].config.sceneSortStatus==1&&orderInfo.orderStatus==5||orderInfo.isFetch==1&&sortsInfo&&sortData[0].config.sceneSortStatus==1&&orderInfo.orderStatus==7"> <view class="order-queueUp order-allType order-positionTop" v-if="orderInfo.isFetch==1&&sortsInfo&&sortData[0].config.sceneSortStatus==1&&orderInfo.orderStatus==4||orderInfo.isFetch==1&&sortsInfo&&sortData[0].config.sceneSortStatus==1&&orderInfo.orderStatus==2||orderInfo.isFetch==1&&sortsInfo&&sortData[0].config.sceneSortStatus==1&&orderInfo.orderStatus==5||orderInfo.isFetch==1&&sortsInfo&&sortData[0].config.sceneSortStatus==1&&orderInfo.orderStatus==7">
<view class="alltype-title"> <view class="alltype-title">
...@@ -121,6 +127,7 @@ ...@@ -121,6 +127,7 @@
</view> </view>
</view> </view>
</template> --> </template> -->
<!-- 返程排号/第一次取号 --> <!-- 返程排号/第一次取号 -->
<template v-if="sortData[0].sortFair===4||sortData[0].sortFair===5"> <template v-if="sortData[0].sortFair===4||sortData[0].sortFair===5">
<view class="queueUp-rowNumber" v-for="(item,index) in sortData" :key="index"> <view class="queueUp-rowNumber" v-for="(item,index) in sortData" :key="index">
...@@ -582,6 +589,7 @@ export default { ...@@ -582,6 +589,7 @@ export default {
timer2:null, timer2:null,
timer3:null, timer3:null,
maskType :false, maskType :false,
showNumberBtn:false,//预售票首次取号
d:'',//倒计时 天 d:'',//倒计时 天
h: '',//倒计时 时 h: '',//倒计时 时
m: '',//倒计时 分 m: '',//倒计时 分
...@@ -809,18 +817,19 @@ export default { ...@@ -809,18 +817,19 @@ export default {
} }
if(this.orderInfo.isFetch==1){//isFetch==1需要排队 if(this.orderInfo.isFetch==1){//isFetch==1需要排队
if(this.orderInfo.orderStatus==2||this.orderInfo.orderStatus==4||this.orderInfo.orderStatus==5||this.orderInfo.orderStatus==7){ //订单状态==2 4 5 7才可以调用排号接口 if(this.orderInfo.orderStatus==2||this.orderInfo.orderStatus==4||this.orderInfo.orderStatus==5||this.orderInfo.orderStatus==7){ //订单状态==2 4 5 7才可以调用排号接口
console.log(this.orderInfo.orderStatus) //console.log(this.orderInfo.orderStatus)
this.getSortInfo() //为了提高性能,游玩时间等于今天才获取排号信息
var sortRefresh = new Date().getTime() if(this.orderInfo.playDate.substr(0,10)==this.$commonjs.today()){
this.sortRefreshNew = JSON.parse(JSON.stringify(sortRefresh)) if(this.orderInfo.fetchNumberVoList&&this.orderInfo.fetchNumberVoList.length>0){
this.timer2=setInterval(()=>{ //购买的当天票已经取号
var sortRefresh2 = new Date().getTime()
var sorNum = sortRefresh2-this.sortRefreshNew
if(sorNum>=120000){
this.sortRefreshNew = JSON.parse(JSON.stringify(sortRefresh2))
this.getSortInfo() this.getSortInfo()
}else{
//还未取号的,显示取号按钮
this.showNumberBtn=true
} }
},1000) }
} }
// this.$once('hook:beforeDestroy',()=>{ // this.$once('hook:beforeDestroy',()=>{
...@@ -938,6 +947,16 @@ export default { ...@@ -938,6 +947,16 @@ export default {
let data={areaCode,orderNum,userId,orderId,thirdId,'againNumber':0} let data={areaCode,orderNum,userId,orderId,thirdId,'againNumber':0}
this.$request('distribution/distribution/getNewFetchInfo',data).then((res)=>{ this.$request('distribution/distribution/getNewFetchInfo',data).then((res)=>{
if(res.code=='00'){ if(res.code=='00'){
var sortRefresh = new Date().getTime()
this.sortRefreshNew = JSON.parse(JSON.stringify(sortRefresh))
this.timer2=setInterval(()=>{
var sortRefresh2 = new Date().getTime()
var sorNum = sortRefresh2-this.sortRefreshNew
if(sorNum>=120000){
this.sortRefreshNew = JSON.parse(JSON.stringify(sortRefresh2))
this.getSortInfo()
}
},1000)
if(res.data.length>0){ if(res.data.length>0){
this.sortsInfo = res.data[0] this.sortsInfo = res.data[0]
this.companyId = this.sortsInfo.pays[0].companyId this.companyId = this.sortsInfo.pays[0].companyId
...@@ -1007,6 +1026,8 @@ export default { ...@@ -1007,6 +1026,8 @@ export default {
areaCode:item.projectId, areaCode:item.projectId,
userId:this.openId, userId:this.openId,
merchantCode:this.companyId, merchantCode:this.companyId,
orderId:this.orderInfo.id,//订单id
orderNum:this.orderInfo.orderNum,//订单数量
} }
this.$request('distribution/distribution/newFetchNumber',data).then((res)=>{ this.$request('distribution/distribution/newFetchNumber',data).then((res)=>{
if(res.code=='00'){ if(res.code=='00'){
...@@ -1020,6 +1041,30 @@ export default { ...@@ -1020,6 +1041,30 @@ export default {
} }
}) })
}, },
//---购票时未排号,第一次排号
sortFirst(item){
let data={
againNumber:0,//是否重排
userId:this.openId,
thirdId:this.sortsInfo.order.orderId,//三方订单id
areaCode:item.projectId,//站点
merchantCode:this.companyId,
orderId:this.orderInfo.id,//订单id
orderNum:this.orderInfo.orderNum,//订单数量
}
this.$request('distribution/distribution/newFetchNumber',data).then((res)=>{
if(res.code=='00'){
//隐藏取号按钮
this.showNumberBtn=false
this.getSortInfo(item)
}else{
uni.showToast({
title: res.message,
icon: 'none'
})
}
})
},
qecode(){//生成二维码 qecode(){//生成二维码
if(this.verifyCode){ if(this.verifyCode){
// let qrcode = new QRCode('qrcode',{ // let qrcode = new QRCode('qrcode',{
...@@ -1523,6 +1568,19 @@ export default { ...@@ -1523,6 +1568,19 @@ export default {
background-color: #fff; background-color: #fff;
color: #3688FF; color: #3688FF;
} }
.sameDayCollection{
width: 710rpx;
background-color: #fff;
box-shadow: 0rpx 0rpx 6rpx 0rpx rgba(0, 0, 0, 0.04);
border-radius: 16rpx 16rpx 16rpx 16rpx;
margin: 0 auto 16rpx auto;
padding: 24rpx 24rpx 24rpx 24rpx;
overflow: hidden;
.collectionBtn{
width: 136rpx; height: 56rpx; background: #3688FF; border-radius: 32rpx 32rpx 32rpx 32rpx; font-size: 28rpx; color: #FFFFFF; line-height: 56rpx; text-align: center; margin: 0 auto;
}
}
/*入园凭证*/ /*入园凭证*/
.order-certificate .certificate-box { .order-certificate .certificate-box {
padding: 16rpx 0 24rpx 0; padding: 16rpx 0 24rpx 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment