|
@@ -52,7 +52,7 @@ const createPoster = () => {
|
|
|
data.value.quantity ? data.value.activedImage : data.value.image,
|
|
|
designer.value.headImgUrl || userInfo.value?.avatar || NetImages.DefaultAvatar,
|
|
|
NetImages.Logo,
|
|
|
- designer.value?.qrcodeUrl,
|
|
|
+ designer.value?.homeUrl,
|
|
|
].map((it) => it && uni.getImageInfo({ src: it }).then(({ path }) => path)),
|
|
|
)
|
|
|
const ctx = uni.createCanvasContext('firstCanvas')
|
|
@@ -70,13 +70,13 @@ const createPoster = () => {
|
|
|
canvas.FillText(userInfo.value?.nickname, '#ffffff', 16, 63, 46)
|
|
|
const textNameWidth = ctx.measureText(data.value.name).width
|
|
|
const textDesWidth = ctx.measureText(subTitle.value).width
|
|
|
+ console.log(textDesWidth)
|
|
|
canvas.FillText(data.value?.name, '#ffffff', 18, (345 - textNameWidth) / 2, 291)
|
|
|
- canvas.FillText(subTitle.value, '#ffffff', 14, (345 - textDesWidth) / 2, 326)
|
|
|
-
|
|
|
- canvas.Image(icon1, 17, 415, 28, 28)
|
|
|
- canvas.FillText('筑巢荟', '#ffffff', 18, 63, 436)
|
|
|
+ canvas.FillText(subTitle.value, '#ffffff', 14, (365 - textDesWidth) / 2, 326)
|
|
|
+ // canvas.Image(icon1, 17, 415, 28, 28)
|
|
|
+ // canvas.FillText('筑巢荟', '#ffffff', 18, 63, 436)
|
|
|
canvas.Image(icon2, 250, 393, 80, 80)
|
|
|
-
|
|
|
+
|
|
|
ctx.draw(true, () => {
|
|
|
uni.canvasToTempFilePath({
|
|
|
canvasId: 'firstCanvas',
|