Commit 39ed5de9 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏
parents 35cd1181 e5c72d91
......@@ -41,7 +41,7 @@
"core-js": "^3.6.5",
"god": "^0.1.26",
"lingxi-design": "^1.0.7",
"lingxi-design-ui": "^1.0.8",
"lingxi-design-ui": "^1.0.9",
"lingxi-editor-core": "^1.0.6",
"lingxi-web": "^1.0.6",
"lint-staged": "^10.0.7",
......
......@@ -36,6 +36,33 @@ export const SHOP_TYPES = [
name: "渠道积分商城"
},
]
export enum LAYOUT_TYPE {
/**
* 企业商城
*/
mall = 'mall',
/**
* 店铺(店铺商城)
*/
shop = 'shop',
/**
* 渠道商城
*/
channel = 'channel',
/**
* 企业商城-积分商城
*/
scoreMall = 'scoreMall',
/**
* 店铺-积分兑换
*/
shopScoreMall = 'shopScoreMall',
/**
* 渠道商城-积分兑换
*/
channelScoreMall = 'channelScoreMall',
}
// 本地环境跳过权限校验
export const isDev = process.env.NODE_ENV === "development"
......
......@@ -3,7 +3,7 @@ import { Row, Col } from 'antd'
import { inject } from 'mobx-react'
import TemplateItem from '../components/templateItem'
import { PublicApi } from '@/services/api'
import { GetTemplatePlatformFindAllTemplateByTypeResponse } from '@/services'
import { GetTemplatePlatformFindAllTemplateByTypeResponse } from '@/services/TemplateApi'
import { TEMPLATE_TYPE } from '@/constants'
import styles from './index.less'
......
......@@ -3,6 +3,7 @@ import { PlayCircleOutlined } from '@ant-design/icons'
import cx from 'classnames'
import { Link } from 'umi'
import { TEMPLATE_TYPE_TEXT } from '@/constants'
import { GetTemplatePlatformFindAllTemplateByTypeResponse } from '@/services/TemplateApi'
import styles from './index.less'
interface TemplateItemPropsType {
......@@ -61,9 +62,9 @@ const TemplateItem: React.FC<TemplateItemPropsType> = (props) => {
</div>
{
type === TEMPLATE_TYPE_TEXT.mall ? (
<div className={cx(styles.template_item_btn, templateInfo.use === 1 ? styles.active : '')}>
<div className={cx(styles.template_item_btn, templateInfo.status === 1 ? styles.active : '')}>
<PlayCircleOutlined />
<label>{templateInfo.use === 1 ? '启用中' : '启用'}</label>
<label>{templateInfo.status === 1 ? '启用中' : '启用'}</label>
</div>
) : (
<div className={cx(styles.template_item_btn, templateInfo.shelf === 1 ? styles.active : '')}>
......
export const menuData = [
{
"path": "/shop",
"name": "首页",
"key": "shopHome",
},
{
"path": "/commodity",
"name": "商品商城",
"key": "shopCommodity",
},
{
"path": "/purchaseOnline",
"name": "在线求购",
"key": "purchaseOnline",
},
{
"path": "/pointsMall",
"name": "积分商城",
"key": "shopPointsMall",
},
{
"path": "/shops",
"name": "店铺",
"key": "shops",
},
{
"path": "/shop/infomation",
"name": "资讯",
"key": "shopInfomation",
},
]
\ No newline at end of file
......@@ -6,6 +6,8 @@ import SettingPanel from '../settingsPanel'
import config from '../configs'
import { topBarConfig, topAdvertConfig, headerConfig, mainNavConfig, bannerAdvertConfig, interactAdvertConfig, mallLayoutConfig, FindMoreConfig, InformationConfig, FooterConfig } from './defaultData'
import Loading from './loading'
import { LAYOUT_TYPE } from '@/constants'
import { menuData } from './defaultMenu'
import { PublicApi } from '@/services/api'
import styles from './index.less'
......@@ -114,6 +116,11 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
}
const getComponentsConfig = async () => {
// 导航栏
mainNavConfig[mainNavConfig.key].props.menuData = menuData
mainNavConfig[mainNavConfig.key].props.type = LAYOUT_TYPE.mall
mainNavConfig[mainNavConfig.key].props.categoryList = []
// 一号位广告
bannerAdvertConfig[bannerAdvertConfig.key].props.advertList = await findFirstAdvertsByType()
// 二号位广告
......
......@@ -4,7 +4,7 @@ import TemplateItem from '../components/templateItem'
import { inject } from 'mobx-react'
import { PublicApi } from '@/services/api'
import { TEMPLATE_TYPE } from '@/constants'
import { GetTemplatePlatformFindAllTemplateByTypeResponse } from '@/services'
import { GetTemplatePlatformFindAllTemplateByTypeResponse } from '@/services/TemplateApi'
import styles from './index.less'
interface ShopCenterTemplatePropsType {
......@@ -22,7 +22,9 @@ const ShopCenterTemplate: React.FC<ShopCenterTemplatePropsType> = (props) => {
}
//@ts-ignore
PublicApi.getTemplatePlatformFindAllTemplateByType(prarm).then(res => {
if (res.code === 1000) {
setTemplateList(res.data)
}
})
}, [])
......
......@@ -4,7 +4,7 @@ import { inject } from 'mobx-react'
import TemplateItem from '../components/templateItem'
import { PublicApi } from '@/services/api'
import { TEMPLATE_TYPE } from '@/constants'
import { GetTemplatePlatformFindAllTemplateByTypeResponse } from '@/services'
import { GetTemplatePlatformFindAllTemplateByTypeResponse } from '@/services/TemplateApi'
import styles from './index.less'
interface ShopCenterTemplatePropsType {
......
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