Commit 86b4e620 authored by Bill's avatar Bill

Merge branch 'v2' of 10.0.0.22:lingxi/lingxi-business-system into v2

parents 75885336 b94d489d
...@@ -36,16 +36,16 @@ const axios = Axios.create({ ...@@ -36,16 +36,16 @@ const axios = Axios.create({
const serviceConfig = { const serviceConfig = {
//初始化会员支付策略配置 //初始化会员支付策略配置
payConfig: { // payConfig: {
payInitializeConfig: { // payInitializeConfig: {
url: '/pay/initialize/config', // url: '/pay/initialize/config',
method: 'get' // method: 'get'
}, // },
payPlatformPayConfig: { // payPlatformPayConfig: {
url: '/pay/platform/pay/config', // url: '/pay/platform/pay/config',
method: 'get' // method: 'get'
} // }
}, // },
web: { web: {
shopInfo: { shopInfo: {
url: '/manage/shop/findShopsBySiteId', url: '/manage/shop/findShopsBySiteId',
......
...@@ -7,7 +7,7 @@ export interface ShopInfo { ...@@ -7,7 +7,7 @@ export interface ShopInfo {
describe: string; describe: string;
state: number; state: number;
url: string; url: string;
isDefault?: any; isDefault: number;
} }
export interface OrderMode { export interface OrderMode {
...@@ -28,7 +28,7 @@ export interface SiteInfo { ...@@ -28,7 +28,7 @@ export interface SiteInfo {
name: string; name: string;
logo: string; logo: string;
siteUrl: string; siteUrl: string;
symbol?: any; symbol: string;
} }
export interface Site { export interface Site {
......
...@@ -248,7 +248,7 @@ const AddedMarketing = (props: any) => { ...@@ -248,7 +248,7 @@ const AddedMarketing = (props: any) => {
roleType: item.roleId, roleType: item.roleId,
roleTypeName: item.roleName, roleTypeName: item.roleName,
level: item.level, level: item.level,
levelTyp: item.levelType, levelType: item.levelType,
levelTypeName: item.levelTypeName, levelTypeName: item.levelTypeName,
levelTag: item.levelTag, levelTag: item.levelTag,
} }
......
...@@ -324,15 +324,23 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => { ...@@ -324,15 +324,23 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
required: true, validator: (_rule, value) => { required: true, validator: (_rule, value) => {
const pattern1 = /^-?[1-9]\d*(\.\d{1,1})?$/; const pattern1 = /^-?[1-9]\d*(\.\d{1,1})?$/;
const pattern2 = /^-?[1-9]\d*(\.\d{1,2})?$/; 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) { if (!value) {
return Promise.reject(new Error('请输入')); return Promise.reject(new Error('请输入'));
} }
if (!pattern1.test(value) && (int === 4 || int === 7)) { if (!pattern1.test(value) && (int === 4 || int === 7)) {
return Promise.reject(new Error(`必须大于0最多保留1位小数`)); 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 ) { if (!pattern2.test(value) && int === 5 ) {
return Promise.reject(new Error(`必须大于0最多保留2位小数`)); 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(); return Promise.resolve();
} }
}]} }]}
......
...@@ -51,6 +51,7 @@ export const defaultConfig: PageConfigType = { ...@@ -51,6 +51,7 @@ export const defaultConfig: PageConfigType = {
'1': { '1': {
title: '头部导航栏', title: '头部导航栏',
componentName: 'HeaderNav', componentName: 'HeaderNav',
canDelete: false,
props: { props: {
styleTheme: '${topStyle}', styleTheme: '${topStyle}',
categoryList: '${categoryList}', categoryList: '${categoryList}',
...@@ -80,6 +81,7 @@ export const defaultConfig: PageConfigType = { ...@@ -80,6 +81,7 @@ export const defaultConfig: PageConfigType = {
'3': { '3': {
title: '广告图', title: '广告图',
componentName: 'Banner', componentName: 'Banner',
canDelete: false,
props: { props: {
style: { style: {
margin: '8px', margin: '8px',
...@@ -104,6 +106,7 @@ export const defaultConfig: PageConfigType = { ...@@ -104,6 +106,7 @@ export const defaultConfig: PageConfigType = {
'5': { '5': {
title: '分类导航', title: '分类导航',
componentName: 'MobileNavCard', componentName: 'MobileNavCard',
canDelete: false,
props: { props: {
style: { style: {
margin: '8px', margin: '8px',
...@@ -137,6 +140,7 @@ export const defaultConfig: PageConfigType = { ...@@ -137,6 +140,7 @@ export const defaultConfig: PageConfigType = {
'7': { '7': {
title: '橱窗广告', title: '橱窗广告',
componentName: 'ShowCaseBanner', componentName: 'ShowCaseBanner',
canDelete: false,
childComponentName: 'ShowCaseBanner.Item', childComponentName: 'ShowCaseBanner.Item',
props: { props: {
stylesthemelist: [ stylesthemelist: [
...@@ -175,6 +179,7 @@ export const defaultConfig: PageConfigType = { ...@@ -175,6 +179,7 @@ export const defaultConfig: PageConfigType = {
}, },
childNodes: [], childNodes: [],
canEdit: false, canEdit: false,
canDelete: false,
addBtnText: '添加资讯', addBtnText: '添加资讯',
}, },
'10': { '10': {
...@@ -191,6 +196,7 @@ export const defaultConfig: PageConfigType = { ...@@ -191,6 +196,7 @@ export const defaultConfig: PageConfigType = {
] ]
}, },
childNodes: ['11'], childNodes: ['11'],
canDelete: false,
childComponentName: 'RecommendShop.Item', childComponentName: 'RecommendShop.Item',
addBtnText: '添加店铺', addBtnText: '添加店铺',
maxLength: 3 maxLength: 3
...@@ -212,6 +218,7 @@ export const defaultConfig: PageConfigType = { ...@@ -212,6 +218,7 @@ export const defaultConfig: PageConfigType = {
'12': { '12': {
title: '优质推荐', title: '优质推荐',
componentName: 'QualityRecommend', componentName: 'QualityRecommend',
canDelete: false,
props: { props: {
defaultActiveType: '${defaultActive}' defaultActiveType: '${defaultActive}'
}, },
...@@ -221,6 +228,7 @@ export const defaultConfig: PageConfigType = { ...@@ -221,6 +228,7 @@ export const defaultConfig: PageConfigType = {
title: '分类标签', title: '分类标签',
componentName: 'ClassifyLabel', componentName: 'ClassifyLabel',
childNodes: ['14'], childNodes: ['14'],
canDelete: false,
props: {}, props: {},
childComponentName: 'ClassifyLabel.LabelItem', childComponentName: 'ClassifyLabel.LabelItem',
addBtnText: '添加标签', addBtnText: '添加标签',
...@@ -242,11 +250,13 @@ export const defaultConfig: PageConfigType = { ...@@ -242,11 +250,13 @@ export const defaultConfig: PageConfigType = {
'15': { '15': {
title: '推荐列表', title: '推荐列表',
componentName: 'RecommendList', componentName: 'RecommendList',
canDelete: false,
childNodes: ['16', '17', '19', '21'], childNodes: ['16', '17', '19', '21'],
}, },
'16': { '16': {
title: '商品列表', title: '商品列表',
componentName: 'RecommendCommodityList', componentName: 'RecommendCommodityList',
canDelete: false,
props: { props: {
dataList: '${recommendCommodityList}', dataList: '${recommendCommodityList}',
id: '${recommendCommodityIdList}' id: '${recommendCommodityIdList}'
...@@ -257,6 +267,7 @@ export const defaultConfig: PageConfigType = { ...@@ -257,6 +267,7 @@ export const defaultConfig: PageConfigType = {
title: '店铺列表', title: '店铺列表',
componentName: 'RecommendShopList', componentName: 'RecommendShopList',
childNodes: ['18'], childNodes: ['18'],
canDelete: false,
childComponentName: 'RecommendShopList.Item', childComponentName: 'RecommendShopList.Item',
addBtnText: '添加店铺', addBtnText: '添加店铺',
// canHide: true, // canHide: true,
...@@ -279,6 +290,7 @@ export const defaultConfig: PageConfigType = { ...@@ -279,6 +290,7 @@ export const defaultConfig: PageConfigType = {
title: '品牌列表', title: '品牌列表',
componentName: 'RecommendBrandList', componentName: 'RecommendBrandList',
childNodes: ['20'], childNodes: ['20'],
canDelete: false,
childComponentName: 'RecommendBrandList.Item', childComponentName: 'RecommendBrandList.Item',
addBtnText: '添加品牌', addBtnText: '添加品牌',
// canHide: true, // canHide: true,
...@@ -297,6 +309,7 @@ export const defaultConfig: PageConfigType = { ...@@ -297,6 +309,7 @@ export const defaultConfig: PageConfigType = {
'21': { '21': {
title: '资讯列表', title: '资讯列表',
componentName: 'RecommendInformationList', componentName: 'RecommendInformationList',
canDelete: false,
props: { props: {
dataList: '${recommendInformationList}', dataList: '${recommendInformationList}',
id: '${recommendInformationIdList}' id: '${recommendInformationIdList}'
...@@ -307,6 +320,7 @@ export const defaultConfig: PageConfigType = { ...@@ -307,6 +320,7 @@ export const defaultConfig: PageConfigType = {
title: '底部标签栏', title: '底部标签栏',
componentName: 'BottomNavigation', componentName: 'BottomNavigation',
props: {}, props: {},
canDelete: false,
childNodes: ['23'], childNodes: ['23'],
childComponentName: 'BottomNavigation.Items', childComponentName: 'BottomNavigation.Items',
addBtnText: '添加标签', addBtnText: '添加标签',
......
...@@ -13,8 +13,15 @@ ...@@ -13,8 +13,15 @@
} }
.settingTabs { .settingTabs {
height: 100%;
:global { :global {
.ant-tabs-content {
position: relative;
height: 100%;
}
.ant-tabs {
height: 100%;
}
.ant-tabs-tab { .ant-tabs-tab {
margin: 0 32px; margin: 0 32px;
...@@ -33,3 +40,28 @@ ...@@ -33,3 +40,28 @@
} }
} }
} }
.setting_panel {
position: absolute;
top: 0;
right: 0;
display: flex;
flex-direction: column;
flex-wrap: nowrap;
width: 100%;
height: 100%;
&_body {
flex-grow: 1;
overflow: auto;
font-size: 12px;
line-height: 1.5715;
}
&_footer {
flex-shrink: 0;
padding: 10px 10px;
border-top: 1px solid #f0f0f0;
}
}
...@@ -6,6 +6,7 @@ import cx from 'classnames'; ...@@ -6,6 +6,7 @@ import cx from 'classnames';
import { Tabs } from 'antd'; import { Tabs } from 'antd';
import StyleSettings from './styleSettings'; import StyleSettings from './styleSettings';
import PropsSettings from './propsSettings'; import PropsSettings from './propsSettings';
import SettingWrap from './settingWrap'
import styles from './index.less'; import styles from './index.less';
type SettingPanelType = { type SettingPanelType = {
...@@ -48,14 +49,18 @@ const MobileSettingPanel: React.FC<MobileSettingPanelProps> = (props)=> { ...@@ -48,14 +49,18 @@ const MobileSettingPanel: React.FC<MobileSettingPanelProps> = (props)=> {
{ {
(propsConfig && propsConfig.componentType) && ( (propsConfig && propsConfig.componentType) && (
<TabPane tab={propsConfig.componentType.label || '编辑'} key="props"> <TabPane tab={propsConfig.componentType.label || '编辑'} key="props">
<PropsSettings selectedInfo={newSelectInfo} pageConfig={pageConfig} {...props} /> <SettingWrap>
<PropsSettings selectedInfo={newSelectInfo} pageConfig={pageConfig} {...props} />
</SettingWrap>
</TabPane> </TabPane>
) )
} }
{ {
(propsConfig && propsConfig.styleType) && ( (propsConfig && propsConfig.styleType) && (
<TabPane tab="样式" key="style"> <TabPane tab="样式" key="style">
<StyleSettings selectedInfo={newSelectInfo} /> <SettingWrap>
<StyleSettings selectedInfo={newSelectInfo} />
</SettingWrap>
</TabPane> </TabPane>
) )
} }
......
...@@ -167,6 +167,10 @@ const CardNavItem: React.FC<CardNavItemProps> = (props: CardNavItemProps) => { ...@@ -167,6 +167,10 @@ const CardNavItem: React.FC<CardNavItemProps> = (props: CardNavItemProps) => {
} }
} }
if (key === 'type') {
newProps.id = null
}
changeProps({ changeProps({
title: title ? title : name, title: title ? title : name,
props: Object.assign({ ...props }, newProps) props: Object.assign({ ...props }, newProps)
......
...@@ -33,11 +33,9 @@ interface PropsSettingsPropsType { ...@@ -33,11 +33,9 @@ interface PropsSettingsPropsType {
const PropsSettings: React.FC<PropsSettingsPropsType> = (props) => { const PropsSettings: React.FC<PropsSettingsPropsType> = (props) => {
const { selectedInfo, pageConfig, shopId, property } = props; const { selectedInfo, pageConfig, shopId, property } = props;
const renderSettingItem = () => { const renderSettingItem = () => {
console.log(selectedInfo, 'selectedInfo');
const { props: initProps, propsConfig, parentKey } = selectedInfo || {}; const { props: initProps, propsConfig, parentKey } = selectedInfo || {};
const _props = { ...initProps, shopId, property, selectedKey: selectedInfo?.selectedKey }; const _props = { ...initProps, shopId, property, selectedKey: selectedInfo?.selectedKey };
const componentType = propsConfig?.componentType; const componentType = propsConfig?.componentType;
console.log(componentType, 'componentType');
if (componentType) { if (componentType) {
switch (componentType.type) { switch (componentType.type) {
case PROPS_SETTING_TYPES.mobileHeaderNav: case PROPS_SETTING_TYPES.mobileHeaderNav:
......
import React from 'react'
import { Button } from 'antd'
import { clearSelectedStatus } from '@lingxi-disign/core';
import styles from './index.less'
interface SettingPanelPropsType {
footer?: React.ReactNode;
onOK?: Function;
onCancel?: Function;
confirmLoading?: boolean
}
const SettingWrap: React.FC<SettingPanelPropsType> = (props) => {
// eslint-disable-next-line @typescript-eslint/no-empty-function
const { children, footer, onOK, onCancel, confirmLoading = false } = props
return (
<div className={styles.setting_panel} id="setting_panel">
<div className={styles.setting_panel_body}>
{children}
</div>
{
footer ? (
<div className={styles.setting_panel_footer}>
{footer}
</div>
) : (
<div className={styles.setting_panel_footer}>
<div style={{ textAlign: 'right' }}>
<Button style={{ marginRight: 8 }} onClick={() => onCancel ? onCancel() : clearSelectedStatus()}>取消</Button>
<Button type="primary" onClick={(e) => onOK ? onOK(e) : clearSelectedStatus()} loading={confirmLoading}>确定</Button>
</div>
</div>
)
}
</div>
)
}
export default SettingWrap
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