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>
</view>
</view>
<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;">
<canvas style="width:200px; height: 200px;"
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>
</uni-popup>
@ -64,7 +64,7 @@
import VNavigationBar from '@/components/VNavigationBar.vue'
import tabBarVue from '@/components/tabBar/tabBar.vue'
import drawQrcode from 'weapp-qrcode';
export default {
components: {
tabBarVue,
@ -160,10 +160,10 @@
method: 'get',
params: {orderId:data.id}
}).then((res) => {
this.$refs.popup.open()
setTimeout(()=>{
drawQrcode({
width: 200,
height: 200,
@ -174,11 +174,11 @@
}, 60)
})
},
convertToImage() {
convertToImage() {
uni.canvasToTempFilePath({
canvasId: 'myQrcode',
success: function(res) {
// H5tempFilePath base64
@ -187,11 +187,11 @@
this.$forceUpdate()
console.log(this.imageUrl,200);
}
})
})
} ,
popupChange({show}) {
if (show) {
}
},
gotoDetail() {
@ -220,6 +220,7 @@
flex: 1;
height: 0;
padding: 24rpx 32rpx;
overflow: auto;
}
.tabList {
@ -337,4 +338,4 @@
}
}
}
</style>
</style>