Commit 9ea094b9 authored by Bill's avatar Bill
parents d076125b 8a96f766
......@@ -40,7 +40,7 @@
"start:10": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.10:8100 SOCKET_URL=ws://10.0.0.10:9400 yarn start",
"start:25": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.25:8100 SOCKET_URL=ws://10.0.0.25:9400 yarn start",
"start:v2": "cross-env PRO_ENV=v2 yarn start",
"start:v2Preview": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.1.220:8100 SOCKET_URL=ws://10.0.1.220:9400 yarn start",
"start:v2Preview": "cross-env PRO_ENV=v2Preview yarn start",
"start:v2Test": "cross-env SITE_ID=1 BACK_GATEWAY=http://lx-pre-gateway.shushangyun.com USE_ROUTE_CONFIG=false SOCKET_URL=ws://lx-pre-gateway.shushangyun.com yarn start",
"start:scm": "cross-env BACK_GATEWAY=http://lingxi-scm.wg.shushangyun.com SOCKET_URL=ws://lingxi-scm.wg.shushangyun.com SITE_ID=1 yarn start",
"start:study": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.1.207:8100 SOCKET_URL=ws://10.0.1.207:9400 yarn start"
......
......@@ -32,7 +32,7 @@ export interface SiteInfo {
name: string;
logo: string;
siteUrl: string;
symbol?: any;
symbol: string;
}
export interface Global {
......
......@@ -429,11 +429,12 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
switch (fixedItem.name) {
// 导航
case 'navList':
if (fixedItem.content) {
mainNavConfig[mainNavConfig.key].props.menuData = fixedItem.content;
} else {
mainNavConfig[mainNavConfig.key].props.menuData = getMenuData();
}
mainNavConfig[mainNavConfig.key].props.menuData = getMenuData(fixedItem.content)
// if (fixedItem.content) {
// mainNavConfig[mainNavConfig.key].props.menuData = fixedItem.content;
// } else {
// mainNavConfig[mainNavConfig.key].props.menuData = getMenuData();
// }
break;
// 轮播图广告
case 'bannerAdvert':
......
......@@ -3,6 +3,15 @@ import { SRM_CENTER_URL, LOGISTICS_CENTER_URL, MANUFACTURE_CENTER_URL, INFO_CENT
const siteUrl = GlobalConfig.global.siteInfo.siteUrl;
export interface NavItemType {
id?: number,
link: string,
name: string,
status: boolean,
type: number,
key?: string,
}
/**
* 请求头
*/
......@@ -15,7 +24,16 @@ export const getTopDomainByHost = (url: string): string => {
export const TOP_DOMAIN = getTopDomainByHost(siteUrl);
export const getMenuData = () => {
const getStatusByType = (type: number, list: NavItemType[] | undefined) => {
if (!list) return true
const current = list.filter((item) => item.type === type)[0]
if (current) {
return current.status
}
return true
}
export const getMenuData = (list?: NavItemType[]) => {
const shopInfo = GlobalConfig.web.shopInfo;
const webMallList = shopInfo.filter((item: any) => item.type === 1 && item.environment === 1);
const channelList = shopInfo.filter((item: any) => item.type === 3 && item.environment === 1);
......@@ -35,7 +53,7 @@ export const getMenuData = () => {
"link": siteUrl,
"name": "首页",
"type": 1,
"status": true,
"status": getStatusByType(1, list),
"key": "home",
},
{
......@@ -43,7 +61,7 @@ export const getMenuData = () => {
"link": `${REQUEST_HEADER}${enterpriseSubDomain}.${TOP_DOMAIN}`,
"name": "企业商城",
"type": 2,
"status": true,
"status": getStatusByType(2, list),
"key": "enterpriseMall",
},
{
......@@ -51,7 +69,7 @@ export const getMenuData = () => {
"link": SRM_CENTER_URL,
"name": "名企采购",
"type": 3,
"status": true,
"status": getStatusByType(3, list),
"key": "srm",
},
{
......@@ -59,7 +77,7 @@ export const getMenuData = () => {
"link": `${REQUEST_HEADER}${enterpriseSubDomain}.${TOP_DOMAIN}/stores`,
"name": "优选供应商",
"type": 4,
"status": true,
"status": getStatusByType(4, list),
"key": "enterpriseMallStores",
},
{
......@@ -67,7 +85,7 @@ export const getMenuData = () => {
"link": `${REQUEST_HEADER}${channelSubDomain}.${TOP_DOMAIN}`,
"name": "渠道服务",
"type": 5,
"status": true,
"status": getStatusByType(5, list),
"key": "channel",
},
{
......@@ -76,14 +94,14 @@ export const getMenuData = () => {
"name": "物流服务",
"type": 6,
"key": "logistics",
"status": true,
"status": getStatusByType(6, list),
},
{
"id": 6,
"link": MANUFACTURE_CENTER_URL,
"name": "加工服务",
"type": 7,
"status": true,
"status": getStatusByType(7, list),
"key": "process",
},
{
......@@ -91,7 +109,7 @@ export const getMenuData = () => {
"link": `${REQUEST_HEADER}${enterpriseSubDomain}.${TOP_DOMAIN}/integral`,
"name": "积分商城",
"type": 8,
"status": true,
"status": getStatusByType(8, list),
"key": "enterprisePointsMall",
},
{
......@@ -99,7 +117,7 @@ export const getMenuData = () => {
"link": INFO_CENTER_URL,
"name": "行情资讯",
"type": 9,
"status": true,
"status": getStatusByType(9, list),
"key": "information",
},
];
......
......@@ -6,14 +6,14 @@ import { StandardTable } from '@linkseeks/god'
import { ColumnType } from 'antd/lib/table/interface'
import moment from 'moment'
import EyePreview from '@/components/EyePreview'
import { getProductBrandGetPlatformBrandList } from '@/services/ProductV2Api'
import { getProductBrandGetPlatformUnCheckBrandList } from '@/services/ProductV2Api'
const Trademark: React.FC<{}> = () => {
const ref = useRef<any>({})
const fetchData = (params: any) => {
return new Promise((resolve, reject) => {
getProductBrandGetPlatformBrandList({ ...params, name: params.name || '', status: 2 }).then(res => {
getProductBrandGetPlatformUnCheckBrandList({ ...params, name: params.name || '', status: 2 }).then(res => {
const { data } = res
resolve(data)
})
......
No preview for this file 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