更新
This commit is contained in:
@@ -4,8 +4,10 @@
|
||||
<block slot="content">中石化紫云路</block>
|
||||
<block slot="backText">返回</block>
|
||||
</cu-custom> -->
|
||||
<view class="bg-img fixed-top flex align-end margin-bottom-lg " :style="'background-image: url('+imgURL+'site-bg.png '+');width: 750upx;height: 326rpx;background-size:cover'">
|
||||
<image @tap="goBack" :src="imgURL+'site-back.png'" width="20upx" mode="widthFix" class="position-ab site-back">
|
||||
<view class="bg-img fixed-top flex align-end margin-bottom-lg "
|
||||
:style="'background-image: url('+imgURL+'site-bg.png '+');width: 750upx;height: 326rpx;background-size:cover'">
|
||||
<image @tap="goBack" :src="imgURL+'site-back.png'" width="20upx" mode="widthFix"
|
||||
class="position-ab site-back">
|
||||
</image>
|
||||
<view class="flex-sub">
|
||||
<view class="cu-list menu margin padding-sm radius my-shadow bg-white yu-card-xuan">
|
||||
@@ -28,8 +30,10 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg-img placeholder-hidden flex align-end margin-bottom-lg " :style="'background-image: url('+imgURL+'site-bg.png '+');width: 750upx;height: 326rpx;background-size:cover'">
|
||||
<image @tap="goBack" :src="imgURL+'site-back.png'" width="20upx" mode="widthFix" class="position-ab site-back">
|
||||
<view class="bg-img placeholder-hidden flex align-end margin-bottom-lg "
|
||||
:style="'background-image: url('+imgURL+'site-bg.png '+');width: 750upx;height: 326rpx;background-size:cover'">
|
||||
<image @tap="goBack" :src="imgURL+'site-back.png'" width="20upx" mode="widthFix"
|
||||
class="position-ab site-back">
|
||||
</image>
|
||||
<view class="flex-sub">
|
||||
<view class="cu-list menu margin padding-sm radius my-shadow bg-white yu-card-xuan">
|
||||
@@ -57,8 +61,9 @@
|
||||
</view>
|
||||
|
||||
<!-- 价格 -->
|
||||
<price-select-tab @onChangePayQr="onChangePayQr" @onChangePay="onChangePay" :active-cur="activeCur" :site-name="siteInfo.siteName"
|
||||
:channel-list="siteInfo.oilSiteChannelDetailsVos" :channelJuli="siteInfo.juli"></price-select-tab>
|
||||
<price-select-tab @onChangePayQr="onChangePayQr" @onChangePay="onChangePay" :active-cur="activeCur"
|
||||
:site-name="siteInfo.siteName" :channel-list="siteInfo.oilSiteChannelDetailsVos"
|
||||
:channelJuli="siteInfo.juli"></price-select-tab>
|
||||
|
||||
|
||||
</view>
|
||||
@@ -73,6 +78,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isBackPrev: true,
|
||||
radio: 'B',
|
||||
mainURL: this.global.mainURL,
|
||||
imgURL: this.global.imgURL,
|
||||
@@ -81,7 +87,7 @@
|
||||
siteInfo: {
|
||||
|
||||
},
|
||||
activeCur:0,
|
||||
activeCur: 0,
|
||||
activePay: null,
|
||||
qrcodePay: null,
|
||||
|
||||
@@ -94,6 +100,19 @@
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.q) {
|
||||
try {
|
||||
let originLink = decodeURIComponent(option.q)
|
||||
let target = this.obtainUrlPathParameterTarget(originLink)
|
||||
let authorization = uni.getStorageSync('Authorization')
|
||||
if (authorization && target.siteId) {
|
||||
// 扫码进入 返回按钮点击回到首页
|
||||
this.isBackPrev = false
|
||||
this.getSiteInfo(target.siteId)
|
||||
}
|
||||
} catch (e) {}
|
||||
return
|
||||
}
|
||||
// console.log(option.siteId)
|
||||
if (this.tempScanSite) {
|
||||
this.siteInfo = this.tempScanSite
|
||||
@@ -103,14 +122,26 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
obtainUrlPathParameterTarget(url) {
|
||||
let target = {}
|
||||
if (url.includes('?')) {
|
||||
let paramsText = url.split("?")[1]
|
||||
let paramsArr = paramsText.split("&")
|
||||
paramsArr.forEach(item => {
|
||||
target[item.split('=')[0]] = item.split('=')[1]
|
||||
})
|
||||
}
|
||||
return target
|
||||
},
|
||||
siteQrPay() {
|
||||
uni.navigateTo({
|
||||
url: '/BagStation/pages/stationDetail/stieQr'
|
||||
})
|
||||
},
|
||||
getSiteInfo(id) {
|
||||
let location = uni.getStorageSync('location') || {}
|
||||
let data2 = {
|
||||
...uni.getStorageSync('location'),
|
||||
...location,
|
||||
siteId: id
|
||||
}
|
||||
oilSiteApi.getSiteDetails(data2).then(res => {
|
||||
@@ -140,9 +171,10 @@
|
||||
|
||||
},
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
|
||||
this.isBackPrev ? uni.navigateBack() : uni.navigateBack({
|
||||
url: '../../../pages/tabbar/home/home'
|
||||
})
|
||||
|
||||
},
|
||||
selectRadio() {
|
||||
this.radio === 'A' ? this.radio = '' : this.radio = 'A'
|
||||
@@ -178,15 +210,14 @@
|
||||
return value > 1000 ? ((value / 1000).toFixed(2) + 'km') : (value + 'm')
|
||||
}
|
||||
}
|
||||
}
|
||||
,
|
||||
},
|
||||
onHide() {
|
||||
console.log('这里是hiden')
|
||||
this.innerAudioContext.stop()
|
||||
// console.log('这里是hiden')
|
||||
// this.innerAudioContext.stop()
|
||||
},
|
||||
onUnload() {
|
||||
console.log('这里是卸载页面')
|
||||
this.innerAudioContext.stop()
|
||||
// console.log('这里是卸载页面')
|
||||
// this.innerAudioContext.stop()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user