From 908b9876dde97acbb09c53dc6debe3eecbb9d1b4 Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期二, 28 四月 2026 22:10:32 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
small-program/pages/payment-success/payment-success.vue | 36 +++++++++++++++++++++++++-----------
1 files changed, 25 insertions(+), 11 deletions(-)
diff --git a/small-program/pages/payment-success/payment-success.vue b/small-program/pages/payment-success/payment-success.vue
index 17726d7..bf9bbe0 100644
--- a/small-program/pages/payment-success/payment-success.vue
+++ b/small-program/pages/payment-success/payment-success.vue
@@ -16,13 +16,13 @@
</view>
<view class="pickup-card">
- <text class="pickup-title">鑷彁鐮�</text>
+ <text class="pickup-title">鏍搁攢鐮�</text>
<view class="qrcode-box">
- <canvas canvas-id="qrcodeCanvas" id="qrcodeCanvas"></canvas>
- <image class="qrcode-image" :src="qrcodeImage" mode="aspectFit"></image>
+ <canvas canvas-id="qrcodeCanvas" id="qrcodeCanvas" :style="'width: '+width+'px; height:'+height+'px;'"></canvas>
+ <image class="qrcode-image" :src="qrcodeImage" mode="widthFix"></image>
</view>
<text class="pickup-code">{{ orderDetail.memberVerifyCode }}</text>
- <text class="pickup-tip" @tap="copyCode">鐐瑰嚮澶嶅埗鑷彁鐮�</text>
+ <text class="pickup-tip" @tap="copyCode">鐐瑰嚮澶嶅埗鏍搁攢鐮�</text>
</view>
</view>
</view>
@@ -33,7 +33,10 @@
export default {
data() {
+
return {
+ height:100,
+ width:100,
orderId: '',
orderDetail: null,
qrcodeImage: ''
@@ -45,6 +48,8 @@
title: '鏀粯鎴愬姛'
})
this.getOrderDetail()
+ this.width = this.rpxToPx(200)
+ this.height = this.rpxToPx(200)
},
methods: {
async getOrderDetail() {
@@ -56,13 +61,16 @@
}
}
},
+ rpxToPx(rpx) {
+ return rpx * wx.getSystemInfoSync().windowWidth / 750
+ },
generateQrcode(code) {
drawQrcode({
canvasId: 'qrcodeCanvas',
text: code,
- width: 200,
- height: 200,
- correctLevel: drawQrcode.CorrectLevel.H
+ width: this.width,
+ height: this.height,
+ correctLevel: 2
})
setTimeout(() => {
uni.canvasToTempFilePath({
@@ -79,8 +87,8 @@
})
},
viewOrder() {
- uni.redirectTo({
- url: '/pages/itinerary/itinerary?orderId=' + this.orderId
+ uni.navigateTo({
+ url:'/pages/delivery-order-detail/delivery-order-detail?userType=0&id='+this.orderId
})
},
copyCode() {
@@ -96,7 +104,7 @@
})
}
})
- }
+ }
}
}
</script>
@@ -201,12 +209,18 @@
height: 360rpx;
border-radius: 8rpx;
box-sizing: border-box;
+ position: relative;
+ canvas {
+ position: absolute;
+ top: 0;
+ left: 0;
+ opacity: 0;
+ }
}
.qrcode-image {
width: 100%;
height: 100%;
- background: #f4f6fa;
}
.pickup-code {
--
Gitblit v1.9.3