From 3b6327a78f37b9c7dc5909085b12e838ee6b5817 Mon Sep 17 00:00:00 2001
From: huliyong <2783385703@qq.com>
Date: Wed, 26 Feb 2025 13:07:34 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages_order/mine/promotion.vue | 42 ++++++++++++++++++++++-----------------
pages_order/order/createOrder.vue | 2 +-
2 files changed, 25 insertions(+), 19 deletions(-)
diff --git a/pages_order/mine/promotion.vue b/pages_order/mine/promotion.vue
index 46aeb04..413523b 100644
--- a/pages_order/mine/promotion.vue
+++ b/pages_order/mine/promotion.vue
@@ -9,7 +9,7 @@
+ :src="imagePath" mode="aspectFill">
@@ -36,36 +36,37 @@ import index from '../../uni_modules/uv-ui-tools'
title: '',
baseUrl: 'https://image.hhlm1688.com/',
canvas: {},
- imagePath: '',
+ imagePath: 'https://image.hhlm1688.com/2025-02-26/6539d2fa-558d-47db-9681-ecffec5b6c5d.png',
index : 0,
}
},
onShow() {
- let that = this;
- if(!that.promotionUrl){
- // that.getQrCode()
- uni.showLoading({
- title: "拼命绘画中..."
- })
- }
- that.$store.commit('getUserInfo')
+ // let that = this;
+ // that.draw()
+ // if(!that.promotionUrl){
+ // // that.getQrCode()
+ // uni.showLoading({
+ // title: "拼命绘画中..."
+ // })
+ // }
+ // that.$store.commit('getUserInfo')
},
methods: {
getQrCode() {
- uni.showLoading({
- title: "拼命绘画中..."
- })
+ // uni.showLoading({
+ // title: "拼命绘画中..."
+ // })
let that = this;
that.$api('getInviteCode', res => {
if (res.code == 200) {
that.url = res.result.url
that.title = res.result.name
- that.imagePath = that.$config.aliOss.url + res.result.url
+ // that.imagePath = that.$config.aliOss.url + res.result.url
- that.$store.commit('setPromotionUrl', that.imagePath)
+ // that.$store.commit('setPromotionUrl', that.imagePath)
- // that.draw()
+ that.draw()
uni.hideLoading()
}
})
@@ -118,7 +119,8 @@ import index from '../../uni_modules/uv-ui-tools'
//二维码图片
const coderImage = canvas.createImage()
- coderImage.src = that.baseUrl + that.url
+ coderImage.src = '../static/p.jpg'
+ // coderImage.src = that.baseUrl + that.url
let size = 0;
console.log("----------2")
@@ -129,12 +131,16 @@ import index from '../../uni_modules/uv-ui-tools'
0, 0, bgImage.width, bgImage.height)
size = Math.floor(canvas.width / 3)
+
+ ctx.drawImage(coderImage,
+ canvas.width / 2 - (size / 2), canvas.height * 0.46, size, size)
+
that.canvasToTempFilePath()
}
console.log("----------3")
coderImage.onload = () => {
ctx.drawImage(coderImage,
- canvas.width / 2 - (size / 2), canvas.height * 0.6, size, size)
+ canvas.width / 2 - (size / 2), canvas.height * 0.46, size, size)
that.canvasToTempFilePath()
}
diff --git a/pages_order/order/createOrder.vue b/pages_order/order/createOrder.vue
index 67a99ec..3b41b36 100644
--- a/pages_order/order/createOrder.vue
+++ b/pages_order/order/createOrder.vue
@@ -384,7 +384,7 @@
}
uni.requestPaymentWxPay(res)
- .then(res => {
+ .then(e => {
uni.showToast({
title: '下单成功',
icon: 'none'