Commit 11cdc33d authored by GuanHua's avatar GuanHua
parents f752a110 86b4e620
......@@ -92,10 +92,10 @@ const router = [
path: '/',
component: '@/layouts/index',
routes: [
// {
// path: '/',
// redirect: '/home'
// },
{
path: '/',
redirect: '/home'
},
// {
// path: '/pageCustomized/mobile/template/category',
// name: '品类导航页装修',
......
......@@ -36,16 +36,16 @@ const axios = Axios.create({
const serviceConfig = {
//初始化会员支付策略配置
payConfig: {
payInitializeConfig: {
url: '/pay/initialize/config',
method: 'get'
},
payPlatformPayConfig: {
url: '/pay/platform/pay/config',
method: 'get'
}
},
// payConfig: {
// payInitializeConfig: {
// url: '/pay/initialize/config',
// method: 'get'
// },
// payPlatformPayConfig: {
// url: '/pay/platform/pay/config',
// method: 'get'
// }
// },
web: {
shopInfo: {
url: '/manage/shop/findShopsBySiteId',
......
......@@ -7,7 +7,7 @@ export interface ShopInfo {
describe: string;
state: number;
url: string;
isDefault?: any;
isDefault: number;
}
export interface OrderMode {
......@@ -28,7 +28,7 @@ export interface SiteInfo {
name: string;
logo: string;
siteUrl: string;
symbol?: any;
symbol: string;
}
export interface Site {
......
......@@ -30,7 +30,7 @@ const divWrap: PageConfigType = {
dataIndex: 'top',
title: "广告图",
canEdit: true,
canHide: true,
canDelete: false,
props: {
style: {
height: '176px',
......@@ -47,7 +47,7 @@ const couponContainer: PageConfigType = {
"componentName": 'Coupon',
title: '优惠券容器',
canEdit: true,
canHide: true,
canDelete: false,
props: {},
childNodes: ['2-1'],
childComponentName: "Coupon.Item",
......@@ -68,6 +68,7 @@ const activityContainer: PageConfigType = {
dataIndex: 'hot',
componentName: 'CommodityList',
title: '活动推荐',
canDelete: false,
props: {
title: '活动推荐',
theme: 0,
......@@ -88,6 +89,7 @@ const activityContainer: PageConfigType = {
props: {},
},
"4": {
canDelete: false,
dataIndex: 'specialOffer',
componentName: 'CommodityList',
title: "特价促销",
......@@ -106,6 +108,7 @@ const activityContainer: PageConfigType = {
props: {},
},
"5": {
canDelete: false,
dataIndex: 'plummet',
componentName: 'CommodityList',
title: '直降促销',
......@@ -127,6 +130,7 @@ const activityContainer: PageConfigType = {
addBtnText: '添加'
},
"6": {
canDelete: false,
dataIndex: 'discount',
componentName: 'CommodityList',
childComponentName: "CommodityList.Item",
......@@ -147,6 +151,7 @@ const activityContainer: PageConfigType = {
addBtnText: '添加'
},
"7": {
canDelete: false,
dataIndex: 'fullQuantitySub',
componentName: 'CommodityList',
childComponentName: "CommodityList.Item",
......@@ -167,6 +172,7 @@ const activityContainer: PageConfigType = {
addBtnText: '添加'
},
"8": {
canDelete: false,
dataIndex: 'fullQuantityDiscount',
componentName: 'CommodityList',
childComponentName: "CommodityList.Item",
......@@ -187,6 +193,7 @@ const activityContainer: PageConfigType = {
props: {},
},
"9": {
canDelete: false,
dataIndex: 'fullMoneySub',
componentName: 'CommodityList',
childComponentName: "CommodityList.Item",
......@@ -208,6 +215,7 @@ const activityContainer: PageConfigType = {
addBtnText: '添加'
},
"10": {
canDelete: false,
dataIndex: 'fullMoneyDiscount',
componentName: 'CommodityList',
childComponentName: "CommodityList.Item",
......@@ -229,6 +237,7 @@ const activityContainer: PageConfigType = {
addBtnText: '添加'
},
"11": {
canDelete: false,
dataIndex: 'giveProduct',
componentName: 'CommodityList',
childComponentName: "CommodityList.Item",
......@@ -250,6 +259,7 @@ const activityContainer: PageConfigType = {
addBtnText: '添加'
},
"12": {
canDelete: false,
dataIndex: 'giveCoupon',
componentName: 'CommodityList',
title: '赠送促销--赠送商品(满额赠+买商品赠)',
......@@ -271,6 +281,7 @@ const activityContainer: PageConfigType = {
addBtnText: '添加'
},
"13": {
canDelete: false,
dataIndex: 'morePiece',
componentName: 'CommodityList',
childComponentName: "CommodityList.Item",
......@@ -292,6 +303,7 @@ const activityContainer: PageConfigType = {
addBtnText: '添加'
},
"14": {
canDelete: false,
dataIndex: 'combination',
componentName: 'CommodityList',
childComponentName: "CommodityList.Item",
......@@ -313,6 +325,7 @@ const activityContainer: PageConfigType = {
addBtnText: '添加'
},
"15": {
canDelete: false,
dataIndex: 'groupPurchase',
componentName: 'CommodityList',
childComponentName: "CommodityList.Item",
......@@ -334,6 +347,7 @@ const activityContainer: PageConfigType = {
addBtnText: '添加'
},
"16": {
canDelete: false,
dataIndex: 'bargain',
componentName: 'CommodityList',
childComponentName: "CommodityList.Item",
......@@ -355,6 +369,7 @@ const activityContainer: PageConfigType = {
addBtnText: '添加'
},
"17": {
canDelete: false,
dataIndex: 'secKill',
componentName: 'CommodityList',
childComponentName: "CommodityList.Item",
......@@ -376,6 +391,7 @@ const activityContainer: PageConfigType = {
addBtnText: '添加'
},
"18": {
canDelete: false,
dataIndex: 'fullSwap',
componentName: 'CommodityList',
childComponentName: "CommodityList.Item",
......@@ -397,6 +413,7 @@ const activityContainer: PageConfigType = {
addBtnText: '添加'
},
"19": {
canDelete: false,
dataIndex: 'buySwap',
componentName: 'CommodityList',
childComponentName: "CommodityList.Item",
......@@ -418,6 +435,7 @@ const activityContainer: PageConfigType = {
addBtnText: '添加'
},
"20": {
canDelete: false,
dataIndex: 'preSale',
componentName: 'CommodityList',
childComponentName: "CommodityList.Item",
......@@ -439,6 +457,7 @@ const activityContainer: PageConfigType = {
addBtnText: '添加'
},
"21": {
canDelete: false,
dataIndex: 'setMeal',
componentName: 'CommodityList',
childComponentName: "CommodityList.Item",
......@@ -460,6 +479,7 @@ const activityContainer: PageConfigType = {
addBtnText: '添加'
},
"22": {
canDelete: false,
dataIndex: 'attempt',
componentName: 'CommodityList',
childComponentName: "CommodityList.Item",
......@@ -484,6 +504,7 @@ const activityContainer: PageConfigType = {
const customizeActiveProducts: PageConfigType = {
"23": {
canDelete: false,
componentName: 'WrapCommodityList',
title: '自定义区域',
dataIndex: 'suggestProduct',
......
......@@ -117,6 +117,7 @@ const ActivityProductDrawer: React.FC<Iprops> = (props: Iprops) => {
useEffect(() => {
if (!visible) {
setSelectedActivityProductList([]);
return ;
}
setCheckedProduct(products);
......@@ -189,7 +190,6 @@ const ActivityProductDrawer: React.FC<Iprops> = (props: Iprops) => {
title="选择活动商品"
visible={visible}
width={950}
destroyOnClose
footer={
<div className={styles.drawerFooter}>
<Space>
......@@ -240,7 +240,7 @@ const ActivityProductDrawer: React.FC<Iprops> = (props: Iprops) => {
rowKey={(_record) => `${_record.activityId!}-${_record.id!}` }
loading={loading}
pagination={false}
columns={columns} dataSource={selectedActivityProductList}></Table>
columns={columns} dataSource={selectedActivityProductList}/>
</div>
<div className={styles.pagination}>
<Pagination pageSize={currentPageSize} current={current} showQuickJumper total={totalCount} onChange={onChange}/>
......
......@@ -96,8 +96,8 @@ const ActivityAreaSetting: React.FC<Iprops> = (props: Iprops) => {
if (!visible) {
return;
}
setInnerProducts(products as any);
}, [visible, products]);
setInnerProducts(products as any || []);
}, [visible, products, activityType]);
useEffect(() => {
if (!visible) {
......
......@@ -2,7 +2,7 @@
background-color: #fff;
height: 100%;
overflow-y: auto;
transition: width .25s;
transition: all .25s;
display: flex;
flex-direction: column;
......@@ -19,6 +19,7 @@
.body {
padding: 16px;
flex: 1;
min-width: 440px;
}
.footer {
......@@ -35,3 +36,7 @@
.visible {
width: 440px;
}
.hide {
width: 0;
}
......@@ -25,8 +25,13 @@ const Drawer: React.FC<Iprops> = (props) => {
onSubmit?.();
};
const wrapClass = cx(styles.drawer, {
[styles.visible]: visible,
[styles.hide]: !visible,
});
return (
<div className={cx(styles.drawer, { [styles.visible]: visible })}>
<div className={wrapClass}>
{
header || (
<div className={styles.header}>
......
......@@ -80,9 +80,11 @@ const EditPanel = () => {
const Component = componentType && ComponentsMap[componentType as unknown as "Advertisement"];
useEffect(() => {
if (selectedInfo) {
if (selectedInfo && (selectedInfo.props?.visible || typeof selectedInfo.props?.visible === 'undefined' )) {
setVisible(true);
return;
}
setVisible(false);
}, [selectedInfo]);
const handleOncancel = () => {
......@@ -90,7 +92,7 @@ const EditPanel = () => {
};
const dataIndex = (selectedInfo as any)?.otherProps?.dataIndex || pageConfig[selectedInfo?.parentKey]?.dataIndex || null;
const withTypeSelect = ACTIVITYS;
// const withTypeSelect = ACTIVITYS;
// const wityTypeSelectProps = dataIndex && withTypeSelect.includes(dataIndex) ? { withTypeSelect: true } : {};
const wityTypeSelectProps = {};
const typeProps = dataIndex && ACTIVITY_MAP[dataIndex] ? { activityType: ACTIVITY_MAP[dataIndex] } : {};
......@@ -110,10 +112,10 @@ const EditPanel = () => {
return null;
}
if (componentType === 'CouponSetting') {
return <Component visible={visible} onCancel={handleOncancel} value={selectedInfo?.props} />;
return <CouponSetting visible={visible} onCancel={handleOncancel} value={selectedInfo?.props} />;
}
if (componentType === 'ProductPanel') {
return <Component visible={visible} onCancel={handleOncancel} value={selectedInfo?.props} {...(selectedInfo as any)?.otherProps} {...typeProps} />;
return <ProductPanel visible={visible} onCancel={handleOncancel} value={selectedInfo?.props} {...(selectedInfo as any)?.otherProps} {...typeProps} />;
}
return (
......
......@@ -200,7 +200,7 @@ const CommodityTab: React.FC<any> = (props) => {
{
goodsSubsidiaryGroupDetailsList?.map((_row, _key) => {
return (
<div className={styles.groupCommodityItem} key={_item}>
<div className={styles.groupCommodityItem} key={_key}>
<Commodity
name={_row.productName}
image={_row.productImgUrl}
......
......@@ -57,13 +57,14 @@ interface ItemIprops {
const CouponItem: React.FC<ItemIprops> = (props: ItemIprops) => {
const { children, className, ...other} = props;
const { onClick, onDrag, onDragEnd, onDragEnter, onDragStart, onMouseOver, getOperateState, ...rest} = other;
const { money, isnull, tag, info, } = rest as any;
const { money, isnull, tag, info, typeName } = rest as any;
const divProps = {
onClick, onDrag, onDragEnd, onDragEnter, onDragStart, onMouseOver,
};
console.log(info);
return (
<div {...divProps} className={cx(className, styles.item)}>
<CouponsItem money={money} isnull={isnull} tag={tag} info={info} className={styles.couponItem} />
<CouponsItem money={money} isnull={isnull} typeName={typeName} tag={tag} info={info} className={styles.couponItem} />
</div>
);
};
......
......@@ -248,7 +248,7 @@ const AddedMarketing = (props: any) => {
roleType: item.roleId,
roleTypeName: item.roleName,
level: item.level,
levelTyp: item.levelType,
levelType: item.levelType,
levelTypeName: item.levelTypeName,
levelTag: item.levelTag,
}
......
......@@ -324,15 +324,23 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
required: true, validator: (_rule, value) => {
const pattern1 = /^-?[1-9]\d*(\.\d{1,1})?$/;
const pattern2 = /^-?[1-9]\d*(\.\d{1,2})?$/;
const pattern3 = /^(\d|[1-9]\d|99.999)(\.\d{1,1})?$/;
const pattern4 = /^(\d|[1-9]\d|99.999)(\.\d{1,2})?$/;
if (!value) {
return Promise.reject(new Error('请输入'));
}
if (!pattern1.test(value) && (int === 4 || int === 7)) {
return Promise.reject(new Error(`必须大于0最多保留1位小数`));
}
if (!pattern3.test(value) && (int === 4 || int === 7) && type === 2) {
return Promise.reject(new Error(`必须大于0且小于100最多保留1位小数`));
}
if (!pattern2.test(value) && int === 5 ) {
return Promise.reject(new Error(`必须大于0最多保留2位小数`));
}
if (!pattern4.test(value) && int === 5 && type === 2 ) {
return Promise.reject(new Error(`必须大于0且小于100最多保留2位小数`));
}
return Promise.resolve();
}
}]}
......
......@@ -87,6 +87,7 @@ function useGetLayout() {
type: `${_child}Item`,
}
},
canDelete: false,
addBtnText: '添加子节点',
type: _child,
otherProps: {
......
......@@ -105,10 +105,13 @@ const header: PageConfigType = {
title: '头部',
props: {},
childNodes: ["2", "3"],
canEdit: false,
canDelete: false,
},
"2": {
componentName: 'HeaderNav.ActionItem',
title: '我的',
canDelete: false,
props: {
data: {
name: "我的",
......@@ -121,6 +124,7 @@ const header: PageConfigType = {
"3": {
componentName: 'HeaderNav.ActionItem',
title: '搜索框',
canDelete: false,
props: {
data: {
name: "搜索框",
......
......@@ -48,18 +48,39 @@
width: 100%;
background-color: #fafbfc;
display: flex;
flex-direction: row;
flex-direction: column;
align-items: center;
justify-content: center;
height: 96px;
position: relative;
cursor: pointer;
.imageIcon {
width: 40px;
height: 40px;
height: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
overflow: hidden;
}
.uploadImage {
position: absolute;
bottom: -34px;
left: 0;
right: 0;
padding: 4px;
background: rgba(0,0,0,0.3);
z-index: 99;
text-align: center;
color: #fff;
transition: all 0.6s;
}
&:hover {
.uploadImage {
transform: translateY(-34px);
}
}
}
......
......@@ -150,10 +150,11 @@ const EditPanel = () => {
const target = value[0];
return (
<div className={styles.image}>
<div className={styles.uploadImage}>上传图片</div>
<div className={styles.imageIcon}>
<Spin spinning={target?.status === 'uploading'}>
{
target ? <img src={target?.url} style={{width: '100%', height: '100%'}} /> : <PlusCircleOutlined />
target ? <img src={target?.url} style={{width: '100%', height: '96px'}} /> : <PlusCircleOutlined />
}
</Spin>
</div>
......
......@@ -19,4 +19,5 @@
width: 100%;
display: flex;
flex-direction: row-reverse;
padding: 12px;
}
......@@ -10,10 +10,10 @@ const ProductContainer = (props) => {
alignItems: 'stretch',
padding: '16 0',
minHeight: '20px',
border: '1px solid red',
// backgroundColor: 'red',
};
const itemStyle = {
border: '1px solid #ccc',
paddingRight: '8px',
width: '50%'
};
......
......@@ -18,7 +18,7 @@
.content {
display: flex;
flex-direction: column;
align-items: center;
// align-items: center;
margin-top: 4px;
// background-color: red;
......
......@@ -43,13 +43,13 @@ const Item = (props) => {
onClick, onDrag, onDragEnd, onDragEnter, onDragStart, onMouseOver
};
const wrapClass = cs(className, styles.content);
const wrapClass = cs(styles.content);
const isEmpty = typeof name === 'undefined' && typeof id === 'undefined';
if (isEmpty) {
return (
<div className={styles.item} >
<div {...divProps} className={cs(wrapClass, styles.empty)}>
<div {...divProps} className={cs(wrapClass, className, styles.empty)}>
<PlusOutlined />
</div>
</div>
......@@ -58,9 +58,12 @@ const Item = (props) => {
return (
<div className={styles.item} >
<div {...divProps} className={wrapClass}>
<img src={icon} className={styles.image} />
<div className={styles.name}>{name}</div>
<div className={wrapClass}>
<div {...divProps} className={className}>
<img src={icon} className={styles.image} />
<div className={styles.name}>{name}</div>
</div>
</div>
</div>
);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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