Commit 5e718202 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏
parents 4aff3956 3c4b9013
......@@ -719,10 +719,12 @@ export const paramsShop = (
if (_childList?.length) {
const _customize: any = [];
for (const keys in _childList) {
_customize.push({
id: pageConfig[_childList[keys]].props.id,
tags: pageConfig[_childList[keys]].props.tags,
});
if (pageConfig[_childList[keys]].props.id) {
_customize.push({
id: pageConfig[_childList[keys]].props.id,
tags: pageConfig[_childList[keys]].props.tags,
});
}
}
_obj.customize =_customize;
}
......@@ -1360,10 +1362,12 @@ export const paramsShop = (
if (_childList?.length) {
const _customize: any = [];
for (const keys in _childList) {
_customize.push({
id: pageConfig[_childList[keys]].props.id,
tags: pageConfig[_childList[keys]].props.tags,
});
if (pageConfig[_childList[keys]].props.id) {
_customize.push({
id: pageConfig[_childList[keys]].props.id,
tags: pageConfig[_childList[keys]].props.tags || [],
});
}
}
_obj.customize =_customize;
}
......
......@@ -109,7 +109,11 @@ const BannerClient: React.FC<BannerClientProps> = (props: BannerClientProps) =>
case 4:
return PublicApi.getTemplateWebMemberShopWebFindById
case 5:
return PublicApi.getManageContentInformationListAdorn
if (layoutType !== 'own') {
return PublicApi.getManageContentInformationListAdorn
} else {
return PublicApi.getManageMemberInformationListAdorn
}
}
return async () => { }
}, [type])
......
......@@ -135,7 +135,7 @@ const BottomNavigationClient: React.FC<BottomNavigationClientProps> = (props: Bo
<div className={styles['bottomNavigationClient']}>
<div className={styles['bottomNavigationClient-box']}>
<div className={styles['bottomNavigationClient-box-label']}>名称</div>
<Input key={`${selectedKey}-name`} maxLength={4} disabled={type === 1} defaultValue={name} onBlur={_onChangeName} />
<Input key={`${selectedKey}-name`} maxLength={4} defaultValue={name} onBlur={_onChangeName} />
</div>
<div className={styles['bottomNavigationClient-box']}>
<div className={styles['bottomNavigationClient-box-label']}>链接</div>
......
......@@ -13,6 +13,7 @@ import {
resolveMappingPageConfig,
updatePageConfig,
} from '@lingxi-disign/react';
import moment from 'moment'
import ToolBar from '../../editor/components/toolBar';
import MobileDesignPanel from '../../editor/components/MobileDesignPanel';
import MobileClientEditLeft from '../../editor/components/mobileClientEditLeft';
......@@ -1014,6 +1015,35 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = props => {
}
}
}
if (appConfig?.coupon) {
// 优惠券弹窗
const _details = appConfig?.coupon?.details;
_couponsModalConfig['13'].props.title = _details?.title;
if (_details.id.length > 0) {
const _couponList = _details.id?.map((item) => { return { belongType: item.belongType, couponId: item.id }; });
const _couponListData = await PublicApi.postMarketingCouponActivityPageSelectDetail({ couponList: _couponList });
message.destroy();
if (_couponListData.code === 1000) {
_couponListData.data?.forEach((item, index) => {
console.log(item, 'couponitem')
const _newKey: any = `13-${Number(index) + 1}`;
!_couponsModalConfig['13'].childNodes.includes(_newKey) && _couponsModalConfig['13'].childNodes.push(_newKey);
_couponsModalConfig[_newKey] = {
key: _newKey,
title: item.name,
componentName: 'CouponsModal.CouponsItem',
props: {
...item,
expiredDay: moment(item?.releaseTimeEnd || moment()).diff(moment(), 'days'),
isnull: false
}
};
});
}
}
}
!_mallLayoutConfig['0'].childNodes.includes('12') &&
_mallLayoutConfig['0'].childNodes.push('12');
......
......@@ -22,6 +22,7 @@ import { priceFormat } from '@/utils/numberFomat';
import * as MarketingConfigs from './marketing_config';
import { cloneDeep } from 'lodash';
import { GlobalConfig } from '@/global/config'
import moment from 'moment'
import {
defaultHeaderNavData,
channelLayoutConfig,
......@@ -1005,39 +1006,71 @@ const OwnMallTempleteEdit: React.FC<ShopPreviewPropsType> = props => {
memberRoleId,
};
const _detailsData = await PublicApi.getMarketingAdornGoodsListAdorn(
param,
);
_detailsData.data.data?.forEach((child, childIndex) => {
const _childNewKey = `${_newKey}-${Number(childIndex) + 1}`;
!_suggestProductConfig[_newKey].childNodes.includes(
_childNewKey,
) &&
_suggestProductConfig[_newKey].childNodes.push(_childNewKey);
_suggestProductConfig[_childNewKey] = {
key: _childNewKey,
title: child?.name,
componentName: 'SuggestProduct.Commodity',
canEdit: true,
canHide: false,
props: {
...child,
name: child.name,
image: child.mainPic,
mode: 'vertical',
discountPrice: priceFormat(child.min),
buyBtn: false,
tags: item.customize.filter(
filChild => filChild.id === child.id,
)?.[0]?.tags,
},
};
});
try {
const _detailsData = await PublicApi.getMarketingAdornGoodsListAdorn(
param,
);
_detailsData.data.data?.forEach((child, childIndex) => {
const _childNewKey = `${_newKey}-${Number(childIndex) + 1}`;
!_suggestProductConfig[_newKey].childNodes.includes(
_childNewKey,
) &&
_suggestProductConfig[_newKey].childNodes.push(_childNewKey);
_suggestProductConfig[_childNewKey] = {
key: _childNewKey,
title: child?.name,
componentName: 'SuggestProduct.Commodity',
canEdit: true,
canHide: false,
props: {
...child,
name: child.name,
image: child.mainPic,
mode: 'vertical',
discountPrice: priceFormat(child.min),
buyBtn: false,
tags: item.customize.filter(
filChild => filChild.id === child.id,
)?.[0]?.tags,
},
};
});
} catch (error) {
console.log(error)
}
}
}
}
}
if (appConfig?.coupon) {
// 优惠券弹窗
const _details = appConfig?.coupon?.details;
_couponsModalConfig['13'].props.title = _details?.title;
if (_details.id.length > 0) {
const _couponList = _details.id?.map((item) => { return { belongType: item.belongType, couponId: item.id }; });
const _couponListData = await PublicApi.postMarketingCouponActivityPageSelectDetail({ couponList: _couponList });
message.destroy();
if (_couponListData.code === 1000) {
_couponListData.data?.forEach((item, index) => {
console.log(item, 'couponitem')
const _newKey: any = `13-${Number(index) + 1}`;
!_couponsModalConfig['13'].childNodes.includes(_newKey) && _couponsModalConfig['13'].childNodes.push(_newKey);
_couponsModalConfig[_newKey] = {
key: _newKey,
title: item.name,
componentName: 'CouponsModal.CouponsItem',
props: {
...item,
expiredDay: moment(item?.releaseTimeEnd || moment()).diff(moment(), 'days'),
isnull: false
}
};
});
}
}
}
_mallLayoutConfig['0'].childNodes = [..._mallLayoutConfig['0'].childNodes, '16', '12','13', '14'];
const config = {
..._mallLayoutConfig,
......
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