Commit 6e6f3c19 authored by 潘永坪's avatar 潘永坪

Merge branch 'develop' of http://192.168.0.204/panyongping/uni-pdtravel into develop

parents 6fc58505 f2073cc0
......@@ -90,6 +90,12 @@
</view>
</view>
</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是上架-->
<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">
......@@ -121,6 +127,7 @@
</view>
</view>
</template> -->
<!-- 返程排号/第一次取号 -->
<template v-if="sortData[0].sortFair===4||sortData[0].sortFair===5">
<view class="queueUp-rowNumber" v-for="(item,index) in sortData" :key="index">
......@@ -582,6 +589,7 @@ export default {
timer2:null,
timer3:null,
maskType :false,
showNumberBtn:false,//预售票首次取号
d:'',//倒计时 天
h: '',//倒计时 时
m: '',//倒计时 分
......@@ -809,18 +817,19 @@ export default {
}
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才可以调用排号接口
console.log(this.orderInfo.orderStatus)
this.getSortInfo()
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))
//console.log(this.orderInfo.orderStatus)
//为了提高性能,游玩时间等于今天才获取排号信息
if(this.orderInfo.playDate.substr(0,10)==this.$commonjs.today()){
if(this.orderInfo.fetchNumberVoList&&this.orderInfo.fetchNumberVoList.length>0){
//购买的当天票已经取号
this.getSortInfo()
}else{
//还未取号的,显示取号按钮
this.showNumberBtn=true
}
},1000)
}
}
// this.$once('hook:beforeDestroy',()=>{
......@@ -938,6 +947,16 @@ export default {
let data={areaCode,orderNum,userId,orderId,thirdId,'againNumber':0}
this.$request('distribution/distribution/getNewFetchInfo',data).then((res)=>{
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){
this.sortsInfo = res.data[0]
this.companyId = this.sortsInfo.pays[0].companyId
......@@ -1007,6 +1026,8 @@ export default {
areaCode:item.projectId,
userId:this.openId,
merchantCode:this.companyId,
orderId:this.orderInfo.id,//订单id
orderNum:this.orderInfo.orderNum,//订单数量
}
this.$request('distribution/distribution/newFetchNumber',data).then((res)=>{
if(res.code=='00'){
......@@ -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(){//生成二维码
if(this.verifyCode){
// let qrcode = new QRCode('qrcode',{
......@@ -1523,6 +1568,19 @@ export default {
background-color: #fff;
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 {
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