【代码优化】拼团:完善邀请拼团海报
parent
532503b65b
commit
fc396021c6
|
@ -203,7 +203,7 @@
|
||||||
import { computed, reactive } from 'vue';
|
import { computed, reactive } from 'vue';
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
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 { showShareModal } from '@/sheep/hooks/useModal';
|
||||||
import { isEmpty } from 'lodash-es';
|
import { isEmpty } from 'lodash-es';
|
||||||
import CombinationApi from '@/sheep/api/promotion/combination';
|
import CombinationApi from '@/sheep/api/promotion/combination';
|
||||||
|
@ -231,15 +231,14 @@
|
||||||
desc: state.data.goods?.subtitle,
|
desc: state.data.goods?.subtitle,
|
||||||
params: {
|
params: {
|
||||||
page: '5',
|
page: '5',
|
||||||
query: state.data.id,
|
query: state.data.headRecord.id,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'groupon', // 邀请拼团海报
|
type: 'groupon', // 邀请拼团海报
|
||||||
title: state.data.headRecord.spuName, // 商品标题
|
title: state.data.headRecord.spuName, // 商品标题
|
||||||
image: sheep.$url.cdn(state.data.headRecord.picUrl), // 商品主图
|
image: sheep.$url.cdn(state.data.headRecord.picUrl), // 商品主图
|
||||||
price: state.data.goods?.price, // 商品价格
|
price: fen2yuan(state.data.headRecord.combinationPrice), // 商品价格
|
||||||
original_price: state.data.goods?.original_price, // 商品原价
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
css: {
|
css: {
|
||||||
// 根节点若无尺寸,自动获取父级节点
|
// 根节点若无尺寸,自动获取父级节点
|
||||||
width: sheep.$platform.device.windowWidth * 0.9,
|
width: sheep.$platform.device.windowWidth * 0.9,
|
||||||
height: 550,
|
height: 600,
|
||||||
},
|
},
|
||||||
views: [],
|
views: [],
|
||||||
});
|
});
|
||||||
|
|
|
@ -82,12 +82,12 @@ const groupon = async (poster) => {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
text: '2人团',
|
text: '2人团',
|
||||||
css: {
|
css: {
|
||||||
color: '#ff0000',
|
color: '#fff',
|
||||||
fontSize: 30,
|
fontSize: 12,
|
||||||
fontFamily: 'OPPOSANS',
|
fontFamily: 'OPPOSANS',
|
||||||
position: 'fixed',
|
position: 'fixed',
|
||||||
left: width * 0.3,
|
left: width * 0.84,
|
||||||
top: width * 1.32,
|
top: width * 1.3,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// #ifndef MP-WEIXIN
|
// #ifndef MP-WEIXIN
|
||||||
|
@ -96,7 +96,7 @@ const groupon = async (poster) => {
|
||||||
text: poster.shareInfo.link,
|
text: poster.shareInfo.link,
|
||||||
css: {
|
css: {
|
||||||
position: 'fixed',
|
position: 'fixed',
|
||||||
left: width * 0.75,
|
left: width * 0.5,
|
||||||
top: width * 1.3,
|
top: width * 1.3,
|
||||||
width: width * 0.2,
|
width: width * 0.2,
|
||||||
height: width * 0.2,
|
height: width * 0.2,
|
||||||
|
|
Loading…
Reference in New Issue