更新
This commit is contained in:
@@ -180,21 +180,29 @@
|
||||
}
|
||||
},
|
||||
onHide() {
|
||||
console.log('这里是hiden')
|
||||
this.innerAudioContext.stop()
|
||||
this.audioUrl && this.innerAudioContext.stop()
|
||||
},
|
||||
onUnload() {
|
||||
console.log('这里是卸载页面')
|
||||
this.innerAudioContext.stop()
|
||||
this.audioUrl && this.innerAudioContext.stop()
|
||||
},
|
||||
|
||||
|
||||
onLoad(option) {
|
||||
console.log(22222)
|
||||
let userInfo = uni.getStorageSync('user')
|
||||
if(!userInfo && option.q) {
|
||||
uni.redirectTo({
|
||||
url: `/BagAuth/pages/login/login?scanningParams=${option.q}`
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if(option.q) {
|
||||
let originLink = decodeURIComponent(option.q)
|
||||
let target = this.obtainUrlPathParameterTarget(originLink)
|
||||
console.log('target',target)
|
||||
if(target.siteId) {
|
||||
this.siteId = target.siteId
|
||||
this.getSiteInfo(target.siteId)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -204,6 +212,7 @@
|
||||
}else{
|
||||
var oilItem = JSON.parse(decodeURIComponent(option.item))
|
||||
}
|
||||
|
||||
uni.setStorageSync('oilItem',oilItem)
|
||||
this.getSiteInfo(oilItem.siteId)
|
||||
this.siteId = oilItem.siteId
|
||||
@@ -239,12 +248,11 @@
|
||||
console.log('开始播放');
|
||||
});
|
||||
this.innerAudioContext.onError((res) => {
|
||||
console.log(res.errMsg);
|
||||
console.log(res.errCode);
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
backTohome(){
|
||||
this.innerAudioContext.stop()
|
||||
this.audioUrl && this.innerAudioContext.stop()
|
||||
uni.switchTab({
|
||||
url:'../../../pages/tabbar/home/home'
|
||||
})
|
||||
@@ -253,7 +261,7 @@
|
||||
this.showtitle =false
|
||||
},
|
||||
gotoPay(){
|
||||
this.innerAudioContext.stop()
|
||||
this.audioUrl && this.innerAudioContext.stop()
|
||||
uni.navigateTo({
|
||||
url: `/BagStation/pages/makeOrder/makeOrder?siteId=${this.siteId}&activeCur=${this.activeCur}`
|
||||
})
|
||||
@@ -263,32 +271,28 @@
|
||||
this.secondChannelCode = sec
|
||||
},
|
||||
siteQrPay() {
|
||||
this.innerAudioContext.stop()
|
||||
// let siteId =
|
||||
this.audioUrl && this.innerAudioContext.stop()
|
||||
uni.navigateTo({
|
||||
url: `/BagStation/pages/stationDetail/stieQr?siteId=${this.siteId}&activeChannelCode=${this.activeChannelCode}&secondChannelCode=${this.secondChannelCode}`
|
||||
})
|
||||
},
|
||||
getSiteInfo(id) {
|
||||
console.log('进入获取油站信息')
|
||||
let data2 = {
|
||||
...uni.getStorageSync('location'),
|
||||
siteId: id,
|
||||
clientBelong: "ZHONGPIN"
|
||||
}
|
||||
oilSiteApi.getSiteDetails(data2).then(res => {
|
||||
console.log('进入获取油站信息getSiteDetails',res)
|
||||
oilSiteApi.getSiteDetails(data2).then(res => {
|
||||
if (res.code == 20000) {
|
||||
this.siteInfo = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
makePay() {
|
||||
console.log(this.siteInfo.juli)
|
||||
if(this.siteInfo.juli > 1000 ){
|
||||
this.showtitle = true
|
||||
}else{
|
||||
this.innerAudioContext.stop()
|
||||
this.audioUrl && this.innerAudioContext.stop()
|
||||
uni.navigateTo({
|
||||
url: `/BagStation/pages/makeOrder/makeOrder?siteId=${this.siteId}&activeCur=${this.activeCur}`
|
||||
})
|
||||
@@ -316,10 +320,11 @@
|
||||
|
||||
},
|
||||
goBack() {
|
||||
this.innerAudioContext.stop()
|
||||
uni.navigateBack({
|
||||
// this.innerAudioContext.stop()
|
||||
|
||||
})
|
||||
uni.switchTab({
|
||||
url: '/pages/tabbar/home/home'
|
||||
});
|
||||
},
|
||||
selectRadio() {
|
||||
this.radio === 'A' ? this.radio = '' : this.radio = 'A'
|
||||
|
||||
Reference in New Issue
Block a user