This commit is contained in:
caolc
2023-05-08 10:45:07 +08:00
parent 8fd25deedf
commit 1c3e0f9662
27 changed files with 388 additions and 297 deletions

View File

@@ -120,7 +120,7 @@
</view>
<view class="padding-tb-xs text-left">
加油司机
<text class=" fr">{{order.customerName}} {{order.customerCode}}</text>
<text class=" fr">{{user.name}}</text>
</view>
<view class="padding-tb-xs text-left" v-if="order.oilCardNature">
油卡性质
@@ -187,8 +187,8 @@
order: {},
tyIntervalCount: 0,
tySqRes: {},
tyPayMethod: null
tyPayMethod: null,
user: uni.getStorageSync('user'),
}
},
@@ -219,19 +219,39 @@
// },1000)
}
},
onLoad(option) {
this.id = option.id;
console.log(option,'optionoptionoptionoption')
this.getOrderInfo();
uni.showShareMenu();
this.getOrderQrCode();
let _that = this;
},
onUnload(){
if(this.timeinterval)clearInterval(this.timeinterval);
},
onHide(){
console.log('onHide')
},
methods: {
newQrString() {
this.getOrderQrCode()
},
getOrderQrCode(){
oilSiteApi.getOrderQrCode(this.order.orderSerialNumber).then( (res)=>{
console.log(res)
oilSiteApi.getOrderQrCode(this.id).then( (res)=>{
this.val = res.data
if(res.code == 40000){
this.showQr = false
}else if(res.code == 20000){
this.showQr = true
this.val =res.data.codeStr
this.val =res.data.codeStr;
if(!this.timeinterval){
this.timeinterval = setInterval(() => {
console.log('进入循环')
this.newQrString()
}, 1000 * 60 * 3);
}
}
} )
},
@@ -303,7 +323,7 @@
if (res.code == 20000) {
this.order = res.data
uni.setStorageSync('oilItem', res.data)
this.getOrderQrCode()
// this.getOrderQrCode()
if (res.data.payMethod == 2) {
this.tyPayMethod = res.data.payMethod
// this.queryOrderStatusSq()
@@ -333,6 +353,8 @@
duration: 1000
})
setTimeout(() => {
uni.navigateBack();
uni.$emit('orderLisetUpdate')
this.$emit('refresh')
}, 1000)
@@ -367,16 +389,7 @@
}
},
onLoad(option) {
this.id = option.id
this.getOrderInfo()
uni.showShareMenu()
let _that = this
this.timeinterval = setInterval(() => {
console.log('1')
_that.newQrString()
}, 1000 * 60 * 3);
},
filters: {
moneyFormat(value) {
if (value != 'xxx.x') {