This commit is contained in:
sunliwei 2024-09-24 16:03:57 +08:00
parent fd6ddb5122
commit f84f9fc043

View File

@ -42,15 +42,15 @@
<view @click="gotoEvaluate(item)" class="evaluate" >评价订单</view> <view @click="gotoEvaluate(item)" class="evaluate" >评价订单</view>
</view> </view>
</view> </view>
</view> </view>
<uni-popup ref="popup" type="center" border-radius="10px 10px 0 0" @change="popupChange"> <uni-popup ref="popup" type="center" border-radius="10px 10px 0 0" @change="popupChange">
<view style="position: relative;padding: 30rpx;border-radius:20rpx;width: 600rpx;background-color: #fff;display: flex;align-items: center;row-gap: 10rpx;flex-direction: column;"> <view style="position: relative;padding: 30rpx;border-radius:20rpx;width: 600rpx;background-color: #fff;display: flex;align-items: center;row-gap: 10rpx;flex-direction: column;">
<canvas style="width:200px; height: 200px;" <canvas style="width:200px; height: 200px;"
canvas-id="myQrcode"></canvas> canvas-id="myQrcode"></canvas>
<img id="dl-pay-img" style="width: 200px; height: 200px;position: absolute;top: 30rpx;" :key="imageUrl" :src="imageUrl" /> <img id="dl-pay-img" style="width: 200px; height: 200px;position: absolute;top: 30rpx;" :key="imageUrl" :src="imageUrl" />
<view class="popup-title">长按识别图中二维码支付</view> <view class="popup-title">长按识别图中二维码支付</view>
</view> </view>
</uni-popup> </uni-popup>
@ -64,7 +64,7 @@
import VNavigationBar from '@/components/VNavigationBar.vue' import VNavigationBar from '@/components/VNavigationBar.vue'
import tabBarVue from '@/components/tabBar/tabBar.vue' import tabBarVue from '@/components/tabBar/tabBar.vue'
import drawQrcode from 'weapp-qrcode'; import drawQrcode from 'weapp-qrcode';
export default { export default {
components: { components: {
tabBarVue, tabBarVue,
@ -160,10 +160,10 @@
method: 'get', method: 'get',
params: {orderId:data.id} params: {orderId:data.id}
}).then((res) => { }).then((res) => {
this.$refs.popup.open() this.$refs.popup.open()
setTimeout(()=>{ setTimeout(()=>{
drawQrcode({ drawQrcode({
width: 200, width: 200,
height: 200, height: 200,
@ -174,11 +174,11 @@
}, 60) }, 60)
}) })
}, },
convertToImage() { convertToImage() {
uni.canvasToTempFilePath({ uni.canvasToTempFilePath({
canvasId: 'myQrcode', canvasId: 'myQrcode',
success: function(res) { success: function(res) {
// H5tempFilePath base64 // H5tempFilePath base64
@ -187,11 +187,11 @@
this.$forceUpdate() this.$forceUpdate()
console.log(this.imageUrl,200); console.log(this.imageUrl,200);
} }
}) })
} , } ,
popupChange({show}) { popupChange({show}) {
if (show) { if (show) {
} }
}, },
gotoDetail() { gotoDetail() {
@ -220,6 +220,7 @@
flex: 1; flex: 1;
height: 0; height: 0;
padding: 24rpx 32rpx; padding: 24rpx 32rpx;
overflow: auto;
} }
.tabList { .tabList {
@ -337,4 +338,4 @@
} }
} }
} }
</style> </style>