|
|
@ -101,20 +101,15 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- 底部去支付 --> |
|
|
|
<!-- 底部去支付 --> |
|
|
|
<view class="" > |
|
|
|
<view class="" > |
|
|
|
<view class="btn bg-white placeholder-hidden"> |
|
|
|
<!-- <view class="btn bg-white placeholder-hidden"> |
|
|
|
<view class="flex bg-white padding flex-direction"> |
|
|
|
<view class="flex bg-white padding flex-direction"> |
|
|
|
<button class="cu-btn block bg-main-oil lg" v-if="activePay" @tap="makePay"> |
|
|
|
<button class="cu-btn block bg-main-oil lg" v-if="activePay" @tap="makePay"> |
|
|
|
<image class="site-icon margin-right-sm" :src="imgURL+'site-yz.png'" mode="widthFix"> |
|
|
|
<image class="site-icon margin-right-sm" :src="imgURL+'site-yz.png'" mode="widthFix"> |
|
|
|
</image> |
|
|
|
</image> |
|
|
|
一键支付 |
|
|
|
一键支付 |
|
|
|
</button> |
|
|
|
</button> |
|
|
|
<!-- <button v-if="qrcodePay" class="cu-btn block bg-main-oil margin-tb-sm lg" @tap="siteQrPay"> |
|
|
|
|
|
|
|
<image class="site-icon margin-right-sm" :src="imgURL+'site-qr.png'" mode="widthFix"> |
|
|
|
|
|
|
|
</image> |
|
|
|
|
|
|
|
二维码支付 |
|
|
|
|
|
|
|
</button> --> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> --> |
|
|
|
<view class="btn bg-white fixed "> |
|
|
|
<view class="btn bg-white fixed "> |
|
|
|
<view class="flex bg-white padding flex-direction"> |
|
|
|
<view class="flex bg-white padding flex-direction"> |
|
|
|
<button class="cu-btn block bg-main-oil lg" @tap="makePay"> |
|
|
|
<button class="cu-btn block bg-main-oil lg" @tap="makePay"> |
|
|
@ -122,11 +117,6 @@ |
|
|
|
</image> |
|
|
|
</image> |
|
|
|
一键支付 |
|
|
|
一键支付 |
|
|
|
</button> |
|
|
|
</button> |
|
|
|
<!-- <button v-if="qrcodePay" class="cu-btn block bg-main-oil margin-tb-sm lg" @tap="siteQrPay"> |
|
|
|
|
|
|
|
<image class="site-icon margin-right-sm" :src="imgURL+'site-qr.png'" mode="widthFix"> |
|
|
|
|
|
|
|
</image> |
|
|
|
|
|
|
|
二维码支付 |
|
|
|
|
|
|
|
</button> --> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -275,12 +265,20 @@ |
|
|
|
let user = uni.getStorageSync('user'); |
|
|
|
let user = uni.getStorageSync('user'); |
|
|
|
let data2 = { |
|
|
|
let data2 = { |
|
|
|
...uni.getStorageSync('location'), |
|
|
|
...uni.getStorageSync('location'), |
|
|
|
siteId: id |
|
|
|
siteId: id, |
|
|
|
|
|
|
|
clientBelong: "BAICHUAN" |
|
|
|
} |
|
|
|
} |
|
|
|
if (user) { |
|
|
|
if (user) { |
|
|
|
oilSiteApi.getSiteDetails(data2).then(res => { |
|
|
|
oilSiteApi.getSiteDetails(data2).then(res => { |
|
|
|
if (res.code == 20000) { |
|
|
|
if (res.code == 20000) { |
|
|
|
this.siteInfo = res.data |
|
|
|
this.siteInfo = res.data |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
setTimeout(()=>{ |
|
|
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
|
|
title:res.msg, |
|
|
|
|
|
|
|
icon:'none' |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
},1000) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -290,16 +288,6 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
makePay() { |
|
|
|
makePay() { |
|
|
|
let user = uni.getStorageSync('user'); |
|
|
|
let user = uni.getStorageSync('user'); |
|
|
|
if (this.activePay && user) { |
|
|
|
|
|
|
|
if (this.siteInfo.juli > 1000) { |
|
|
|
|
|
|
|
this.showtitle = true |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.innerAudioContext && this.innerAudioContext.stop() |
|
|
|
|
|
|
|
uni.navigateTo({ |
|
|
|
|
|
|
|
url: `/BagStation/pages/makeOrder/makeOrder?siteId=${this.siteId}&activeCur=${this.activeCur}` |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
if(!user){ |
|
|
|
if(!user){ |
|
|
|
uni.showModal({ |
|
|
|
uni.showModal({ |
|
|
|
title: '请您登录', |
|
|
|
title: '请您登录', |
|
|
@ -313,20 +301,23 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (this.siteInfo.juli > 1000) { |
|
|
|
|
|
|
|
this.showtitle = true |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
uni.showToast({ |
|
|
|
this.innerAudioContext && this.innerAudioContext.stop() |
|
|
|
title:'暂无可选油品', |
|
|
|
uni.navigateTo({ |
|
|
|
icon:'none' |
|
|
|
url: `/BagStation/pages/makeOrder/makeOrder?siteId=${this.siteId}&activeCur=${this.activeCur}` |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
onChangePayQr(val) { |
|
|
|
onChangePayQr(val) { |
|
|
|
this.qrcodePay = val |
|
|
|
this.qrcodePay = val |
|
|
|
}, |
|
|
|
}, |
|
|
|
onChangePay(val, active) { |
|
|
|
onChangePay(val, active) { |
|
|
|
|
|
|
|
console.log(val) |
|
|
|
this.activePay = val |
|
|
|
this.activePay = val |
|
|
|
this.activeCur = active |
|
|
|
this.activeCur = active |
|
|
|
}, |
|
|
|
}, |
|
|
|