From 8294a578b3f0c9588f44381312110346f3ee3eb9 Mon Sep 17 00:00:00 2001 From: PQZ Date: Tue, 24 Sep 2024 00:06:18 +0800 Subject: [PATCH] 1 --- pages/orderList/orderList.vue | 33 +++++++++++++++++++++++++++++---- utils/request.js | 2 +- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/pages/orderList/orderList.vue b/pages/orderList/orderList.vue index 1fd477d..645604f 100644 --- a/pages/orderList/orderList.vue +++ b/pages/orderList/orderList.vue @@ -42,15 +42,22 @@ 评价订单 + + + + - - 收款码 +
11{{imageUrl}}
+ + + + 长按扫一扫支付
- + @@ -74,6 +81,7 @@ activeKey: 0, pageNum:1, totalPages:0, + imageUrl:null, tabList: [{ id: 0, title: '全部订单' @@ -168,9 +176,26 @@ text: res.data.code_url }) }, 60) + setTimeout(()=>{ + that.convertToImage() + + }, 500) }) }, + + convertToImage() { + + uni.canvasToTempFilePath({ + + canvasId: 'myQrcode', + success: function(res) { + // 在H5平台下,tempFilePath 为 base64 + this.imageUrl = res.tempFilePath.replace(/[\r\n]/g, "") + console.log(this.imageUrl,200); + } + }) + } , popupChange({show}) { if (show) { diff --git a/utils/request.js b/utils/request.js index e6f8ff3..15856cd 100644 --- a/utils/request.js +++ b/utils/request.js @@ -14,7 +14,7 @@ const request = config => { if (getToken() && !isToken) { config.header['Authorization'] = 'Bearer ' + getToken() }else{ - config.header['Authorization'] = 'Bearer ' +'1c734ee940d94a9fbbedf7422c866bb8' + config.header['Authorization'] = 'Bearer ' +'6e753c0a509e4d01bde4f315f6a39ceb' } // get请求映射params参数 if (config.params) {