Commit 75bc906a authored by 潘永坪's avatar 潘永坪

联票电子门票bug处理

parent 8c28911f
......@@ -438,7 +438,6 @@ export default {
},
data() {
return {
codeFlag:null,//动态二维码函数
countFlag:null,//倒计时时间函数
detailTimer:null,//详情时间函数
codeTimer:null,//动态二维码时间函数
......@@ -508,9 +507,13 @@ export default {
this.countFlag = null
}
//清除动态二维码函数
if(this.codeFlag) {
clearInterval(this.codeFlag)
this.codeFlag = null
if(this.orderInfo&&this.orderInfo.childs.length>0){
for(let index=0;index<this.orderInfo.childs.length;index++){
if(this['codeFlag'+index]) {
clearInterval(this['codeFlag'+index])
this['codeFlag'+index] = null
}
}
}
uni.setScreenBrightness({// 恢复之前屏幕亮度
value: this.Brightness
......@@ -545,9 +548,13 @@ export default {
this.countFlag = null
}
//清除动态二维码函数
if(this.codeFlag) {
clearInterval(this.codeFlag)
this.codeFlag = null
if(this.orderInfo&&this.orderInfo.childs.length>0){
for(let index=0;index<this.orderInfo.childs.length;index++){
if(this['codeFlag'+index]) {
clearInterval(this['codeFlag'+index])
this['codeFlag'+index] = null
}
}
}
uni.setScreenBrightness({// 恢复之前屏幕亮度
value: this.Brightness
......@@ -567,7 +574,7 @@ export default {
this.orderInfo=res.data
let orderInfo=res.data
this.orderInfo.childs.forEach(item=>{
this.orderInfo.childs.forEach((item,index)=>{
//默认不显示使用须知
item.showUseknow=false
//默认不显示退票详情
......@@ -597,7 +604,7 @@ export default {
if(item.playDate.substr(0,10)==this.$commonjs.today()){
if(item.orderStatus==2||item.orderStatus==4||item.orderStatus==5||item.orderStatus==7){
//订单状态为2、4、5、7时才获取动态二维码
this.getCodeList(item)
this.getCodeList(item,index)
}
}else{
//如果不是今天,为了保持页面完整性,临时放一个静态二维码
......@@ -789,7 +796,7 @@ export default {
return y + '-' + m + '-' + d
},
//---二维码刷新
dynamicCodeRefresh(item){
dynamicCodeRefresh(item,index){
let codeList=item.codeList
let codeStart=item.codeStart
// 获取当前显示第几个二维码
......@@ -806,7 +813,7 @@ export default {
}
// 全部遍历完成后,需要重新获取新的二维码
if(code == null){
this.getCodeList(item)
this.getCodeList(item,index)
} else {
if(code.code != this.nowCodeNo){
this.nowCodeNo=code.code||''
......@@ -822,7 +829,7 @@ export default {
}
},
//---获取动态二维码列表
getCodeList(item){
getCodeList(item,index){
let codeNo=''
if(item.orderTicketDetailList.length>0){
codeNo=item.orderTicketDetailList[0].ticketCode
......@@ -832,7 +839,7 @@ export default {
orderId:item.id,//订单号
userId:this.openid//openid
}
clearInterval(this.codeFlag)
clearInterval(this['codeFlag'+index])
this.$request('distribution/distribution/getAutoCode',data).then((res)=>{
try{
if(res.code == '00'){
......@@ -845,8 +852,8 @@ export default {
return
}
item.codeStart = new Date().getTime()
this.codeFlag = setInterval(()=>{
this.dynamicCodeRefresh(item)
this['codeFlag'+index] = setInterval(()=>{
this.dynamicCodeRefresh(item,index)
},300)
}else{
uni.showToast({
......@@ -862,7 +869,7 @@ export default {
}
}).catch((err)=>{
this.codeTimer=setTimeout(()=>{
this.getCodeList(item)
this.getCodeList(item,index)
},2000)
})
},
......@@ -999,6 +1006,16 @@ export default {
if(res.code=='00'){
//隐藏弹窗
this.showModal=false
//清除排号信息函数1
if(this.numberTimer1) {
clearTimeout(this.numberTimer1)
this.numberTimer1 = null
}
//清除排号信息函数2
if(this.numberTimer2) {
clearTimeout(this.numberTimer2)
this.numberTimer2 = null
}
this.getSortInfo(item)
}else{
uni.showToast({
......
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