|
|
|
@ -101,20 +101,15 @@ |
|
|
|
|
</view> |
|
|
|
|
<!-- 底部去支付 --> |
|
|
|
|
<view class="" > |
|
|
|
|
<view class="btn bg-white placeholder-hidden"> |
|
|
|
|
<!-- <view class="btn bg-white placeholder-hidden"> |
|
|
|
|
<view class="flex bg-white padding flex-direction"> |
|
|
|
|
<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> |
|
|
|
|
一键支付 |
|
|
|
|
</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 class="btn bg-white fixed "> |
|
|
|
|
<view class="flex bg-white padding flex-direction"> |
|
|
|
|
<button class="cu-btn block bg-main-oil lg" @tap="makePay"> |
|
|
|
@ -122,11 +117,6 @@ |
|
|
|
|
</image> |
|
|
|
|
一键支付 |
|
|
|
|
</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> |
|
|
|
@ -275,12 +265,20 @@ |
|
|
|
|
let user = uni.getStorageSync('user'); |
|
|
|
|
let data2 = { |
|
|
|
|
...uni.getStorageSync('location'), |
|
|
|
|
siteId: id |
|
|
|
|
siteId: id, |
|
|
|
|
clientBelong: "BAICHUAN" |
|
|
|
|
} |
|
|
|
|
if (user) { |
|
|
|
|
oilSiteApi.getSiteDetails(data2).then(res => { |
|
|
|
|
if (res.code == 20000) { |
|
|
|
|
this.siteInfo = res.data |
|
|
|
|
}else { |
|
|
|
|
setTimeout(()=>{ |
|
|
|
|
uni.showToast({ |
|
|
|
|
title:res.msg, |
|
|
|
|
icon:'none' |
|
|
|
|
}) |
|
|
|
|
},1000) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
@ -290,36 +288,28 @@ |
|
|
|
|
}, |
|
|
|
|
makePay() { |
|
|
|
|
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){ |
|
|
|
|
uni.showModal({ |
|
|
|
|
title: '请您登录', |
|
|
|
|
content: "登录佰川加油才可以加油 |˛˙꒳˙)♡", |
|
|
|
|
confirmText: '去登陆', |
|
|
|
|
success: (res) => { |
|
|
|
|
if (res.confirm) { |
|
|
|
|
uni.reLaunch({ |
|
|
|
|
url: '../../../BagAuth/pages/login/login?loginType=true' |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
if(!user){ |
|
|
|
|
uni.showModal({ |
|
|
|
|
title: '请您登录', |
|
|
|
|
content: "登录佰川加油才可以加油 |˛˙꒳˙)♡", |
|
|
|
|
confirmText: '去登陆', |
|
|
|
|
success: (res) => { |
|
|
|
|
if (res.confirm) { |
|
|
|
|
uni.reLaunch({ |
|
|
|
|
url: '../../../BagAuth/pages/login/login?loginType=true' |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}else{ |
|
|
|
|
uni.showToast({ |
|
|
|
|
title:'暂无可选油品', |
|
|
|
|
icon:'none' |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
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}` |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
@ -327,6 +317,7 @@ |
|
|
|
|
this.qrcodePay = val |
|
|
|
|
}, |
|
|
|
|
onChangePay(val, active) { |
|
|
|
|
console.log(val) |
|
|
|
|
this.activePay = val |
|
|
|
|
this.activeCur = active |
|
|
|
|
}, |
|
|
|
|