【代码优化】拼团:完善邀请拼团海报

This commit is contained in:
puhui999
2024-08-14 11:09:25 +08:00
parent 532503b65b
commit fc396021c6
3 changed files with 9 additions and 10 deletions
+3 -4
View File
@@ -203,7 +203,7 @@
import { computed, reactive } from 'vue';
import sheep from '@/sheep';
import { onLoad } from '@dcloudio/uni-app';
import { useDurationTime } from '@/sheep/hooks/useGoods';
import { fen2yuan, useDurationTime } from '@/sheep/hooks/useGoods';
import { showShareModal } from '@/sheep/hooks/useModal';
import { isEmpty } from 'lodash-es';
import CombinationApi from '@/sheep/api/promotion/combination';
@@ -231,15 +231,14 @@
desc: state.data.goods?.subtitle,
params: {
page: '5',
query: state.data.id,
query: state.data.headRecord.id,
},
},
{
type: 'groupon', // 邀请拼团海报
title: state.data.headRecord.spuName, // 商品标题
image: sheep.$url.cdn(state.data.headRecord.picUrl), // 商品主图
price: state.data.goods?.price, // 商品价格
original_price: state.data.goods?.original_price, // 商品原价
price: fen2yuan(state.data.headRecord.combinationPrice), // 商品价格
},
);
});
@@ -66,7 +66,7 @@
css: {
// 根节点若无尺寸,自动获取父级节点
width: sheep.$platform.device.windowWidth * 0.9,
height: 550,
height: 600,
},
views: [],
});
@@ -82,12 +82,12 @@ const groupon = async (poster) => {
type: 'text',
text: '2人团',
css: {
color: '#ff0000',
fontSize: 30,
color: '#fff',
fontSize: 12,
fontFamily: 'OPPOSANS',
position: 'fixed',
left: width * 0.3,
top: width * 1.32,
left: width * 0.84,
top: width * 1.3,
},
},
// #ifndef MP-WEIXIN
@@ -96,7 +96,7 @@ const groupon = async (poster) => {
text: poster.shareInfo.link,
css: {
position: 'fixed',
left: width * 0.75,
left: width * 0.5,
top: width * 1.3,
width: width * 0.2,
height: width * 0.2,