Commit 4f41e06e authored by 前端-黄佳鑫's avatar 前端-黄佳鑫
parent 93a360a9
......@@ -25,7 +25,7 @@ const RefactorRoutes = [
MarketingManageRoutes,
// pageCustomized,
contentRoute,
systemManageRoute,m
systemManageRoute,
]
export default RefactorRoutes;
......@@ -31,6 +31,4 @@ const getSrmdMallId = () => {
return undefined
}
SELF_CONFIG.srmMallId = getSrmdMallId()
export const GlobalConfig: GlobalConfigType = SELF_CONFIG
......@@ -3,7 +3,7 @@ import { Drawer, Input, Table, Button, Row, Col, message } from 'antd';
import { TableRowSelection } from 'antd/es/table/interface'
import { SearchOutlined } from '@ant-design/icons';
import moment from 'moment';
import { GlobalConfig } from '@/global/config'
import styles from './index.less';
import { priceFormat } from '@/utils/numberFomat';
......@@ -22,7 +22,8 @@ interface MixDrawerProps {
selectId?: string | number[],
selectType?: 'radio' | 'checkbox',
filterParam?: { [key: string]: any } | undefined,
disabledKeys?: number[]
disabledKeys?: number[],
environment: number,
}
const EnvironmentMAPS = {
......@@ -46,7 +47,7 @@ const TitleMAPS = {
};
const MixDrawer: React.FC<MixDrawerProps> = (props: MixDrawerProps) => {
const { visible, type, property, onConfirm, onClose, filterParam, disabledKeys, selectId, shopId, selectType = 'radio' } = props;
const { visible, type, property, onConfirm, onClose, filterParam, environment, disabledKeys, selectId, shopId, selectType = 'radio' } = props;
const [dataSource, setDataSource] = useState<any>([]);
const [totalCount, setTotalCount] = useState<number>(0);
const [selectedRowKeys, setSelectedRowKeys] = useState<any>([]);
......@@ -59,6 +60,14 @@ const MixDrawer: React.FC<MixDrawerProps> = (props: MixDrawerProps) => {
setSelectedRowKeys(selectId ? [selectId] : []);
}, [selectId]);
const getPointMallId = () => {
const pointMallInfo = GlobalConfig.web.shopInfo.filter((item) => item.environment === environment && item.type === 2)[0]
if (pointMallInfo) {
return pointMallInfo.id
}
return shopId
}
const _search = (current: number, pageSize: number, keyWord?: string) => {
setCurrent(current);
setPageSize(pageSize);
......@@ -90,6 +99,7 @@ const MixDrawer: React.FC<MixDrawerProps> = (props: MixDrawerProps) => {
} else {
_params.priceTypeList = [3];
_params.idNotInList = selectId;
_params.shopId = getPointMallId()
_fetch = PublicApi.postSearchCommodityTemplateGetCommodityList;
}
......
......@@ -487,7 +487,7 @@ const appMallEdit: React.FC<ShopPreviewPropsType> = (props) => {
}}
>
<div className={styles['wrapper']}>
<ToolBar type={1} title="APP首页" saveType={1} templateInfo={templateInfo} showActions={true} templateId={id} />
<ToolBar type={1} title={Number(environment) === 4 ? "APP首页" : '小程序首页'} saveType={1} templateInfo={templateInfo} showActions={true} templateId={id} />
<div className={styles['content']}>
<MobileEditLeft />
<div className={styles['app-wrapper']}>
......@@ -495,7 +495,7 @@ const appMallEdit: React.FC<ShopPreviewPropsType> = (props) => {
<MobileDesignPanel theme={theme} onlyEidt pageConfig={componentConfigs} />
</div>
</div>
<MobileSettingPanel shopId={shopId} property={1} />
<MobileSettingPanel shopId={shopId} property={1} environment={Number(environment)} />
</div>
</div>
</BrickProvider>
......
......@@ -18,7 +18,8 @@ const { TabPane } = Tabs;
interface MobileSettingPanelProps {
shopId: number,
property: number
property: number,
environment: number,
}
const MobileSettingPanel: React.FC<MobileSettingPanelProps> = (props)=> {
......
......@@ -35,7 +35,8 @@ interface CardNavItemProps {
dataList?: any,
// 1.B端 2.C端 3.SRM
property?: 1 | 2 | 3,
empty?: boolean
empty?: boolean,
environment: number,
}
const RedirectTypeList = [
......@@ -62,7 +63,7 @@ const RedirectTypeList = [
];
const ShowCase: React.FC<CardNavItemProps> = (props: CardNavItemProps) => {
const { name, type, banner, inner, id, dataList, property = 1, empty, shopId, selectedKey } = props;
const { name, type, banner, inner, id, dataList, environment, property = 1, empty, shopId, selectedKey } = props;
const [mixVisible, setMixVisible] = useState<boolean>(false);
const [actVisible, setActVisible] = useState<boolean>(false);
const [commodityVisible, setCommodityVisible] = useState<boolean>(false);
......@@ -432,6 +433,7 @@ const ShowCase: React.FC<CardNavItemProps> = (props: CardNavItemProps) => {
shopId={shopId}
onConfirm={_onChooseConfirm}
visible={mixVisible}
environment={environment}
/>
<ActivityDrawer
selectId={id}
......
......@@ -27,14 +27,15 @@ interface PropsSettingsPropsType {
selectedInfo: SelectedInfoType | undefined,
pageConfig: PageConfigType,
shopId: number,
property: number
property: number,
environment: number,
}
const PropsSettings: React.FC<PropsSettingsPropsType> = (props) => {
const { selectedInfo, pageConfig, shopId, property } = props;
const { selectedInfo, pageConfig, shopId, environment, property } = props;
const renderSettingItem = () => {
const { props: initProps, propsConfig, parentKey } = selectedInfo || {};
const _props = { ...initProps, shopId, property, selectedKey: selectedInfo?.selectedKey };
const _props = { ...initProps, shopId, environment, property, selectedKey: selectedInfo?.selectedKey };
const componentType = propsConfig?.componentType;
if (componentType) {
switch (componentType.type) {
......
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