1
This commit is contained in:
@@ -23,7 +23,8 @@
|
||||
<view class="action " @tap="openMap">
|
||||
<view class="oil-main-color">
|
||||
<my-icon iconName="sy-der-icon.png" class="padding-right-xs text-sm"></my-icon>
|
||||
{{siteInfo.juli|distanceFilter}}
|
||||
<text v-if="!location">暂无信息</text>
|
||||
<text v-else >{{siteInfo.juli|distanceFilter}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -49,7 +50,8 @@
|
||||
<view class="action " @tap="openMap">
|
||||
<view class="oil-main-color">
|
||||
<my-icon iconName="sy-der-icon.png" class="padding-right-xs text-sm"></my-icon>
|
||||
{{siteInfo.juli|distanceFilter}}
|
||||
<text v-if="!location">暂无信息</text>
|
||||
<text v-else >{{siteInfo.juli|distanceFilter}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -161,6 +163,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
location:null,
|
||||
showtitle:false,
|
||||
radio: 'B',
|
||||
mainURL: this.global.mainURL,
|
||||
@@ -168,9 +171,7 @@
|
||||
otherImgURL:this.global.otherImgURL,
|
||||
active: 0,
|
||||
ColorList: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
|
||||
siteInfo: {
|
||||
|
||||
},
|
||||
siteInfo: { },
|
||||
activeCur: '',
|
||||
activePay: null,
|
||||
qrcodePay: null,
|
||||
@@ -184,10 +185,9 @@
|
||||
},
|
||||
onUnload() {
|
||||
this.innerAudioContext && this.innerAudioContext.stop()
|
||||
},
|
||||
|
||||
|
||||
onLoad(option) {
|
||||
},
|
||||
onLoad(option) {
|
||||
this.location = uni.getStorageSync('location')
|
||||
// console.log('option',option)
|
||||
// let userInfo = uni.getStorageSync('user')
|
||||
// if(!userInfo && option.q) {
|
||||
@@ -212,11 +212,11 @@
|
||||
let siteInfos = uni.getStorageSync('siteInfo')
|
||||
var oilItem = JSON.parse(decodeURIComponent(siteInfos))
|
||||
}else{
|
||||
var oilItem = JSON.parse(decodeURIComponent(option.item))
|
||||
var oilItem = JSON.parse(decodeURIComponent(option.item));
|
||||
}
|
||||
|
||||
uni.setStorageSync('oilItem',oilItem)
|
||||
this.getSiteInfo(oilItem.siteId)
|
||||
console.log(oilItem,'oilItemoilItemoilItem')
|
||||
uni.setStorageSync('oilItem',oilItem)
|
||||
this.getSiteInfo(oilItem)
|
||||
this.siteId = oilItem.siteId
|
||||
if(oilItem.listTag == '万金油'){
|
||||
this.audioUrl = 'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/wanjinyou.mp3'
|
||||
@@ -227,9 +227,10 @@
|
||||
}else if(oilItem.listTag == '上汽联名卡'){
|
||||
this.audioUrl = 'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/shangqi.mp3'
|
||||
}
|
||||
this.ContextAudio(this.audioUrl)
|
||||
this.ContextAudio(this.audioUrl);
|
||||
|
||||
},
|
||||
methods: {
|
||||
methods: {
|
||||
obtainUrlPathParameterTarget(url) {
|
||||
let target = {}
|
||||
if(url.includes('?')) {
|
||||
@@ -278,19 +279,41 @@
|
||||
url: `/BagStation/pages/stationDetail/stieQr?siteId=${this.siteId}&activeChannelCode=${this.activeChannelCode}&secondChannelCode=${this.secondChannelCode}`
|
||||
})
|
||||
},
|
||||
getSiteInfo(id) {
|
||||
getSiteInfo(item) {
|
||||
let data2 = {
|
||||
...uni.getStorageSync('location'),
|
||||
siteId: id,
|
||||
siteId: item.siteId,
|
||||
clientBelong: "ZHONGPIN"
|
||||
}
|
||||
oilSiteApi.getSiteDetails(data2).then(res => {
|
||||
if (res.code == 20000) {
|
||||
this.siteInfo = res.data
|
||||
}
|
||||
})
|
||||
let user = uni.getStorageSync('user');
|
||||
if (user) {
|
||||
oilSiteApi.getSiteDetails(data2).then(res => {
|
||||
if (res.code == 20000) {
|
||||
this.siteInfo = Object.assign(item,res.data);
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.siteInfo = item;
|
||||
}
|
||||
|
||||
},
|
||||
makePay() {
|
||||
let user = uni.getStorageSync('user');
|
||||
if(!user){
|
||||
uni.showModal({
|
||||
title: '请您登录',
|
||||
content: "登录佰川加油才可以加油 |˛˙꒳˙)♡",
|
||||
confirmText: '去登陆',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.reLaunch({
|
||||
url: '../../../BagAuth/pages/login/login?loginType=true'
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
return
|
||||
}
|
||||
if(this.siteInfo.juli > 1000 ){
|
||||
this.showtitle = true
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user