Commit 8c28911f authored by 潘永坪's avatar 潘永坪

联票bug处理

parent 81a70a06
...@@ -438,12 +438,12 @@ export default { ...@@ -438,12 +438,12 @@ export default {
}, },
data() { data() {
return { return {
detailTimer:null,//详情时间函数
codeTimer:null,//动态二维码时间函数
numberTimer:null,//获取排号信息时间函数
codeFlag:null,//动态二维码函数 codeFlag:null,//动态二维码函数
countFlag:null,//倒计时时间函数 countFlag:null,//倒计时时间函数
numberFlag:null,////获取排号信息时间函数2 detailTimer:null,//详情时间函数
codeTimer:null,//动态二维码时间函数
numberTimer1:null,//获取排号信息时间函数1
numberTimer2:null,////获取排号信息时间函数2
Brightness:'',//屏幕亮度 Brightness:'',//屏幕亮度
openid:uni.getStorageSync('openid')||'',//openid openid:uni.getStorageSync('openid')||'',//openid
companyId:'',//公司Id companyId:'',//公司Id
...@@ -493,14 +493,14 @@ export default { ...@@ -493,14 +493,14 @@ export default {
this.codeTimer = null this.codeTimer = null
} }
//清除排号信息函数 //清除排号信息函数
if(this.numberTimer) { if(this.numberTimer1) {
clearTimeout(this.numberTimer) clearTimeout(this.numberTimer1)
this.numberTimer = null this.numberTimer1 = null
} }
//清除排号信息函数2 //清除排号信息函数2
if(this.numberFlag) { if(this.numberTimer2) {
clearTimeout(this.numberFlag) clearTimeout(this.numberTimer2)
this.numberFlag = null this.numberTimer2 = null
} }
//清除倒计时函数 //清除倒计时函数
if(this.countFlag) { if(this.countFlag) {
...@@ -530,14 +530,14 @@ export default { ...@@ -530,14 +530,14 @@ export default {
this.codeTimer = null this.codeTimer = null
} }
//清除排号信息函数 //清除排号信息函数
if(this.numberTimer) { if(this.numberTimer1) {
clearTimeout(this.numberTimer) clearTimeout(this.numberTimer1)
this.numberTimer = null this.numberTimer1 = null
} }
//清除排号信息函数2 //清除排号信息函数2
if(this.numberFlag) { if(this.numberTimer2) {
clearTimeout(this.numberFlag) clearTimeout(this.numberTimer2)
this.numberFlag = null this.numberTimer2 = null
} }
//清除倒计时函数 //清除倒计时函数
if(this.countFlag) { if(this.countFlag) {
...@@ -561,9 +561,10 @@ export default { ...@@ -561,9 +561,10 @@ export default {
userId:this.openid,//用户Id userId:this.openid,//用户Id
} }
this.$request('order/userOrder/findOrderDetail',data).then((res)=>{ this.$request('order/userOrder/findOrderDetail',data).then((res)=>{
try{
if(res.code=='00'){ if(res.code=='00'){
//防止代码bug进入catch里面,一直请求接口影响性能 //防止代码bug进入catch里面,一直请求接口影响性能
try{
this.orderInfo=res.data this.orderInfo=res.data
let orderInfo=res.data let orderInfo=res.data
this.orderInfo.childs.forEach(item=>{ this.orderInfo.childs.forEach(item=>{
...@@ -759,15 +760,16 @@ export default { ...@@ -759,15 +760,16 @@ export default {
} }
} }
} }
}catch(e){
}else{
uni.showToast({ uni.showToast({
title: e, title: res.message,
icon: 'none' icon: 'none'
}) })
} }
}else{ }catch(e){
uni.showToast({ uni.showToast({
title: res.message, title: e,
icon: 'none' icon: 'none'
}) })
} }
...@@ -832,6 +834,7 @@ export default { ...@@ -832,6 +834,7 @@ export default {
} }
clearInterval(this.codeFlag) clearInterval(this.codeFlag)
this.$request('distribution/distribution/getAutoCode',data).then((res)=>{ this.$request('distribution/distribution/getAutoCode',data).then((res)=>{
try{
if(res.code == '00'){ if(res.code == '00'){
item.codeList = res.data.codes item.codeList = res.data.codes
if(item.codeList.length==0){ if(item.codeList.length==0){
...@@ -850,6 +853,12 @@ export default { ...@@ -850,6 +853,12 @@ export default {
title: res.message, title: res.message,
icon: 'none' icon: 'none'
}) })
}
}catch(e){
uni.showToast({
title: e,
icon: 'none'
})
} }
}).catch((err)=>{ }).catch((err)=>{
this.codeTimer=setTimeout(()=>{ this.codeTimer=setTimeout(()=>{
...@@ -923,11 +932,6 @@ export default { ...@@ -923,11 +932,6 @@ export default {
} }
}) })
this.$forceUpdate() this.$forceUpdate()
//每两分钟刷新一次
this.numberFlag=setTimeout(()=>{
this.getSortInfo(item)
},120*1000)
} }
}else{ }else{
uni.showToast({ uni.showToast({
...@@ -935,6 +939,10 @@ export default { ...@@ -935,6 +939,10 @@ export default {
icon: 'none' icon: 'none'
}) })
} }
//每两分钟刷新一次
this.numberTimer2=setTimeout(()=>{
this.getSortInfo(item)
},120*1000)
}catch(e){ }catch(e){
uni.showToast({ uni.showToast({
title: e, title: e,
...@@ -942,7 +950,7 @@ export default { ...@@ -942,7 +950,7 @@ export default {
}) })
} }
}).catch((err)=>{ }).catch((err)=>{
this.numberTimer=setTimeout(()=>{ this.numberTimer1=setTimeout(()=>{
this.getSortInfo(item) this.getSortInfo(item)
},2000) },2000)
}) })
......
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