Commit d4fb7b08 authored by XieZhiXiong's avatar XieZhiXiong
parents bc66f2e4 edf06509
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
"@linkseeks/design-core": "^1.0.0", "@linkseeks/design-core": "^1.0.0",
"@linkseeks/design-react": "^1.0.0", "@linkseeks/design-react": "^1.0.0",
"@linkseeks/design-react-web": "^1.0.0", "@linkseeks/design-react-web": "^1.0.0",
"@linkseeks/design-ui": "^1.0.0", "@linkseeks/design-ui": "^1.0.2",
"@turf/turf": "^6.4.0", "@turf/turf": "^6.4.0",
"@types/crypto-js": "^4.0.1", "@types/crypto-js": "^4.0.1",
"@types/js-cookie": "^2.2.6", "@types/js-cookie": "^2.2.6",
......
...@@ -188,6 +188,17 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = props => { ...@@ -188,6 +188,17 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = props => {
return ''; return '';
}; };
const getGroupLabel = (info: any) => {
if (!info || !info?.activityList) return ''
let label = ''
info.activityList.forEach((item) => {
if (item.id === info.activityId) {
label = item.label
}
})
return label
}
const getComponentsConfig = async () => { const getComponentsConfig = async () => {
try { try {
const appConfig = await getAppChannelConfig(); const appConfig = await getAppChannelConfig();
...@@ -686,6 +697,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = props => { ...@@ -686,6 +697,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = props => {
detail: { detail: {
title: item.productName, title: item.productName,
img: item.productImgUrl, img: item.productImgUrl,
label: getGroupLabel(item),
originalPrice: priceFormat(item.price), originalPrice: priceFormat(item.price),
discountPrice: priceFormat(item.activityPrice), discountPrice: priceFormat(item.activityPrice),
endTime: 1627372487509, endTime: 1627372487509,
......
...@@ -188,6 +188,17 @@ const OwnMallTempleteEdit: React.FC<ShopPreviewPropsType> = props => { ...@@ -188,6 +188,17 @@ const OwnMallTempleteEdit: React.FC<ShopPreviewPropsType> = props => {
} }
}; };
const getGroupLabel = (info: any) => {
if (!info || !info?.activityList) return ''
let label = ''
info.activityList.forEach((item) => {
if (item.id === info.activityId) {
label = item.label
}
})
return label
}
const getComponentsConfig = async () => { const getComponentsConfig = async () => {
try { try {
const appConfig = await getAppConfig(); const appConfig = await getAppConfig();
...@@ -687,6 +698,7 @@ const OwnMallTempleteEdit: React.FC<ShopPreviewPropsType> = props => { ...@@ -687,6 +698,7 @@ const OwnMallTempleteEdit: React.FC<ShopPreviewPropsType> = props => {
detail: { detail: {
title: item.productName, title: item.productName,
img: item.productImgUrl, img: item.productImgUrl,
label: getGroupLabel(item),
originalPrice: item.activityPrice ? priceFormat(item.price) : undefined, originalPrice: item.activityPrice ? priceFormat(item.price) : undefined,
discountPrice: priceFormat(item.activityPrice ? item.activityPrice : item.price), discountPrice: priceFormat(item.activityPrice ? item.activityPrice : item.price),
endTime: 1627372487509, endTime: 1627372487509,
......
...@@ -250,6 +250,17 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => { ...@@ -250,6 +250,17 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
return listRes return listRes
} }
const getGroupLabel = (info: any) => {
if (!info || !info?.activityList) return ''
let label = ''
info.activityList.forEach((item) => {
if (item.id === info.activityId) {
label = item.label
}
})
return label
}
const getComponentsConfig = async () => { const getComponentsConfig = async () => {
try { try {
const appConfig = await getAppShopConfig() const appConfig = await getAppShopConfig()
...@@ -775,6 +786,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => { ...@@ -775,6 +786,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
detail: { detail: {
title: item.productName, title: item.productName,
img: item.productImgUrl, img: item.productImgUrl,
label: getGroupLabel(item),
originalPrice: item.activityPrice ? priceFormat(item.price) : undefined, originalPrice: item.activityPrice ? priceFormat(item.price) : undefined,
discountPrice: priceFormat(item.activityPrice ? item.activityPrice : item.price), discountPrice: priceFormat(item.activityPrice ? item.activityPrice : item.price),
endTime: 1627372487509, endTime: 1627372487509,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment