This commit is contained in:
PQZ 2024-09-24 00:19:47 +08:00
parent 8294a578b3
commit 508ca8f135

View File

@ -42,24 +42,19 @@
<view @click="gotoEvaluate(item)" class="evaluate" >评价订单</view> <view @click="gotoEvaluate(item)" class="evaluate" >评价订单</view>
</view> </view>
</view> </view>
<canvas style="width:200px; height: 200px; z-index: 9999999;margin: 40px auto;"
canvas-id="myQrcode"></canvas>
</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="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;">
<div>11{{imageUrl}}</div> <canvas style="width:200px; height: 200px;"
<img style="width: 200px; height: 200px;" :src="imageUrl" /> canvas-id="myQrcode"></canvas>
<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>
</view> </view>
<tabBarVue msg="2"></tabBarVue> <tabBarVue msg="2"></tabBarVue>
</view> </view>
</template> </template>
@ -81,7 +76,7 @@
activeKey: 0, activeKey: 0,
pageNum:1, pageNum:1,
totalPages:0, totalPages:0,
imageUrl:null, imageUrl:'',
tabList: [{ tabList: [{
id: 0, id: 0,
title: '全部订单' title: '全部订单'
@ -175,12 +170,8 @@
canvasId: 'myQrcode', canvasId: 'myQrcode',
text: res.data.code_url text: res.data.code_url
}) })
}, 60)
setTimeout(()=>{
that.convertToImage() that.convertToImage()
}, 60)
}, 500)
}) })
}, },
@ -191,7 +182,9 @@
canvasId: 'myQrcode', canvasId: 'myQrcode',
success: function(res) { success: function(res) {
// H5tempFilePath base64 // H5tempFilePath base64
this.imageUrl = res.tempFilePath.replace(/[\r\n]/g, "") // this.imageUrl = res.tempFilePath.replace(/[\r\n]/g, "")
document.getElementById("dl-pay-img").setAttribute("src",res.tempFilePath.replace(/[\r\n]/g, ""))
this.$forceUpdate()
console.log(this.imageUrl,200); console.log(this.imageUrl,200);
} }
}) })