This commit is contained in:
xiaozhiyong
2024-12-31 14:45:51 +08:00
parent 5803d8a222
commit 949707d0ec
12 changed files with 264 additions and 110 deletions

View File

@@ -13,9 +13,13 @@
<view class="qr-container ">
<view class="qrimg">
<view class="qrimg" @tap="newQrString">
<tki-qrcode ref="qrcode" cid="2" loadMake :val="val" :size="250" unit="upx" background="#fff"
:foreground="foreground" :pdground="foreground" :icon="iconUrl" iconSize="40" onval
:usingComponents="usingComponents" showLoading />
<view v-if="baseImage" class="base-image">
<image src="https://xoi-support.oss-cn-hangzhou.aliyuncs.com/星油运营小程序/qr-bg.png" />
<image mode="heightFix" :src="baseImage"></image>
</view>
<tki-qrcode v-else ref="qrcode" cid="2" loadMake :val="val" :size="250" unit="upx"
background="#fff" :foreground="foreground" :pdground="foreground" :icon="iconUrl"
iconSize="40" onval :usingComponents="usingComponents" showLoading />
</view>
</view>
</view>
@@ -73,6 +77,12 @@
<text
class="fr">{{order.sitePrice?order.sitePrice+'¥/' +( order.oilProductType=='GAS'?'L':'L') :'暂无'}}</text>
</view>
<view class="padding-tb-xs text-left">
油机价格
<text
class="fr">{{order.sitePriceAmount?order.sitePriceAmount+'¥/' +( order.oilProductType=='GAS'?'L':'L') :'暂无'}}</text>
</view>
<view class="padding-tb-xs text-left">
优惠价格
<text
@@ -167,6 +177,7 @@
export default {
data() {
return {
baseImage: '',
foreground: '#000',
showQr: false,
val: '',
@@ -211,14 +222,26 @@
},
getOrderQrCode() {
oilSiteApi.getOrderQrCode(this.order.orderSerialNumber).then((res) => {
console.log(res)
// console.log(res)
this.val = res.data
if (res.code == 40000) {
this.showQr = false
} else if (res.code == 20000) {
this.showQr = true
if (res.data.writeOffType === 'url') {
uni.navigateTo({
url: `/BagStation/pages/makeOrder/G7Supplier?url=${encodeURIComponent(res.data.codeStr)}`
})
return
}
if (res.data.writeOffType === 'image') {
this.baseImage = res.data.codeStr
this.showQr = true
return
}
this.val = res.data.codeStr;
this.foreground = this.val.indexOf('SHLFC/V1') == -1 ? '#000' : '#1A487E';
this.showQr = true
}
})
},
@@ -402,6 +425,31 @@
</script>
<style lang="scss" scoped>
.base-image {
position: relative;
padding: 50rpx 0;
image {
&:nth-of-type(1) {
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
width: 100%;
height: 100%;
max-width: 100%;
z-index: 0;
background-color: #ffffff;
padding: 2%;
}
&:nth-of-type(2) {
// width: 250rpx;
height: 250rpx;
}
}
}
.customer-service {
position: fixed;
@@ -426,6 +474,7 @@
margin-right: 7rpx;
}
}
.move-tops {
transform: translateY(-17px);
}
@@ -445,4 +494,4 @@
.move-top {
margin-top: -2rem;
}
</style>
</style>