Commit 53613721 authored by 前端-许佳敏's avatar 前端-许佳敏
parents 60202838 99d69887
import { ComponentSchemaType, PROPS_TYPES } from '@lingxi-disign/core';;
const Album: ComponentSchemaType = {
propsConfig: {
children: {
label: '文本内容',
type: PROPS_TYPES.string,
},
},
};
export default Album;
import { ComponentSchemaType, PROPS_SETTING_TYPES } from '@lingxi-disign/core';;
const ChannelAdvert: ComponentSchemaType = {
propsConfig: {
componentType: {
label: '广告编辑',
type: PROPS_SETTING_TYPES.advert
},
sliderList: {
label: '广告编辑',
type: PROPS_SETTING_TYPES.carousel,
},
},
};
export default ChannelAdvert;
import { ComponentSchemaType, PROPS_TYPES } from '@lingxi-disign/core';;
const ChannelCategory: ComponentSchemaType = {
propsConfig: {
children: {
label: '文本内容',
type: PROPS_TYPES.string,
},
},
};
export default ChannelCategory;
import { ComponentSchemaType, PROPS_TYPES } from '@lingxi-disign/core';;
const ChannelQuickNav: ComponentSchemaType = {
propsConfig: {
children: {
label: '文本内容',
type: PROPS_TYPES.string,
},
},
};
export default ChannelQuickNav;
import { ComponentSchemaType, PROPS_TYPES } from '@lingxi-disign/core';;
const CompanyInfo: ComponentSchemaType = {
propsConfig: {
children: {
label: '文本内容',
type: PROPS_TYPES.string,
},
},
};
export default CompanyInfo;
import { ComponentSchemaType, PROPS_TYPES } from '@lingxi-disign/core';;
const HonroPic: ComponentSchemaType = {
propsConfig: {
children: {
label: '文本内容',
type: PROPS_TYPES.string,
},
},
};
export default HonroPic;
import { ComponentSchemaType, PROPS_SETTING_TYPES } from '@lingxi-disign/core';;
const ShopAdvert: ComponentSchemaType = {
propsConfig: {
componentType: {
label: '广告编辑',
type: PROPS_SETTING_TYPES.advert
},
sliderList: {
label: '广告编辑',
type: PROPS_SETTING_TYPES.carousel,
},
},
};
export default ShopAdvert;
...@@ -58,6 +58,13 @@ import RecommendCommodityList from './RecommendCommodityList' ...@@ -58,6 +58,13 @@ import RecommendCommodityList from './RecommendCommodityList'
import RecommendInformationList from './RecommendInformationList' import RecommendInformationList from './RecommendInformationList'
import RecommendShopList from './RecommendShopList' import RecommendShopList from './RecommendShopList'
import ClassifyLabel from './ClassifyLabel' import ClassifyLabel from './ClassifyLabel'
import ShopAdvert from './ShopAdvert'
import ChannelAdvert from './ChannelAdvert'
import ChannelCategory from './ChannelCategory'
import ChannelQuickNav from './ChannelQuickNav'
import Album from './Album'
import HonroPic from './HonroPic'
import CompanyInfo from './CompanyInfo'
export default { export default {
View, View,
...@@ -120,4 +127,11 @@ export default { ...@@ -120,4 +127,11 @@ export default {
RecommendInformationList, RecommendInformationList,
...RecommendShopList, ...RecommendShopList,
...ClassifyLabel, ...ClassifyLabel,
ShopAdvert,
ChannelAdvert,
ChannelCategory,
ChannelQuickNav,
Album,
HonroPic,
CompanyInfo,
}; };
import { LAYOUT_TYPE } from "@/constants"
export const mallLayoutConfig = {
key: "0",
"0": {
"componentName": "MallLayout",
"props": {
"style": {
"width": "100%",
"minHeight": "100%",
"background": "#FFF"
}
},
"childNodes": ["1", "3", "4", "5", "6"]
},
}
const shopInfo = { const shopInfo = {
"id": 3, "id": 3,
"logo": "https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/8225da43b0bb4d6199a028a63d9f8da91603161481060.jpg", "logo": "https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/8225da43b0bb4d6199a028a63d9f8da91603161481060.jpg",
...@@ -32,6 +19,7 @@ const shopInfo = { ...@@ -32,6 +19,7 @@ const shopInfo = {
"storeUrl": "http://lingxi.shushangyun.com/shop/pointsMall?shopId=eyJzaG9wSWQiOjMsIm1lbWJlcklkIjo5fQ==", "storeUrl": "http://lingxi.shushangyun.com/shop/pointsMall?shopId=eyJzaG9wSWQiOjMsIm1lbWJlcklkIjo5fQ==",
"customerUrl": " http://10.0.0.25:4396/shop?shopId=eyJzaG9wSWQiOm51bGwsIm1lbWJlcklkIjpudWxsfQ==", "customerUrl": " http://10.0.0.25:4396/shop?shopId=eyJzaG9wSWQiOm51bGwsIm1lbWJlcklkIjpudWxsfQ==",
"allStatus": 0, "allStatus": 0,
"memberName": "广州市数商云网络科技有限公司",
"company": "广州市数商云网络科技有限公司", "company": "广州市数商云网络科技有限公司",
"templateId": 3, "templateId": 3,
"fileName": "science", "fileName": "science",
...@@ -41,6 +29,21 @@ const shopInfo = { ...@@ -41,6 +29,21 @@ const shopInfo = {
"registerYears": 1, "registerYears": 1,
} }
export const mallLayoutConfig = {
key: "0",
"0": {
"componentName": "MallLayout",
"props": {
"style": {
"width": "100%",
"minHeight": "100%",
"background": "#FFF"
}
},
"childNodes": ["1", "3", "4", "5"]
},
}
export const topBarConfig = { export const topBarConfig = {
key: "1", key: "1",
"1": { "1": {
...@@ -52,27 +55,13 @@ export const topBarConfig = { ...@@ -52,27 +55,13 @@ export const topBarConfig = {
} }
} }
export const topAdvertConfig = {
key: "2",
"2": {
"componentName": "Advert",
"props": {
"type": "top",
"linkdisable": true,
"advertList": []
},
},
}
export const headerConfig = { export const headerConfig = {
key: "3", key: "3",
"3": { "3": {
"componentName": "ChannelHeader", "componentName": "ChannelHeader",
"props": { "props": {
"shopInfo": shopInfo, "channelInfo": shopInfo,
"logoUrl": shopInfo.logo "logo": shopInfo.logo
}, },
}, },
} }
...@@ -81,14 +70,58 @@ export const mainNavConfig = { ...@@ -81,14 +70,58 @@ export const mainNavConfig = {
key: "4", key: "4",
"4": { "4": {
"componentName": "MainNav", "componentName": "MainNav",
"props": {}, "props": {
menuData: [],
type: LAYOUT_TYPE.channel
},
}, },
} }
export const bannerAdvertConfig = { export const horizontalWrap = {
key: "5", key: "5",
"5": { "5": {
"componentName": "Advert", "componentName": "View",
"props": {
"style": {
"width": "1200px",
"margin": "0 auto",
"display": "flex",
"marginTop": "16px",
}
},
"childNodes": ["6", "7", "10"]
},
}
export const channelCategoryConfig = {
key: "6",
"6": {
"componentName": "ChannelCategory",
"props": {
categoryList: []
},
},
}
export const bannerWrap = {
key: "7",
"7": {
"componentName": "View",
"props": {
"style": {
"margin": "0 16px",
"flex": 1,
"width": 0,
}
},
"childNodes": ["8", "9"]
},
}
export const bannerAdvertConfig = {
key: "8",
"8": {
"componentName": "ChannelAdvert",
"props": { "props": {
"type": "banner", "type": "banner",
"linkdisable": true, "linkdisable": true,
...@@ -122,21 +155,35 @@ export const bannerAdvertConfig = { ...@@ -122,21 +155,35 @@ export const bannerAdvertConfig = {
}, },
} }
export const CommonTitle1Config = {
key: "6", export const interactAdvertConfig = {
"6": { key: "9",
"componentName": "CommonTitle", "9": {
"componentName": "ChannelAdvert",
"props": { "props": {
"title": "热销商品", "type": "interact",
"type": "primary" "linkdisable": true,
}, "advertList": []
}
}, },
} }
export const channelQuickNavConfig = {
key: "10",
"10": {
"componentName": "ChannelQuickNav",
"props": {
"linkdisable": true,
channelInfo: shopInfo
}
},
}
export const serviceAdvertConfig = { export const serviceAdvertConfig = {
key: "16", key: "16",
"16": { "16": {
"componentName": "Advert", "componentName": "ChannelAdvert",
"props": { "props": {
"type": "service", "type": "service",
"linkdisable": true, "linkdisable": true,
...@@ -190,6 +237,52 @@ export const CommonTitle2Config = { ...@@ -190,6 +237,52 @@ export const CommonTitle2Config = {
}, },
} }
export const CompanyInfoConfig = {
key: "18",
"18": {
"componentName": "CompanyInfo",
"props": {
shopInfo
},
},
}
export const AlbumConfig = {
key: "19",
"19": {
"componentName": "Album",
"props": {
workshopPics: shopInfo.workshopPics
},
},
}
export const HonroPicConfig = {
key: "20",
"20": {
"componentName": "HonroPic",
"props": {
honorPics: shopInfo.honorPics
},
},
}
export const topAdvertConfig = {
key: "2",
"2": {
"componentName": "Advert",
"props": {
"type": "top",
"linkdisable": true,
"advertList": []
},
},
}
export const AboutUsConfig = { export const AboutUsConfig = {
key: "18", key: "18",
"18": { "18": {
...@@ -217,9 +310,18 @@ const changeColumn = (data) => { ...@@ -217,9 +310,18 @@ const changeColumn = (data) => {
} }
export const FooterConfig = {
key: '22',
"22": {
"componentName": "Footer",
"props": {},
},
}
export const InformationConfig = { export const InformationConfig = {
key: '19', key: '21',
"19": { "21": {
"componentName": "Information", "componentName": "Information",
"props": { "props": {
newsList: { newsList: {
...@@ -326,12 +428,3 @@ export const InformationConfig = { ...@@ -326,12 +428,3 @@ export const InformationConfig = {
}, },
}, },
} }
export const FooterConfig = {
key: '20',
"20": {
"componentName": "Footer",
"props": {},
},
}
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { BrickProvider } from '@lingxi-disign/react'; import { BrickProvider } from '@lingxi-disign/react';
import { LAYOUT_TYPE } from '@/constants'; import { LAYOUT_TYPE } from '@/constants';
import { topBarConfig, topAdvertConfig, headerConfig, mainNavConfig, bannerAdvertConfig, CommonTitle1Config, mallLayoutConfig, serviceAdvertConfig, CommonTitle2Config, AboutUsConfig, InformationConfig, FooterConfig } from './defaultData'; import { topBarConfig, headerConfig, mainNavConfig, horizontalWrap, channelCategoryConfig, bannerWrap, bannerAdvertConfig, interactAdvertConfig, channelQuickNavConfig, mallLayoutConfig, serviceAdvertConfig, CommonTitle2Config, CompanyInfoConfig, AlbumConfig, HonroPicConfig, InformationConfig, FooterConfig } from './defaultData'
import { menuData } from './defaultMenu'; import { menuData } from './defaultMenu';
import styles from './index.less'; import styles from './index.less';
import ToolBar from '../../components/toolBar'; import ToolBar from '../../components/toolBar';
...@@ -27,7 +27,7 @@ interface ShopPreviewPropsType { ...@@ -27,7 +27,7 @@ interface ShopPreviewPropsType {
const TemplateList = ['science']; const TemplateList = ['science'];
const ShopPreview: React.FC<ShopPreviewPropsType> = (props) => { const ShopPreview: React.FC<ShopPreviewPropsType> = (props) => {
const { query: { template } } = props.location; const { query: { template, id } } = props.location;
const [loading, setLoading] = useState<boolean>(true); const [loading, setLoading] = useState<boolean>(true);
const [theme, setTheme] = useState<string>('theme-channel-science'); const [theme, setTheme] = useState<string>('theme-channel-science');
const [componentConfigs, setComponentConfigs] = useState({}); const [componentConfigs, setComponentConfigs] = useState({});
...@@ -204,22 +204,28 @@ const ShopPreview: React.FC<ShopPreviewPropsType> = (props) => { ...@@ -204,22 +204,28 @@ const ShopPreview: React.FC<ShopPreviewPropsType> = (props) => {
initIndex += 100; initIndex += 100;
} }
mallLayoutConfig["0"].childNodes = [...mallLayoutConfig["0"].childNodes, ...floorLineKeys, serviceAdvertConfig.key, CommonTitle2Config.key, AboutUsConfig.key, InformationConfig.key, FooterConfig.key]; mallLayoutConfig["0"].childNodes = [...mallLayoutConfig["0"].childNodes, ...floorLineKeys, serviceAdvertConfig.key, CommonTitle2Config.key, CompanyInfoConfig.key, AlbumConfig.key, HonroPicConfig.key, InformationConfig.key, FooterConfig.key]
const config = { const config = {
...mallLayoutConfig, ...mallLayoutConfig,
...topBarConfig, ...topBarConfig,
...topAdvertConfig,
...headerConfig, ...headerConfig,
...mainNavConfig, ...mainNavConfig,
...horizontalWrap,
...channelCategoryConfig,
...bannerWrap,
...bannerAdvertConfig, ...bannerAdvertConfig,
...CommonTitle1Config, ...interactAdvertConfig,
...channelQuickNavConfig,
...floorLineConfig, ...floorLineConfig,
...serviceAdvertConfig, ...serviceAdvertConfig,
...CommonTitle2Config, ...CommonTitle2Config,
...AboutUsConfig, ...CompanyInfoConfig,
...AlbumConfig,
...HonroPicConfig,
...InformationConfig, ...InformationConfig,
...FooterConfig ...FooterConfig
}; }
setComponentConfigs(config); setComponentConfigs(config);
setLoading(false); setLoading(false);
}; };
...@@ -229,7 +235,7 @@ const ShopPreview: React.FC<ShopPreviewPropsType> = (props) => { ...@@ -229,7 +235,7 @@ const ShopPreview: React.FC<ShopPreviewPropsType> = (props) => {
config={config} config={config}
> >
<div className={styles['wrapper']}> <div className={styles['wrapper']}>
<ToolBar type={2} title="首页" /> <ToolBar templateId={Number(id)} type={2} title="首页" />
<div className={styles['content']}> <div className={styles['content']}>
<div className={styles['canvas-container']}> <div className={styles['canvas-container']}>
<PreviewPanel theme={theme} pageConfig={componentConfigs} /> <PreviewPanel theme={theme} pageConfig={componentConfigs} />
......
...@@ -73,7 +73,7 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => { ...@@ -73,7 +73,7 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
const headers: any = { const headers: any = {
shopId shopId
} }
getTemplateWebCategoryWebFindAllFirstCategory({}, { headers }).then(res => { getTemplateWebCategoryWebFindAllFirstCategory({ templateId: String(id) }, { headers }).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
resolve(res.data); resolve(res.data);
} else { } else {
......
...@@ -35,7 +35,7 @@ interface MallEditPropsType { ...@@ -35,7 +35,7 @@ interface MallEditPropsType {
* 模板名称 * 模板名称
*/ */
template: string; template: string;
shopId: number; shopId: string;
} }
} }
} }
...@@ -43,7 +43,7 @@ interface MallEditPropsType { ...@@ -43,7 +43,7 @@ interface MallEditPropsType {
const TemplateList = ['science']; const TemplateList = ['science'];
const MallEdit: React.FC<MallEditPropsType> = (props) => { const MallEdit: React.FC<MallEditPropsType> = (props) => {
const { query: { id, template } } = props.location; const { query: { id, template, shopId } } = props.location;
const [loading, setLoading] = useState<boolean>(true); const [loading, setLoading] = useState<boolean>(true);
const [theme, setTheme] = useState<string>('theme-mall-science'); const [theme, setTheme] = useState<string>('theme-mall-science');
const [componentConfigs, setComponentConfigs] = useState({}); const [componentConfigs, setComponentConfigs] = useState({});
...@@ -178,7 +178,11 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => { ...@@ -178,7 +178,11 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
pageSize: 6, pageSize: 6,
overdue: true overdue: true
}; };
getPurchaseInviteTenderGetInviteTenderListByEnterpriseWeb(param).then((res) => {
const headers: any = {
shopId: GlobalConfig.srmMallId || 0
}
getPurchaseInviteTenderGetInviteTenderListByEnterpriseWeb(param, { headers }).then((res) => {
if (res.code === 1000) { if (res.code === 1000) {
let list: any[] = res.data.data; let list: any[] = res.data.data;
list = list.map((item) => { list = list.map((item) => {
......
...@@ -27,7 +27,7 @@ export const topBarConfig = { ...@@ -27,7 +27,7 @@ export const topBarConfig = {
export const topAdvertConfig = { export const topAdvertConfig = {
key: "2", key: "2",
"2": { "2": {
"componentName": "Advert", "componentName": "ShopAdvert",
"props": { "props": {
"type": "top", "type": "top",
"linkdisable": true, "linkdisable": true,
...@@ -86,7 +86,7 @@ export const mainNavConfig = { ...@@ -86,7 +86,7 @@ export const mainNavConfig = {
export const bannerAdvertConfig = { export const bannerAdvertConfig = {
key: "5", key: "5",
"5": { "5": {
"componentName": "Advert", "componentName": "ShopAdvert",
"props": { "props": {
"type": "banner", "type": "banner",
"linkdisable": true, "linkdisable": true,
......
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