This commit is contained in:
xiaozhiyong
2023-11-27 14:47:28 +08:00
parent 548ba526f3
commit a4bf992e9b
6 changed files with 366 additions and 348 deletions

View File

@@ -178,19 +178,35 @@
this.innerAudioContext && this.innerAudioContext.stop()
},
onUnload() {
this.innerAudioContext && this.innerAudioContext.stop()
if (this.innerAudioContext) {
this.innerAudioContext.stop()
this.innerAudioContext.destroy()
}
},
onLoad(option) {
if(option.q) {
let originLink = decodeURIComponent(option.q)
let target = this.obtainUrlPathParameterTarget(originLink)
if(target.siteId) {
this.siteId = target.siteId
this.getSiteInfo(target.siteId)
}
return
if (option.q) {
try {
let originLink = decodeURIComponent(option.q)
let target = this.obtainUrlPathParameterTarget(originLink)
let authorization = uni.getStorageSync('Authorization')
if (authorization && target.siteId) {
uni.showModal({
content: '该二维码非最新版,请提示油站工作人员更新',
success: res => {
if(res.confirm) {
this.siteId = target.siteId
this.gotoPay()
}
if(res.cancel) {
this.backTohome()
}
}
})
}
} catch (e) {}
return
}
if (!option.item) {
let siteInfos = uni.getStorageSync('siteInfo')
var oilItem = JSON.parse(decodeURIComponent(siteInfos))
@@ -236,7 +252,7 @@
});
},
backTohome() {
this.innerAudioContext && this.innerAudioContext.stop()
// this.innerAudioContext && this.innerAudioContext.stop()
uni.switchTab({
url: '../../../pages/tabbar/home/home'
})
@@ -245,7 +261,7 @@
this.showtitle = false
},
gotoPay() {
this.innerAudioContext && this.innerAudioContext.stop()
// this.innerAudioContext && this.innerAudioContext.stop()
uni.navigateTo({
url: `/BagStation/pages/makeOrder/makeOrder?siteId=${this.siteId}&activeCur=${this.activeCur}`
})
@@ -255,7 +271,7 @@
this.secondChannelCode = sec
},
siteQrPay() {
this.innerAudioContext && this.innerAudioContext.stop()
// this.innerAudioContext && this.innerAudioContext.stop()
// let siteId =
uni.navigateTo({
url: `/BagStation/pages/stationDetail/stieQr?siteId=${this.siteId}&activeChannelCode=${this.activeChannelCode}&secondChannelCode=${this.secondChannelCode}`
@@ -306,7 +322,7 @@
if (this.siteInfo.juli > 1000) {
this.showtitle = true
} else {
this.innerAudioContext && this.innerAudioContext.stop()
// this.innerAudioContext && this.innerAudioContext.stop()
uni.navigateTo({
url: `/BagStation/pages/makeOrder/makeOrder?siteId=${this.siteId}&activeCur=${this.activeCur}`
})
@@ -317,7 +333,7 @@
this.qrcodePay = val
},
onChangePay(val, active) {
console.log(val)
// console.log(val)
this.activePay = val
this.activeCur = active
},