海报:完善小程序码获取和海报生成

This commit is contained in:
puhui999
2024-05-13 16:22:55 +08:00
parent 8815972188
commit 004294ae7c
11 changed files with 78 additions and 42 deletions
@@ -1,10 +1,11 @@
import sheep from '@/sheep';
import { formatImageUrlProtocol } from './index';
import third from '@/sheep/api/migration/third';
import { formatImageUrlProtocol, getBase64Src } from './index';
const goods = (poster) => {
const goods = async (poster) => {
const width = poster.width;
const userInfo = sheep.$store('user').userInfo;
const wxa_qrcode = (await third.wechat.getWxacode(poster.shareInfo.path, poster.shareInfo.query)).data;
return {
background: formatImageUrlProtocol(sheep.$url.cdn(sheep.$store('app').platform.share.posterInfo.goods_bg)),
list: [
@@ -107,7 +108,7 @@ const goods = (poster) => {
{
name: 'wxacode',
type: 'image',
val: sheep.$api.third.wechat.getWxacode(poster.shareInfo.path),
val: wxa_qrcode,
x: width * 0.75,
y: width * 1.3,
width: width * 0.2,