Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linweijiong
jinfa-admin
Commits
cb890863
Commit
cb890863
authored
May 26, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 平台首页装修
parent
f544eff1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
849 additions
and
156 deletions
+849
-156
index.ts
src/constants/index.ts
+1
-0
index.tsx
src/pages/pageCustomized/components/templateItem/index.tsx
+2
-2
PlatformAddGoodsItem.ts
...configs/componentConfigs/LingXiUI/PlatformAddGoodsItem.ts
+13
-0
PlatformAdvert.ts
...mized/configs/componentConfigs/LingXiUI/PlatformAdvert.ts
+17
-0
PlatformBrand.ts
...omized/configs/componentConfigs/LingXiUI/PlatformBrand.ts
+13
-0
PlatformGoods.ts
...omized/configs/componentConfigs/LingXiUI/PlatformGoods.ts
+13
-0
PlatformInformation.ts
.../configs/componentConfigs/LingXiUI/PlatformInformation.ts
+13
-0
PlatformLogistics.ts
...ed/configs/componentConfigs/LingXiUI/PlatformLogistics.ts
+13
-0
PlatformMerchant.ts
...zed/configs/componentConfigs/LingXiUI/PlatformMerchant.ts
+13
-0
PlatformProcess.ts
...ized/configs/componentConfigs/LingXiUI/PlatformProcess.ts
+13
-0
PlatformPurchase.ts
...zed/configs/componentConfigs/LingXiUI/PlatformPurchase.ts
+42
-0
PlatformQuickNav.ts
...zed/configs/componentConfigs/LingXiUI/PlatformQuickNav.ts
+13
-0
PlatformService.ts
...ized/configs/componentConfigs/LingXiUI/PlatformService.ts
+13
-0
index.ts
...pageCustomized/configs/componentConfigs/LingXiUI/index.ts
+22
-0
index.ts
src/pages/pageCustomized/configs/index.ts
+2
-1
reactCategory.ts
src/pages/pageCustomized/configs/reactCategory.ts
+12
-0
index.less
...s/pageCustomized/customComponents/AddGoodsItem/index.less
+21
-0
index.tsx
...es/pageCustomized/customComponents/AddGoodsItem/index.tsx
+23
-0
index.ts
src/pages/pageCustomized/customComponents/index.ts
+1
-0
defaultData.ts
src/pages/pageCustomized/platformEdit/defaultData.ts
+126
-80
defaultMenu.ts
src/pages/pageCustomized/platformEdit/defaultMenu.ts
+0
-70
index.less
src/pages/pageCustomized/platformEdit/index.less
+41
-0
index.tsx
src/pages/pageCustomized/platformEdit/index.tsx
+0
-0
types.ts
src/pages/pageCustomized/platformEdit/types.ts
+8
-0
utils.ts
src/pages/pageCustomized/platformEdit/utils.ts
+298
-0
index.tsx
src/pages/pageCustomized/platformTemplate/index.tsx
+1
-1
index.less
...propsSettings/components/PlatformAdvertSetting/index.less
+93
-0
index.tsx
.../propsSettings/components/PlatformAdvertSetting/index.tsx
+0
-0
index.tsx
...ages/pageCustomized/settingsPanel/propsSettings/index.tsx
+3
-0
index.tsx
src/pages/pageCustomized/templateDetail/index.tsx
+19
-2
No files found.
src/constants/index.ts
View file @
cb890863
...
...
@@ -51,6 +51,7 @@ export enum TEMPLATE_TYPE {
}
export
enum
TEMPLATE_TYPE_TEXT
{
platform
=
'platform'
,
mall
=
'mall'
,
shop
=
'shop'
,
goods
=
'goods'
,
...
...
src/pages/pageCustomized/components/templateItem/index.tsx
View file @
cb890863
...
...
@@ -51,7 +51,7 @@ const TemplateItem: React.FC<TemplateItemPropsType> = (props) => {
<
span
>
{
templateInfo
.
siteName
}
</
span
>
</
div
>
{
type
!==
TEMPLATE_TYPE_TEXT
.
goods
&&
(
(
type
!==
TEMPLATE_TYPE_TEXT
.
goods
&&
type
!==
TEMPLATE_TYPE_TEXT
.
platform
)
&&
(
<
div
className=
{
styles
.
template_info_content_text_line
}
>
<
label
>
使用商城:
</
label
>
<
span
title=
{
templateInfo
.
shopName
}
>
{
templateInfo
.
shopName
}
</
span
>
...
...
@@ -60,7 +60,7 @@ const TemplateItem: React.FC<TemplateItemPropsType> = (props) => {
}
</
div
>
{
type
===
TEMPLATE_TYPE_TEXT
.
mall
?
(
(
type
===
TEMPLATE_TYPE_TEXT
.
mall
||
type
===
TEMPLATE_TYPE_TEXT
.
platform
)
?
(
<
div
className=
{
cx
(
styles
.
template_item_btn
,
templateInfo
.
status
===
1
?
styles
.
active
:
''
)
}
>
<
PlayCircleOutlined
/>
<
label
>
{
templateInfo
.
status
===
1
?
'启用中'
:
'启用'
}
</
label
>
...
...
src/pages/pageCustomized/configs/componentConfigs/LingXiUI/PlatformAddGoodsItem.ts
0 → 100644
View file @
cb890863
import
{
ComponentConfigTypes
,
PROPS_TYPES
}
from
'lingxi-editor-core'
;
// 平台首页添加推荐商品
const
PlatformAddGoodsItem
:
ComponentConfigTypes
=
{
propsConfig
:
{
children
:
{
label
:
'文本内容'
,
type
:
PROPS_TYPES
.
string
,
},
},
};
export
default
PlatformAddGoodsItem
;
src/pages/pageCustomized/configs/componentConfigs/LingXiUI/PlatformAdvert.ts
0 → 100644
View file @
cb890863
import
{
ComponentConfigTypes
,
PROPS_TYPES
}
from
'lingxi-editor-core'
;
// 平台首页广告编辑
const
PlatformAdvert
:
ComponentConfigTypes
=
{
propsConfig
:
{
componentType
:
{
label
:
'广告编辑'
,
type
:
PROPS_TYPES
.
platformAdvert
},
sliderList
:
{
label
:
'广告编辑'
,
type
:
PROPS_TYPES
.
carousel
,
},
},
};
export
default
PlatformAdvert
;
src/pages/pageCustomized/configs/componentConfigs/LingXiUI/PlatformBrand.ts
0 → 100644
View file @
cb890863
import
{
ComponentConfigTypes
,
PROPS_TYPES
}
from
'lingxi-editor-core'
;
// 平台首页品牌馆
const
PlatformBrand
:
ComponentConfigTypes
=
{
propsConfig
:
{
children
:
{
label
:
'文本内容'
,
type
:
PROPS_TYPES
.
string
,
},
},
};
export
default
PlatformBrand
;
src/pages/pageCustomized/configs/componentConfigs/LingXiUI/PlatformGoods.ts
0 → 100644
View file @
cb890863
import
{
ComponentConfigTypes
,
PROPS_TYPES
}
from
'lingxi-editor-core'
;
// 平台首页推荐商品
const
PlatformGoods
:
ComponentConfigTypes
=
{
propsConfig
:
{
children
:
{
label
:
'文本内容'
,
type
:
PROPS_TYPES
.
string
,
},
},
};
export
default
PlatformGoods
;
src/pages/pageCustomized/configs/componentConfigs/LingXiUI/PlatformInformation.ts
0 → 100644
View file @
cb890863
import
{
ComponentConfigTypes
,
PROPS_TYPES
}
from
'lingxi-editor-core'
;
// 平台首页行情资讯
const
PlatformInformation
:
ComponentConfigTypes
=
{
propsConfig
:
{
children
:
{
label
:
'文本内容'
,
type
:
PROPS_TYPES
.
string
,
},
},
};
export
default
PlatformInformation
;
src/pages/pageCustomized/configs/componentConfigs/LingXiUI/PlatformLogistics.ts
0 → 100644
View file @
cb890863
import
{
ComponentConfigTypes
,
PROPS_TYPES
}
from
'lingxi-editor-core'
;
// 平台首页物流服务
const
PlatformLogistics
:
ComponentConfigTypes
=
{
propsConfig
:
{
children
:
{
label
:
'文本内容'
,
type
:
PROPS_TYPES
.
string
,
},
},
};
export
default
PlatformLogistics
;
src/pages/pageCustomized/configs/componentConfigs/LingXiUI/PlatformMerchant.ts
0 → 100644
View file @
cb890863
import
{
ComponentConfigTypes
,
PROPS_TYPES
}
from
'lingxi-editor-core'
;
// 平台首页实力商家
const
PlatformMerchant
:
ComponentConfigTypes
=
{
propsConfig
:
{
children
:
{
label
:
'文本内容'
,
type
:
PROPS_TYPES
.
string
,
},
},
};
export
default
PlatformMerchant
;
src/pages/pageCustomized/configs/componentConfigs/LingXiUI/PlatformProcess.ts
0 → 100644
View file @
cb890863
import
{
ComponentConfigTypes
,
PROPS_TYPES
}
from
'lingxi-editor-core'
;
// 平台首页加工服务
const
PlatformProcess
:
ComponentConfigTypes
=
{
propsConfig
:
{
children
:
{
label
:
'文本内容'
,
type
:
PROPS_TYPES
.
string
,
},
},
};
export
default
PlatformProcess
;
src/pages/pageCustomized/configs/componentConfigs/LingXiUI/PlatformPurchase.ts
0 → 100644
View file @
cb890863
import
{
ComponentConfigTypes
,
PROPS_TYPES
,
NODE_PROPS_TYPES
}
from
'lingxi-editor-core'
;
// 平台首页名企采购
const
PlatformPurchase
:
ComponentConfigTypes
=
{
nodePropsConfig
:
{
overflowedIndicator
:
{
type
:
NODE_PROPS_TYPES
.
reactNode
,
isOnlyNode
:
true
,
},
children
:
{
type
:
NODE_PROPS_TYPES
.
reactNode
,
childNodesRule
:
[
'PlatformPurchase.Banner'
],
},
},
propsConfig
:
{
children
:
{
label
:
'文本内容'
,
type
:
PROPS_TYPES
.
string
,
},
},
};
const
Banner
:
ComponentConfigTypes
=
{
propsConfig
:
{
componentType
:
{
label
:
'分类广告推荐设置'
,
type
:
PROPS_TYPES
.
categoryBanner
},
dataList
:
{
label
:
'分类广告推荐设置'
,
type
:
PROPS_TYPES
.
categoryBanner
,
},
},
};
export
default
{
PlatformPurchase
,
'PlatformPurchase.Banner'
:
Banner
,
};
src/pages/pageCustomized/configs/componentConfigs/LingXiUI/PlatformQuickNav.ts
0 → 100644
View file @
cb890863
import
{
ComponentConfigTypes
,
PROPS_TYPES
}
from
'lingxi-editor-core'
;
// 平台首页快捷导航
const
PlatformQuickNav
:
ComponentConfigTypes
=
{
propsConfig
:
{
children
:
{
label
:
'文本内容'
,
type
:
PROPS_TYPES
.
string
,
},
},
};
export
default
PlatformQuickNav
;
src/pages/pageCustomized/configs/componentConfigs/LingXiUI/PlatformService.ts
0 → 100644
View file @
cb890863
import
{
ComponentConfigTypes
,
PROPS_TYPES
}
from
'lingxi-editor-core'
;
// 平台首页平台服务
const
PlatformService
:
ComponentConfigTypes
=
{
propsConfig
:
{
children
:
{
label
:
'文本内容'
,
type
:
PROPS_TYPES
.
string
,
},
},
};
export
default
PlatformService
;
src/pages/pageCustomized/configs/componentConfigs/LingXiUI/index.ts
View file @
cb890863
...
...
@@ -26,6 +26,17 @@ import MobileQuickNav from './MobileQuickNav'
import
MobileRecommendShops
from
'./MobileRecommendShops'
import
MobileShowCase
from
'./MobileShowCase'
import
Category
from
'./Category'
import
PlatformQuickNav
from
'./PlatformQuickNav'
import
PlatformAdvert
from
'./PlatformAdvert'
import
PlatformGoods
from
'./PlatformGoods'
import
PlatformBrand
from
'./PlatformBrand'
import
PlatformLogistics
from
'./PlatformLogistics'
import
PlatformMerchant
from
'./PlatformMerchant'
import
PlatformProcess
from
'./PlatformProcess'
import
PlatformPurchase
from
'./PlatformPurchase'
import
PlatformService
from
'./PlatformService'
import
PlatformInformation
from
'./PlatformInformation'
import
PlatformAddGoodsItem
from
'./PlatformAddGoodsItem'
export
default
{
TopBar
,
...
...
@@ -56,4 +67,15 @@ export default {
MobileRecommendShops
,
MobileShowCase
,
Category
,
PlatformQuickNav
,
PlatformAdvert
,
PlatformGoods
,
PlatformBrand
,
PlatformLogistics
,
PlatformMerchant
,
PlatformInformation
,
PlatformProcess
,
...
PlatformPurchase
,
PlatformService
,
PlatformAddGoodsItem
,
}
src/pages/pageCustomized/configs/index.ts
View file @
cb890863
...
...
@@ -3,11 +3,12 @@ import { reactContainers, reactNonContainers } from './reactCategory';
// import * as Ants from 'antd/es';
import
*
as
LingXiUI
from
'lingxi-design-ui'
import
AllComponentConfigs
from
'./componentConfigs'
;
import
*
as
CustomComponents
from
'../customComponents'
import
{
CategoryType
,
ConfigType
}
from
'lingxi-editor-core'
;
import
{
flattenDeepArray
}
from
'../utils'
;
import
{
message
}
from
'antd'
;
const
originalComponents
=
{
...
LingXiUI
}
const
originalComponents
=
{
...
LingXiUI
,
...
CustomComponents
}
/**
* 容器组件分类
...
...
src/pages/pageCustomized/configs/reactCategory.ts
View file @
cb890863
...
...
@@ -45,6 +45,18 @@ export const reactContainers: CategoryType = {
'FloorLine.Horizontal'
:
null
,
}
},
'PlatformPurchase'
:
{
components
:
{
'PlatformPurchase'
:
{
props
:
[{
style
:
{
height
:
100
,
}
}]
},
'PlatformPurchase.Banner'
:
null
}
},
'ShopFloorLine'
:
{
components
:
{
'ShopFloorLine'
:
{
...
...
src/pages/pageCustomized/customComponents/AddGoodsItem/index.less
0 → 100644
View file @
cb890863
.add_goods_item {
width: 1200px;
height: 32px;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
border: 1px dashed #00B37A;
margin-top: 16px;
cursor: pointer;
.add_icon {
margin-right: 9.4px;
color: #00B37A;
}
.add_text {
color: #00B37A;
font-size: 12px;
}
}
src/pages/pageCustomized/customComponents/AddGoodsItem/index.tsx
0 → 100644
View file @
cb890863
import
React
from
'react'
import
{
PlusCircleOutlined
}
from
'@ant-design/icons'
import
cx
from
'classnames'
import
styles
from
'./index.less'
interface
AddGoodsItemProps
{
className
?:
string
}
const
AddGoodsItem
:
React
.
FC
<
AddGoodsItemProps
>
=
(
props
)
=>
{
const
{
className
,
...
others
}
=
props
const
classNameString
=
cx
(
styles
.
add_goods_item
,
className
)
return
(
<
div
className=
{
classNameString
}
{
...
others
}
>
<
PlusCircleOutlined
className=
{
styles
.
add_icon
}
/>
<
span
className=
{
styles
.
add_text
}
>
添加新的推荐商品模块
</
span
>
</
div
>
)
}
export
default
AddGoodsItem
src/pages/pageCustomized/customComponents/index.ts
0 → 100644
View file @
cb890863
export
{
default
as
PlatformAddGoodsItem
}
from
'./AddGoodsItem'
src/pages/pageCustomized/platformEdit/defaultData.ts
View file @
cb890863
...
...
@@ -9,7 +9,7 @@ export const mallLayoutConfig = {
"minHeight"
:
"100%"
}
},
"childNodes"
:
[
"1"
,
"3"
,
"4"
,
"
21
"
]
"childNodes"
:
[
"1"
,
"3"
,
"4"
,
"
5"
,
"13"
,
"30"
,
"14"
,
"15"
,
"16"
,
"17"
,
"18"
,
"19"
,
"20"
,
"22
"
]
},
}
...
...
@@ -23,24 +23,12 @@ export const topBarConfig = {
}
}
export
const
topAdvertConfig
=
{
key
:
"2"
,
"2"
:
{
"componentName"
:
"Advert"
,
"props"
:
{
"type"
:
"top"
,
"linkdisable"
:
true
,
"advertList"
:
[]
},
},
}
export
const
headerConfig
=
{
key
:
"3"
,
"3"
:
{
"componentName"
:
"Header"
,
"props"
:
{
"
logoUrl"
:
"
"
"
type"
:
"platform
"
},
},
}
...
...
@@ -53,28 +41,10 @@ export const mainNavConfig = {
},
}
// < div className = { styles.horizontalWrap } >
// <Category categoryList={ categoryList } />
// < div className = { styles.bannerWrap } >
// {
// useMemo(() => <Advert type="banner" advertList = { firstAdvertList } />, [firstAdvertList])
// }
// {
// useMemo(() => <Advert type="interact" advertList = { secondAdvertList } />, [secondAdvertList])
// }
// </div>
// < div className = { styles.quickNavWrap } >
// <QuickNav
// userInfo={ userInfo }
// userRoles = { userRoles }
// name = { mallInfo?.name }
// advertList = { secondAdvertList }
// />
// </div>
// < /div>
export
const
bannerContainer
=
{
key
:
"
21
"
,
"
21
"
:
{
key
:
"
5
"
,
"
5
"
:
{
"componentName"
:
"div"
,
"props"
:
{
"style"
:
{
...
...
@@ -85,13 +55,13 @@ export const bannerContainer = {
margin
:
"0 auto"
,
}
},
"childNodes"
:
[
"
22"
,
"23"
,
"24
"
]
"childNodes"
:
[
"
6"
,
"7"
,
"12
"
]
}
}
export
const
categoryConfig
=
{
key
:
"
22
"
,
"
22
"
:
{
key
:
"
6
"
,
"
6
"
:
{
"componentName"
:
"Category"
,
"props"
:
{
categoryList
:
[],
...
...
@@ -101,94 +71,170 @@ export const categoryConfig = {
}
export
const
bannerWrap
=
{
key
:
"
23
"
,
"
23
"
:
{
key
:
"
7
"
,
"
7
"
:
{
"componentName"
:
"div"
,
"props"
:
{
"style"
:
{
margin
:
"0 16px"
,
flex
:
1
,
width
:
0
,
padding
:
'0 16px'
,
}
},
"childNodes"
:
[
"
5"
,
"6
"
]
"childNodes"
:
[
"
8"
,
"11
"
]
}
}
export
const
quickNavConfigWrap
=
{
key
:
"
24
"
,
"
24
"
:
{
export
const
bannerHorizontal
=
{
key
:
"
8
"
,
"
8
"
:
{
"componentName"
:
"div"
,
"props"
:
{},
"childNodes"
:
[
"25"
,
"26"
]
"props"
:
{
"style"
:
{
display
:
'flex'
,
justifyContent
:
'space-between'
,
}
}
export
const
quickNavConfig
=
{
key
:
"25"
,
"25"
:
{
"componentName"
:
"QuickNav"
,
"props"
:
{},
},
"childNodes"
:
[
"9"
,
"10"
]
}
}
export
const
nav
AdvertConfig
=
{
key
:
"
26
"
,
"
26
"
:
{
"componentName"
:
"Advert"
,
export
const
banner
AdvertConfig
=
{
key
:
"
9
"
,
"
9
"
:
{
"componentName"
:
"
Platform
Advert"
,
"props"
:
{
"type"
:
"
nav
"
,
"type"
:
"
banner
"
,
"linkdisable"
:
true
,
"advertList"
:
[]
}
,
}
},
}
export
const
bannerAdvertConfig
=
{
key
:
"
5
"
,
"
5
"
:
{
"componentName"
:
"Advert"
,
export
const
banner
Right
AdvertConfig
=
{
key
:
"
10
"
,
"
10
"
:
{
"componentName"
:
"
Platform
Advert"
,
"props"
:
{
"type"
:
"banner"
,
"hasQuickNav"
:
false
,
"type"
:
"bannerRight"
,
"linkdisable"
:
true
,
"advertList"
:
[]
}
},
}
export
const
interact
AdvertConfig
=
{
key
:
"
6
"
,
"
6
"
:
{
"componentName"
:
"Advert"
,
export
const
bannerBottom
AdvertConfig
=
{
key
:
"
11
"
,
"
11
"
:
{
"componentName"
:
"
Platform
Advert"
,
"props"
:
{
"type"
:
"
interact
"
,
"type"
:
"
bannerBottom
"
,
"linkdisable"
:
true
,
"advertList"
:
[]
}
},
}
export
const
quickNavConfigWrap
=
{
key
:
"12"
,
"12"
:
{
"componentName"
:
"PlatformQuickNav"
,
"props"
:
{},
}
}
export
const
PlatformGoodsConfig
=
{
key
:
"13"
,
"13"
:
{
"componentName"
:
"PlatformGoods"
,
"props"
:
{
"dataInfo"
:
{}
},
}
}
export
const
PlatformBrandConfig
=
{
key
:
"14"
,
"14"
:
{
"componentName"
:
"PlatformBrand"
,
"props"
:
{},
}
}
export
const
FindMoreConfig
=
{
export
const
PlatformMerchantConfig
=
{
key
:
"15"
,
"15"
:
{
"componentName"
:
"PlatformMerchant"
,
"props"
:
{},
}
}
export
const
PlatformInformationConfig
=
{
key
:
"16"
,
"16"
:
{
"componentName"
:
"PlatformInformation"
,
"props"
:
{},
}
}
export
const
PlatformPurchaseConfig
=
{
key
:
"17"
,
"17"
:
{
"componentName"
:
"PlatformPurchase"
,
"props"
:
{
},
"childNodes"
:
[
"21"
]
}
}
export
const
PlatformLogisticsConfig
=
{
key
:
"18"
,
"18"
:
{
"componentName"
:
"
FindMore
"
,
"componentName"
:
"
PlatformLogistics
"
,
"props"
:
{},
}
,
}
}
export
const
InformationConfig
=
{
key
:
'19'
,
export
const
PlatformProcessConfig
=
{
key
:
"19"
,
"19"
:
{
"componentName"
:
"Information"
,
"componentName"
:
"PlatformProcess"
,
"props"
:
{},
}
}
export
const
PlatformServiceConfig
=
{
key
:
"20"
,
"20"
:
{
"componentName"
:
"PlatformService"
,
"props"
:
{},
}
}
export
const
PurchaseAdvertConfig
=
{
key
:
"21"
,
"21"
:
{
"componentName"
:
"PlatformPurchase.Banner"
,
"props"
:
{
advertList
:
[]
},
}
}
export
const
FooterConfig
=
{
key
:
'2
0
'
,
"2
0
"
:
{
key
:
'2
2
'
,
"2
2
"
:
{
"componentName"
:
"Footer"
,
"props"
:
{},
},
}
export
const
PlatformAddGoodsItemConfig
=
{
key
:
"30"
,
"30"
:
{
"componentName"
:
'PlatformAddGoodsItem'
,
"props"
:
{},
}
}
src/pages/pageCustomized/platformEdit/defaultMenu.ts
deleted
100644 → 0
View file @
f544eff1
import
{
GlobalConfig
}
from
'@/global/config'
const
siteUrl
=
GlobalConfig
.
site
.
siteInfo
.
siteUrl
/**
* 请求头
*/
export
const
REQUEST_HEADER
=
'http://'
export
const
getTopDomainByHost
=
(
url
:
string
):
string
=>
{
if
(
!
url
)
return
''
return
url
.
split
(
'.'
).
slice
(
-
2
).
join
(
'.'
)
}
export
const
TOP_DOMAIN
=
getTopDomainByHost
(
siteUrl
)
export
const
getMenuData
=
(
shopId
:
number
)
=>
{
const
shopInfo
=
GlobalConfig
.
web
.
shopInfo
const
webMallList
=
shopInfo
.
filter
((
item
:
{
id
:
number
})
=>
item
.
id
===
shopId
)
if
(
webMallList
.
length
>
0
)
{
const
SUB_DOMAIN
=
webMallList
[
0
].
url
return
[
{
"id"
:
0
,
"link"
:
`
${
REQUEST_HEADER
}${
SUB_DOMAIN
}
.
${
TOP_DOMAIN
}
`
,
"name"
:
"商城首页"
,
"status"
:
true
,
"key"
:
"shopHome"
,
},
{
"id"
:
1
,
"link"
:
`
${
REQUEST_HEADER
}${
SUB_DOMAIN
}
.
${
TOP_DOMAIN
}
/commodity`
,
"name"
:
"现货商品"
,
"status"
:
true
,
"key"
:
"shopCommodity"
,
},
{
"id"
:
2
,
"link"
:
`
${
REQUEST_HEADER
}${
SUB_DOMAIN
}
.
${
TOP_DOMAIN
}
/inquiry`
,
"name"
:
"询价商品"
,
"status"
:
true
,
"key"
:
"purchaseOnline"
,
},
{
"id"
:
3
,
"link"
:
`
${
REQUEST_HEADER
}${
SUB_DOMAIN
}
.
${
TOP_DOMAIN
}
/stores`
,
"name"
:
"优选店铺"
,
"status"
:
true
,
"key"
:
"shopPointsMall"
,
},
{
"id"
:
4
,
"link"
:
`
${
REQUEST_HEADER
}${
SUB_DOMAIN
}
.
${
TOP_DOMAIN
}
/integral`
,
"name"
:
"积分商城"
,
"key"
:
"shops"
,
"status"
:
true
,
},
{
"id"
:
5
,
"link"
:
`
${
REQUEST_HEADER
}
info.
${
TOP_DOMAIN
}
`
,
"name"
:
"行情资讯"
,
"status"
:
true
,
"key"
:
"shopInfomation"
,
},
]
}
return
[]
}
src/pages/pageCustomized/platformEdit/index.less
View file @
cb890863
...
...
@@ -23,3 +23,44 @@
overflow: hidden;
}
.toolbar {
width: 100%;
height: 64px;
background-color: #FFF;
display: flex;
align-items: center;
border-bottom: 1px solid #606266;
&_back_btn {
width: 64px;
height: 64px;
text-align: center;
line-height: 64px;
background-color: #606266;
color: #FFF;
cursor: pointer;
}
&_title {
color: #909399;
padding-left: 12px;
font-size: 12px;
&>label {
color: #303133;
font-size: 18px;
margin-left: 4px;
}
}
.toolbar_actions {
margin-left: auto;
padding-right: 24px;
}
}
.modal_confirm {
width: 420px !important;
}
src/pages/pageCustomized/platformEdit/index.tsx
View file @
cb890863
This diff is collapsed.
Click to expand it.
src/pages/pageCustomized/platformEdit/types.ts
0 → 100644
View file @
cb890863
export
interface
DesingConfigItemType
{
name
:
string
,
status
:
boolean
,
content
:
any
}
export
type
PlatformConfigType
=
DesingConfigItemType
[]
src/pages/pageCustomized/platformEdit/utils.ts
0 → 100644
View file @
cb890863
import
{
GlobalConfig
}
from
'@/global/config'
const
siteUrl
=
GlobalConfig
.
site
.
siteInfo
.
siteUrl
/**
* 请求头
*/
export
const
REQUEST_HEADER
=
'http://'
export
const
getTopDomainByHost
=
(
url
:
string
):
string
=>
{
if
(
!
url
)
return
''
return
url
.
split
(
'.'
).
slice
(
-
2
).
join
(
'.'
)
}
export
const
TOP_DOMAIN
=
getTopDomainByHost
(
siteUrl
)
export
const
getMenuData
=
()
=>
{
const
shopInfo
=
GlobalConfig
.
web
.
shopInfo
const
webMallList
=
shopInfo
.
filter
((
item
:
any
)
=>
item
.
type
===
1
&&
item
.
environment
===
1
&&
item
.
isDefault
===
1
)
const
channelList
=
shopInfo
.
filter
((
item
:
any
)
=>
item
.
type
===
3
&&
item
.
environment
===
1
)
if
(
webMallList
.
length
>
0
&&
channelList
.
length
>
0
)
{
const
enterpriseSubDomain
=
webMallList
[
0
].
url
const
channelSubDomain
=
channelList
[
0
].
url
return
[
{
"id"
:
0
,
"link"
:
`
${
REQUEST_HEADER
}
www.
${
TOP_DOMAIN
}
`
,
"name"
:
"首页"
,
"status"
:
true
,
"key"
:
"home"
,
},
{
"id"
:
1
,
"link"
:
`
${
REQUEST_HEADER
}${
enterpriseSubDomain
}
.
${
TOP_DOMAIN
}
`
,
"name"
:
"企业商城"
,
"status"
:
true
,
"key"
:
"enterpriseMall"
,
},
{
"id"
:
2
,
"link"
:
`
${
REQUEST_HEADER
}
srm.
${
TOP_DOMAIN
}
`
,
"name"
:
"名企采购"
,
"status"
:
true
,
"key"
:
"srm"
,
},
{
"id"
:
3
,
"link"
:
`
${
REQUEST_HEADER
}${
enterpriseSubDomain
}
.
${
TOP_DOMAIN
}
/stores`
,
"name"
:
"优选供应商"
,
"status"
:
true
,
"key"
:
"enterpriseMallStores"
,
},
{
"id"
:
4
,
"link"
:
`
${
REQUEST_HEADER
}${
channelSubDomain
}
.
${
TOP_DOMAIN
}
`
,
"name"
:
"渠道服务"
,
"status"
:
true
,
"key"
:
"channel"
,
},
{
"id"
:
5
,
"link"
:
`
${
REQUEST_HEADER
}
logistics.
${
TOP_DOMAIN
}
`
,
"name"
:
"物流服务"
,
"key"
:
"logistics"
,
"status"
:
true
,
},
{
"id"
:
6
,
"link"
:
`
${
REQUEST_HEADER
}
manufacture.
${
TOP_DOMAIN
}
`
,
"name"
:
"加工服务"
,
"status"
:
true
,
"key"
:
"process"
,
},
{
"id"
:
7
,
"link"
:
`
${
REQUEST_HEADER
}${
enterpriseSubDomain
}
.
${
TOP_DOMAIN
}
/integral`
,
"name"
:
"积分商城"
,
"status"
:
true
,
"key"
:
"enterprisePointsMall"
,
},
{
"id"
:
8
,
"link"
:
`
${
REQUEST_HEADER
}
info.
${
TOP_DOMAIN
}
`
,
"name"
:
"行情资讯"
,
"status"
:
true
,
"key"
:
"information"
,
},
]
}
return
[]
}
/**
* 一开始没有装修过用的初始数据
*/
export
const
defaultDesignConfig
=
[
{
name
:
'navList'
,
status
:
true
,
content
:
getMenuData
()
},
{
name
:
'bannerAdvert'
,
status
:
true
,
content
:
[
{
link
:
''
,
imgUrl
:
'https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/积分商城-默认头图639ead79aac64d7aaff5492ecb7fa0d7.jpg'
},
{
link
:
''
,
imgUrl
:
'https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/积分商城-默认头图639ead79aac64d7aaff5492ecb7fa0d7.jpg'
}
]
},
{
name
:
'bannerRightAdvert'
,
status
:
true
,
content
:
[
{
link
:
''
,
imgUrl
:
'https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/20210526172707d615298a7f8e4439bf5d137517d8cd34.jpg'
}
]
},
{
name
:
'banneBottomrAdvert'
,
status
:
true
,
content
:
[
{
link
:
''
,
imgUrl
:
'https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/202105261727241c2b85a9823c4f13bdd1b01bb10d3cb6.jpg'
},
{
link
:
''
,
imgUrl
:
'https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/202105261727241c2b85a9823c4f13bdd1b01bb10d3cb6.jpg'
},
{
link
:
''
,
imgUrl
:
'https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/20210526172735392fd23b81d3447eb11330090a64f035.jpg'
}
]
},
{
name
:
'fastVisit'
,
status
:
true
,
content
:
{
sellerBOList
:
[
{
name
:
'上传商品'
,
icon
:
''
,
link
:
''
,
},
{
name
:
'报价'
,
icon
:
''
,
link
:
''
,
},
{
name
:
'接单'
,
icon
:
''
,
link
:
''
,
}
],
buyerBOList
:
[
{
name
:
'我要求购'
,
icon
:
''
,
link
:
''
,
},
{
name
:
'报价信息'
,
icon
:
''
,
link
:
''
,
},
{
name
:
'我的订单'
,
icon
:
''
,
link
:
''
,
}
],
fastFunctionBOList
:
[
{
name
:
'找现货'
,
icon
:
''
,
link
:
''
,
},
{
name
:
'找供应'
,
icon
:
''
,
link
:
''
,
},
{
name
:
'去求购'
,
icon
:
''
,
link
:
''
,
},
{
name
:
'找店铺'
,
icon
:
''
,
link
:
''
,
},
{
name
:
'换积分'
,
icon
:
''
,
link
:
''
,
},
{
name
:
'看资讯'
,
icon
:
''
,
link
:
''
,
}
]
}
},
{
name
:
'goods'
,
status
:
true
,
content
:
[
{
"advertImg"
:
""
,
"shopId"
:
undefined
,
"firstId"
:
undefined
,
"secondId"
:
undefined
,
"thirdlyId"
:
undefined
,
"name"
:
""
,
"describe"
:
""
,
"goodsIdList"
:
[]
}
]
},
{
name
:
'brand'
,
status
:
true
,
content
:
[]
},
{
name
:
'merchant'
,
status
:
true
,
content
:
[]
},
{
name
:
'marketInformation'
,
status
:
true
,
content
:
{
marketBOList
:
[],
informationBO
:
{
allIdList
:
[],
bazaarIdList
:
[],
hotIdList
:
[],
}
}
},
{
name
:
'middleAdvert'
,
status
:
true
,
content
:
[]
},
{
name
:
'purchase'
,
status
:
true
,
content
:
[]
},
{
name
:
'logistics'
,
status
:
true
,
content
:
{
advertImg
:
""
,
link
:
""
,
advertTitle
:
""
,
advertDescribe
:
""
,
logisticsMerchantBOList
:
[]
}
},
{
name
:
'process'
,
status
:
true
,
content
:
{
advertImg
:
""
,
link
:
""
,
advertTitle
:
""
,
advertDescribe
:
""
,
processMerchantBOList
:
[]
}
},
{
name
:
'platform'
,
status
:
true
,
content
:
[]
},
{
name
:
'bottomAdvert'
,
status
:
true
,
content
:
[]
}
]
src/pages/pageCustomized/platformTemplate/index.tsx
View file @
cb890863
...
...
@@ -33,7 +33,7 @@ const ShopCenterTemplate: React.FC<ShopCenterTemplatePropsType> = (props) => {
{
templateList
.
map
(
item
=>
(
<
Col
xxl=
{
6
}
xl=
{
8
}
lg=
{
12
}
key=
{
item
.
id
}
>
<
TemplateItem
templateInfo=
{
item
}
type=
"
mall
"
/>
<
TemplateItem
templateInfo=
{
item
}
type=
"
platform
"
/>
</
Col
>
))
}
...
...
src/pages/pageCustomized/settingsPanel/propsSettings/components/PlatformAdvertSetting/index.less
0 → 100644
View file @
cb890863
.advert_setting {
.advert_setting_title {
position: relative;
height: 32px;
line-height: 32px;
}
.advert_setting_line {
margin-bottom: 12px;
display: flex;
background-color: #FFF;
&_main {
position: relative;
flex: 1;
}
&_addItem {
flex: 1;
margin-top: 16px;
&_input {
width: 100%;
}
&_line {
display: flex;
margin-bottom: 16px;
&_label {
width: 80px;
}
&_brief {
flex: 1;
}
}
}
&_sort {
width: 32px;
background-color: #FAFBFC;
height: 32px;
line-height: 32px;
text-align: center;
margin-right: 8px;
}
&_name {
display: flex;
flex: 1;
height: 32px;
align-items: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
background-color: #FAFBFC;
&>.icon {
cursor: pointer;
width: 32px;
height: 32px;
line-height: 32px;
margin-right: 12px;
}
}
&_operation {
margin-left: auto;
background-color: #FAFBFC;
&_btn {
margin-left: 16px;
width: 16px;
&_icon {
width: 16px;
height: 16px;
}
}
}
}
.add_btn {
width: 100%;
border: 1px dashed #DFE1E6;
}
}
src/pages/pageCustomized/settingsPanel/propsSettings/components/PlatformAdvertSetting/index.tsx
0 → 100644
View file @
cb890863
This diff is collapsed.
Click to expand it.
src/pages/pageCustomized/settingsPanel/propsSettings/index.tsx
View file @
cb890863
...
...
@@ -4,6 +4,7 @@ import GoodsSetting from './components/GoodsSetting'
import
BrandSetting
from
'./components/BrandSetting'
import
ShopSetting
from
'./components/ShopSetting'
import
AdvertSetting
from
'./components/AdvertSetting'
import
PlatformAdvertSetting
from
'./components/PlatformAdvertSetting'
import
MallNav
from
'./components/MallNav'
import
CategoryRecommendSetting
from
'./components/CategoryreCommendSetting'
import
{
SelectedInfoType
,
clearSelectedStatus
,
PROPS_TYPES
}
from
'lingxi-editor-core'
;
...
...
@@ -43,6 +44,8 @@ const PropsSettings: React.FC<PropsSettingsPropsType> = (props) => {
return
<
AdvertSetting
templateid=
{
templateId
}
{
...
initProps
}
/>
case
PROPS_TYPES
.
mallNav
:
return
<
MallNav
templateid=
{
templateId
}
{
...
initProps
}
/>
case
PROPS_TYPES
.
platformAdvert
:
return
<
PlatformAdvertSetting
templateid=
{
templateId
}
{
...
initProps
}
/>
}
}
return
null
...
...
src/pages/pageCustomized/templateDetail/index.tsx
View file @
cb890863
...
...
@@ -4,6 +4,7 @@ import { Modal, message } from 'antd'
import
cx
from
'classnames'
import
{
inject
}
from
'mobx-react'
import
UseModal
from
'../components/useModal'
import
{
TEMPLATE_TYPE_TEXT
}
from
'@/constants'
import
DetailPage
from
'@/components/DetailPage'
import
{
PublicApi
}
from
'@/services/api'
import
{
GetTemplateWebPageTemplateWebFindTemplateDetailsResponse
}
from
'@/services/TemplateApi'
...
...
@@ -138,10 +139,14 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
<label>使用站点:</label>
<span>{detailInfo?.siteName}</span>
</div>
{
type !== TEMPLATE_TYPE_TEXT.platform && (
<div className={styles.template_info_line}>
<label>使用商城:</label>
<span>{detailInfo?.shopName}</span>
</div>
)
}
</div>
</div>
<div className={styles.btn} onClick={() => linkToPreview()}>
...
...
@@ -149,15 +154,27 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
<label>预览</label>
</div>
{
type === 'mall'
&& (
(type === TEMPLATE_TYPE_TEXT.mall || type === TEMPLATE_TYPE_TEXT.platform)
&& (
<Fragment>
<div className={cx(styles.btn, styles.renovation)} onClick={() => {
switch (type) {
case TEMPLATE_TYPE_TEXT.mall:
if (detailInfo?.environment === 1) {
window.location.href = `
/
pageCustomized
/
mall
/
template
/
edit
?
id
=
$
{
id
}
&
template
=
$
{
detailInfo
?.
fileName
}
&
environment
=
$
{
detailInfo
?.
environment
}
&
shopId
=
$
{
detailInfo
?.
shopId
}
`
} else {
// message.info(`
暂仅支持
web
环境模板装修
`)
window.location.href = `
/
pageCustomized
/
mobile
/
template
/
edit
?
id
=
$
{
id
}
&
template
=
$
{
detailInfo
?.
fileName
}
&
environment
=
$
{
detailInfo
?.
environment
}
`
}
break
case TEMPLATE_TYPE_TEXT.platform:
if (detailInfo?.environment === 1) {
window.location.href = `
/
pageCustomized
/
platform
/
template
/
edit
?
id
=
$
{
id
}
&
template
=
$
{
detailInfo
?.
fileName
}
&
environment
=
$
{
detailInfo
?.
environment
}
`
} else {
message.info(`
暂仅支持
web
环境模板装修
`)
}
break
default:
break
}
}} >
<LayoutOutlined />
<label>装修</label>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment