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

@@ -0,0 +1,22 @@
<template>
<view>
<web-view :src="url"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
url:''
}
},
onLoad(options) {
this.url = decodeURIComponent(options.url)
}
}
</script>
<style>
</style>

View File

@@ -20,10 +20,15 @@
<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"
<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>
<view class="text-center text-sm justify-center align-center flex">
@@ -36,7 +41,7 @@
<span style="font-size: 38upx;margin-left: 10upx;;">{{ seconds }}s</span>
</div>
<view class="text-center padding-top text-sm margin-bottom">
提示该二维码每隔3分钟自动刷新一次
提示该二维码每隔3分钟自动刷新一次
<view>如核销失败可点击二维码进行立即刷新再次进行核销</view>
</view>
</view>
@@ -86,6 +91,11 @@
@onShowThirdResult="onShowThirdResult"></third-party-voucher>
</view>
</view> -->
<view class="padding-tb-xs text-left">
油机价格
<text
class="fr">{{order.sitePriceAmount?order.sitePriceAmount+'¥/' +( order.oilProductType=='GAS'?'L':'L') :'暂无'}}</text>
</view>
<view class="dashed-top margin-top-xs padding-top-sm">
<view class="padding-tb-xs text-left">
加油金额
@@ -153,6 +163,7 @@
data() {
const now = new Date()
return {
baseImage:'',
foreground: '#000',
oilItem: {},
status: "",
@@ -258,10 +269,22 @@
this.showQr = false
this.showtext = true
} else if (res.code == 20000) {
this.showQr = true
this.showtext = false
if (res.data.writeOffType === 'url') {
uni.navigateTo({
url: `./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
}
})
},
@@ -413,7 +436,30 @@
}
</script>
<style>
<style lang="scss">
.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;
}
}
}
.move-tops {
transform: translateY(-17px);
}
@@ -436,4 +482,4 @@
padding-top: 60upx;
font-weight: bold;
}
</style>
</style>