Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
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-platform
Commits
121d44d3
Commit
121d44d3
authored
Jun 11, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 店铺和渠道页面修改
parent
bff41537
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
367 additions
and
258 deletions
+367
-258
defaultData.ts
src/pages/editor/channelEdit/defaultData.ts
+80
-155
defaultMenu.ts
src/pages/editor/channelEdit/defaultMenu.ts
+1
-1
index.tsx
src/pages/editor/channelEdit/index.tsx
+117
-34
Album.ts
src/pages/editor/configs/componentConfigs/LingXiUI/Album.ts
+12
-0
ChannelAdvert.ts
...editor/configs/componentConfigs/LingXiUI/ChannelAdvert.ts
+16
-0
ChannelCategory.ts
...itor/configs/componentConfigs/LingXiUI/ChannelCategory.ts
+12
-0
ChannelQuickNav.ts
...itor/configs/componentConfigs/LingXiUI/ChannelQuickNav.ts
+12
-0
CompanyInfo.ts
...s/editor/configs/componentConfigs/LingXiUI/CompanyInfo.ts
+12
-0
HonroPic.ts
...ages/editor/configs/componentConfigs/LingXiUI/HonroPic.ts
+12
-0
ShopAdvert.ts
...es/editor/configs/componentConfigs/LingXiUI/ShopAdvert.ts
+16
-0
index.ts
src/pages/editor/configs/componentConfigs/LingXiUI/index.ts
+15
-0
index.tsx
...ngsPanel/propsSettings/components/AdvertSetting/index.tsx
+4
-2
defaultData.ts
src/pages/editor/shopEdit/defaultData.ts
+23
-38
defaultMenu.ts
src/pages/editor/shopEdit/defaultMenu.ts
+3
-3
index.tsx
src/pages/editor/shopEdit/index.tsx
+15
-11
index.ts
src/pages/editor/utils/index.ts
+4
-4
index.tsx
src/pages/lxMall/commodityDetail/index.tsx
+2
-2
index.tsx
src/pages/lxMall/order/index.tsx
+2
-1
index.tsx
src/pages/lxMall/purchaseOrder/index.tsx
+2
-1
colors.less
src/theme/science/styles/colors.less
+7
-6
No files found.
src/pages/editor/channelEdit/defaultData.ts
View file @
121d44d3
...
...
@@ -10,7 +10,7 @@ export const mallLayoutConfig = {
"background"
:
"#FFF"
}
},
"childNodes"
:
[
"1"
,
"3"
,
"4"
,
"5"
,
"6"
]
"childNodes"
:
[
"1"
,
"3"
,
"4"
,
"5"
]
},
}
...
...
@@ -24,18 +24,6 @@ export const topBarConfig = {
}
}
export
const
topAdvertConfig
=
{
key
:
"2"
,
"2"
:
{
"componentName"
:
"Advert"
,
"props"
:
{
"type"
:
"top"
,
"linkdisable"
:
true
,
"advertList"
:
[]
},
},
}
export
const
headerConfig
=
{
key
:
"3"
,
"3"
:
{
...
...
@@ -52,10 +40,51 @@ export const mainNavConfig = {
},
}
export
const
bannerAdvertConfig
=
{
export
const
horizontalWrap
=
{
key
:
"5"
,
"5"
:
{
"componentName"
:
"Advert"
,
"componentName"
:
"div"
,
"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"
:
"div"
,
"props"
:
{
"style"
:
{
"margin"
:
"0 16px"
,
"flex"
:
1
,
"width"
:
0
,
}
},
"childNodes"
:
[
"8"
,
"9"
]
},
}
export
const
bannerAdvertConfig
=
{
key
:
"8"
,
"8"
:
{
"componentName"
:
"ChannelAdvert"
,
"props"
:
{
"type"
:
"banner"
,
"linkdisable"
:
true
,
...
...
@@ -64,21 +93,34 @@ export const bannerAdvertConfig = {
},
}
export
const
CommonTitle1Config
=
{
key
:
"6"
,
"6"
:
{
"componentName"
:
"CommonTitle"
,
export
const
interactAdvertConfig
=
{
key
:
"9"
,
"9"
:
{
"componentName"
:
"ChannelAdvert"
,
"props"
:
{
"title"
:
"热销商品"
,
"type"
:
"primary"
"type"
:
"interact"
,
"linkdisable"
:
true
,
"advertList"
:
[]
}
},
}
export
const
channelQuickNavConfig
=
{
key
:
"10"
,
"10"
:
{
"componentName"
:
"ChannelQuickNav"
,
"props"
:
{
"linkdisable"
:
true
,
}
},
}
export
const
serviceAdvertConfig
=
{
key
:
"16"
,
"16"
:
{
"componentName"
:
"Advert"
,
"componentName"
:
"
Channel
Advert"
,
"props"
:
{
"type"
:
"service"
,
"linkdisable"
:
true
,
...
...
@@ -99,158 +141,41 @@ export const CommonTitle2Config = {
},
}
export
const
AboutUs
Config
=
{
export
const
CompanyInfo
Config
=
{
key
:
"18"
,
"18"
:
{
"componentName"
:
"
AboutUs
"
,
"componentName"
:
"
CompanyInfo
"
,
"props"
:
{},
},
}
export
const
Information
Config
=
{
key
:
'19'
,
export
const
Album
Config
=
{
key
:
"19"
,
"19"
:
{
"componentName"
:
"
Information
"
,
"componentName"
:
"
Album
"
,
"props"
:
{},
},
}
export
const
Footer
Config
=
{
key
:
'20'
,
export
const
HonroPic
Config
=
{
key
:
"20"
,
"20"
:
{
"componentName"
:
"
Footer
"
,
"componentName"
:
"
HonroPic
"
,
"props"
:
{},
},
}
export
default
{
"0"
:
{
"componentName"
:
"MallLayout"
,
"props"
:
{
"style"
:
{
"width"
:
"100%"
,
"minHeight"
:
"100%"
}
},
"childNodes"
:
[
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"7"
,
"8"
,
"18"
,
"19"
,
"20"
]
},
"1"
:
{
"componentName"
:
"TopBar"
,
"props"
:
{
linkdisable
:
true
},
},
"2"
:
{
"componentName"
:
"Advert"
,
"props"
:
{
"type"
:
"top"
,
"linkdisable"
:
true
,
"advertList"
:
[]
},
},
"3"
:
{
"componentName"
:
"Header"
,
"props"
:
{},
},
"4"
:
{
"componentName"
:
"MainNav"
,
"props"
:
{},
},
"5"
:
{
"componentName"
:
"Advert"
,
"props"
:
{
"type"
:
"banner"
,
"hasQuickNav"
:
true
,
"linkdisable"
:
true
,
"advertList"
:
[]
// "advertList": [
// {
// id: 1,
// templateId: 707,
// type: 2,
// name: '意大利进口荔枝纹牛皮会员价促销最低 9 折',
// picUrl: 'https://img.alicdn.com/imgextra/i4/81/O1CN01VT5ViO1CT8h4sY7qc_!!81-0-luban.jpg_q100.jpg_.webp',
// link: 'https://www.baidu.com',
// sort: 1,
// },
// {
// id: 2,
// templateId: 707,
// type: 2,
// name: '意大利进口荔枝纹牛皮会员价促销最低 9 折',
// picUrl: 'https://img.alicdn.com/tps/i4/TB1ICgYL.H1gK0jSZSySuttlpXa.jpg',
// link: 'https://www.baidu.com',
// sort: 2,
// }
// ]
}
},
"7"
:
{
"componentName"
:
"Advert"
,
"props"
:
{
"type"
:
"interact"
,
"linkdisable"
:
true
,
"advertList"
:
[]
},
},
"8"
:
{
"componentName"
:
"FloorLine"
,
"props"
:
{},
"childNodes"
:
[
"9"
,
"10"
]
},
"9"
:
{
"componentName"
:
"FloorLine.Horizontal"
,
"props"
:
{},
"childNodes"
:
[
"11"
,
"12"
]
},
"10"
:
{
"componentName"
:
"FloorLine.Brand"
,
"props"
:
{},
},
"11"
:
{
"componentName"
:
"FloorLine.Category"
,
"props"
:
{},
},
"12"
:
{
"componentName"
:
"FloorLine.Vertical"
,
"props"
:
{},
"childNodes"
:
[
"13"
,
"15"
]
},
"13"
:
{
"componentName"
:
"FloorLine.FloorHeader"
,
"props"
:
{},
"childNodes"
:
[
"14"
]
},
"14"
:
{
"componentName"
:
"FloorLine.Banner"
,
"props"
:
{
"type"
:
"category"
,
},
},
"15"
:
{
"componentName"
:
"FloorLine.Horizontal"
,
"props"
:
{},
"childNodes"
:
[
"16"
,
"17"
]
},
"16"
:
{
"componentName"
:
"FloorLine.Goods"
,
"props"
:
{},
},
"17"
:
{
"componentName"
:
"FloorLine.Shops"
,
"props"
:
{},
},
"18"
:
{
"componentName"
:
"FindMore"
,
"props"
:
{},
},
"19"
:
{
export
const
InformationConfig
=
{
key
:
'21'
,
"21"
:
{
"componentName"
:
"Information"
,
"props"
:
{},
},
"20"
:
{
}
export
const
FooterConfig
=
{
key
:
'22'
,
"22"
:
{
"componentName"
:
"Footer"
,
"props"
:
{},
},
...
...
src/pages/editor/channelEdit/defaultMenu.ts
View file @
121d44d3
...
...
@@ -16,7 +16,7 @@ export const menuData = [
},
{
"path"
:
"/shop/infomation"
,
"name"
:
"资讯"
,
"name"
:
"
行情
资讯"
,
"key"
:
"shopInfomation"
,
},
{
...
...
src/pages/editor/channelEdit/index.tsx
View file @
121d44d3
...
...
@@ -4,9 +4,10 @@ import ToolBar from '../components/toolBar'
import
DesignPanel
from
'../components/DesignPanel'
import
SettingPanel
from
'../settingsPanel'
import
config
from
'../configs'
import
{
GlobalConfig
}
from
'@/global/config'
import
{
LAYOUT_TYPE
}
from
'@/constants'
import
{
GetTemplateWebMemberChannelWebFindCurrMemberChannelResponse
}
from
'@/services/TemplateApi'
import
{
topBarConfig
,
topAdvertConfig
,
headerConfig
,
mainNavConfig
,
bannerAdvertConfig
,
CommonTitle1Config
,
mallLayoutConfig
,
serviceAdvertConfig
,
CommonTitle2Config
,
AboutUs
Config
,
InformationConfig
,
FooterConfig
}
from
'./defaultData'
import
{
topBarConfig
,
headerConfig
,
mainNavConfig
,
horizontalWrap
,
channelCategoryConfig
,
bannerWrap
,
bannerAdvertConfig
,
interactAdvertConfig
,
channelQuickNavConfig
,
mallLayoutConfig
,
serviceAdvertConfig
,
CommonTitle2Config
,
CompanyInfoConfig
,
AlbumConfig
,
HonroPic
Config
,
InformationConfig
,
FooterConfig
}
from
'./defaultData'
import
Loading
from
'../components/Loading'
import
{
menuData
}
from
'./defaultMenu'
import
{
PublicApi
}
from
'@/services/api'
...
...
@@ -24,6 +25,7 @@ interface ChannelPreviewPropsType {
* 模板名称
*/
template
:
string
;
type
:
number
}
}
}
...
...
@@ -31,7 +33,7 @@ interface ChannelPreviewPropsType {
const
TemplateList
=
[
'science'
]
const
ChannelPreview
:
React
.
FC
<
ChannelPreviewPropsType
>
=
(
props
)
=>
{
const
{
query
:
{
id
,
template
}
}
=
props
.
location
const
{
query
:
{
id
,
template
,
type
}
}
=
props
.
location
const
userInfo
=
getAuth
()
||
{}
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
true
)
const
[
theme
,
setTheme
]
=
useState
<
string
>
(
'theme-channel-science'
)
...
...
@@ -46,11 +48,11 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
getComponentsConfig
()
},
[])
const
find
FirstAdvertsByType
=
(
)
=>
{
const
find
AdvertsByType
=
(
type
:
number
)
=>
{
return
new
Promise
((
resolve
)
=>
{
const
params
:
any
=
{
templateId
:
id
,
type
:
1
,
type
,
memberId
:
userInfo
.
memberId
}
...
...
@@ -162,27 +164,85 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
})
}
const
fetchNewByLabel
=
(
label
:
string
)
=>
{
// 1-头条文章 2-轮播新闻 3-图片新闻 4-推荐阅读
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getManageContentInformationFindAllByRecommendLabel
({
recommendLabel
:
label
}).
then
((
res
:
{
code
:
number
;
data
:
unknown
})
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
else
{
reject
()
}
}).
catch
(()
=>
{
reject
()
})
})
}
const
getChannelInfo
=
()
=>
{
const
shopInfo
=
GlobalConfig
.
web
.
shopInfo
const
webMallList
=
shopInfo
.
filter
((
item
:
{
environment
:
number
;
type
:
number
})
=>
item
.
environment
===
1
&&
item
.
type
===
3
)
return
webMallList
[
0
]
}
const
getIChannelInfo
=
()
=>
{
const
shopInfo
=
GlobalConfig
.
web
.
shopInfo
const
webMallList
=
shopInfo
.
filter
((
item
:
{
environment
:
number
;
type
:
number
})
=>
item
.
environment
===
1
&&
item
.
type
===
4
)
return
webMallList
[
0
]
}
const
initCategoryData
=
(
list
:
any
,
parentKey
?:
string
,
parentName
?:
string
)
=>
{
if
(
!
list
)
{
return
[]
}
const
result
:
any
=
list
.
map
((
item
:
any
)
=>
{
let
cid
=
`c
${
item
.
id
}
`
let
treeName
=
item
.
title
if
(
parentKey
)
{
cid
=
`
${
parentKey
}
_
${
cid
}
`
treeName
=
`
${
parentName
}
${
treeName
}
`
}
const
newItem
:
any
=
{
title
:
item
.
title
,
name
:
item
.
title
,
treeName
:
treeName
,
key
:
cid
,
id
:
item
.
id
,
brandList
:
item
.
brandList
}
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
newItem
.
children
=
initCategoryData
(
item
.
children
,
cid
,
treeName
)
}
return
newItem
})
return
result
}
/**
* 获取
全部栏目
* 获取
商品品类树
*/
const
fetchAllColumn
=
()
=>
{
const
getCategoryTree
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
PublicApi
.
getManageContentColumnAll
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
let
result
=
""
const
allColumn
=
res
.
data
if
(
allColumn
&&
allColumn
.
length
>
0
)
{
let
labelList
=
allColumn
.
map
((
item
:
any
)
=>
item
.
name
)
const
showCount
=
4
if
(
labelList
.
length
<=
showCount
)
{
result
=
labelList
.
join
(
' | '
)
}
else
{
labelList
=
labelList
.
slice
(
0
,
showCount
)
result
=
labelList
.
join
(
' | '
)
+
" ..."
const
headers
:
any
=
{}
const
param
:
any
=
{
channelMemberId
:
userInfo
.
memberId
}
switch
(
Number
(
type
))
{
case
3
:
headers
.
type
=
3
break
case
4
:
headers
.
type
=
4
break
default
:
break
}
resolve
(
result
)
PublicApi
.
getSearchShopChannelGetCustomerCategoryTree
(
param
,
{
headers
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
initCategoryData
(
res
.
data
))
}
})
})
...
...
@@ -192,24 +252,42 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
// 导航栏
mainNavConfig
[
mainNavConfig
.
key
].
props
.
menuData
=
menuData
mainNavConfig
[
mainNavConfig
.
key
].
props
.
type
=
LAYOUT_TYPE
.
channel
mainNavConfig
[
mainNavConfig
.
key
].
props
.
categoryList
=
[]
//
mainNavConfig[mainNavConfig.key].props.categoryList = []
// 一号位广告
bannerAdvertConfig
[
bannerAdvertConfig
.
key
].
props
.
advertList
=
await
findFirstAdvertsByType
()
bannerAdvertConfig
[
bannerAdvertConfig
.
key
].
props
.
advertList
=
await
findAdvertsByType
(
1
)
// 二号位广告
serviceAdvertConfig
[
serviceAdvertConfig
.
key
].
props
.
advertList
=
await
findSecondAdvertsByType
()
interactAdvertConfig
[
interactAdvertConfig
.
key
].
props
.
advertList
=
await
findAdvertsByType
(
2
)
// 三号位广告
serviceAdvertConfig
[
serviceAdvertConfig
.
key
].
props
.
advertList
=
await
findAdvertsByType
(
3
)
//店铺信息
const
channelInfo
:
any
=
await
fetchShopInfo
()
AboutUsConfig
[
AboutUsConfig
.
key
].
props
.
shopInfo
=
channelInfo
headerConfig
[
headerConfig
.
key
].
props
.
logoUrl
=
channelInfo
.
logo
||
""
topBarConfig
[
topBarConfig
.
key
].
props
.
shopname
=
channelInfo
.
company
||
""
CompanyInfoConfig
[
CompanyInfoConfig
.
key
].
props
.
shopInfo
=
channelInfo
||
{}
channelQuickNavConfig
[
channelQuickNavConfig
.
key
].
props
.
channelInfo
=
channelInfo
AlbumConfig
[
AlbumConfig
.
key
].
props
.
workshopPics
=
channelInfo
.
workshopPics
||
[]
HonroPicConfig
[
HonroPicConfig
.
key
].
props
.
honorPics
=
channelInfo
.
honorPics
||
[]
channelCategoryConfig
[
channelCategoryConfig
.
key
].
props
.
categoryList
=
await
getCategoryTree
()
let
globalChannelInfo
:
any
=
{}
switch
(
Number
(
type
))
{
case
3
:
globalChannelInfo
=
getChannelInfo
()
break
case
4
:
globalChannelInfo
=
getIChannelInfo
()
break
default
:
globalChannelInfo
=
getChannelInfo
()
break
}
headerConfig
[
headerConfig
.
key
].
props
.
logo
=
globalChannelInfo
.
logoUrl
||
''
headerConfig
[
headerConfig
.
key
].
props
.
channelInfo
=
channelInfo
topBarConfig
[
topBarConfig
.
key
].
props
.
shopname
=
globalChannelInfo
.
name
||
""
// 行情资讯
InformationConfig
[
InformationConfig
.
key
].
props
.
newsList
=
await
fetchLeadNews
()
InformationConfig
[
InformationConfig
.
key
].
props
.
allColumn
=
await
fetchAllColumn
()
InformationConfig
[
InformationConfig
.
key
].
props
.
newsList
=
await
fetchNewByLabel
(
'4'
)
let
initIndex
=
100
let
floorLineConfig
:
any
=
{}
...
...
@@ -264,20 +342,25 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
}
mallLayoutConfig
[
"0"
].
childNodes
=
[...
mallLayoutConfig
[
"0"
].
childNodes
,
...
floorLineKeys
,
serviceAdvertConfig
.
key
,
CommonTitle2Config
.
key
,
AboutUs
Config
.
key
,
InformationConfig
.
key
,
FooterConfig
.
key
]
mallLayoutConfig
[
"0"
].
childNodes
=
[...
mallLayoutConfig
[
"0"
].
childNodes
,
...
floorLineKeys
,
serviceAdvertConfig
.
key
,
CommonTitle2Config
.
key
,
CompanyInfoConfig
.
key
,
AlbumConfig
.
key
,
HonroPic
Config
.
key
,
InformationConfig
.
key
,
FooterConfig
.
key
]
const
config
=
{
...
mallLayoutConfig
,
...
topBarConfig
,
...
topAdvertConfig
,
...
headerConfig
,
...
mainNavConfig
,
...
horizontalWrap
,
...
channelCategoryConfig
,
...
bannerWrap
,
...
bannerAdvertConfig
,
...
CommonTitle1Config
,
...
interactAdvertConfig
,
...
channelQuickNavConfig
,
...
floorLineConfig
,
...
serviceAdvertConfig
,
...
CommonTitle2Config
,
...
AboutUsConfig
,
...
CompanyInfoConfig
,
...
AlbumConfig
,
...
HonroPicConfig
,
...
InformationConfig
,
...
FooterConfig
}
...
...
src/pages/editor/configs/componentConfigs/LingXiUI/Album.ts
0 → 100644
View file @
121d44d3
import
{
ComponentConfigTypes
,
PROPS_TYPES
}
from
'lingxi-editor-core'
;
const
Album
:
ComponentConfigTypes
=
{
propsConfig
:
{
children
:
{
label
:
'文本内容'
,
type
:
PROPS_TYPES
.
string
,
},
},
};
export
default
Album
;
src/pages/editor/configs/componentConfigs/LingXiUI/ChannelAdvert.ts
0 → 100644
View file @
121d44d3
import
{
ComponentConfigTypes
,
PROPS_TYPES
}
from
'lingxi-editor-core'
;
const
ChannelAdvert
:
ComponentConfigTypes
=
{
propsConfig
:
{
componentType
:
{
label
:
'广告编辑'
,
type
:
PROPS_TYPES
.
advert
},
sliderList
:
{
label
:
'广告编辑'
,
type
:
PROPS_TYPES
.
carousel
,
},
},
};
export
default
ChannelAdvert
;
src/pages/editor/configs/componentConfigs/LingXiUI/ChannelCategory.ts
0 → 100644
View file @
121d44d3
import
{
ComponentConfigTypes
,
PROPS_TYPES
}
from
'lingxi-editor-core'
;
const
ChannelCategory
:
ComponentConfigTypes
=
{
propsConfig
:
{
children
:
{
label
:
'文本内容'
,
type
:
PROPS_TYPES
.
string
,
},
},
};
export
default
ChannelCategory
;
src/pages/editor/configs/componentConfigs/LingXiUI/ChannelQuickNav.ts
0 → 100644
View file @
121d44d3
import
{
ComponentConfigTypes
,
PROPS_TYPES
}
from
'lingxi-editor-core'
;
const
ChannelQuickNav
:
ComponentConfigTypes
=
{
propsConfig
:
{
children
:
{
label
:
'文本内容'
,
type
:
PROPS_TYPES
.
string
,
},
},
};
export
default
ChannelQuickNav
;
src/pages/editor/configs/componentConfigs/LingXiUI/CompanyInfo.ts
0 → 100644
View file @
121d44d3
import
{
ComponentConfigTypes
,
PROPS_TYPES
}
from
'lingxi-editor-core'
;
const
CompanyInfo
:
ComponentConfigTypes
=
{
propsConfig
:
{
children
:
{
label
:
'文本内容'
,
type
:
PROPS_TYPES
.
string
,
},
},
};
export
default
CompanyInfo
;
src/pages/editor/configs/componentConfigs/LingXiUI/HonroPic.ts
0 → 100644
View file @
121d44d3
import
{
ComponentConfigTypes
,
PROPS_TYPES
}
from
'lingxi-editor-core'
;
const
HonroPic
:
ComponentConfigTypes
=
{
propsConfig
:
{
children
:
{
label
:
'文本内容'
,
type
:
PROPS_TYPES
.
string
,
},
},
};
export
default
HonroPic
;
src/pages/editor/configs/componentConfigs/LingXiUI/ShopAdvert.ts
0 → 100644
View file @
121d44d3
import
{
ComponentConfigTypes
,
PROPS_TYPES
}
from
'lingxi-editor-core'
;
const
ShopAdvert
:
ComponentConfigTypes
=
{
propsConfig
:
{
componentType
:
{
label
:
'广告编辑'
,
type
:
PROPS_TYPES
.
advert
},
sliderList
:
{
label
:
'广告编辑'
,
type
:
PROPS_TYPES
.
carousel
,
},
},
};
export
default
ShopAdvert
;
src/pages/editor/configs/componentConfigs/LingXiUI/index.ts
View file @
121d44d3
...
...
@@ -14,6 +14,8 @@ import ShowCase from './ShowCase'
import
MallLayout
from
'./MallLayout'
import
MainNav
from
'./MainNav'
import
Advert
from
'./Advert'
import
ChannelAdvert
from
'./ChannelAdvert'
import
ShopAdvert
from
'./ShopAdvert'
import
QuickNav
from
'./QuickNav'
import
FloorLine
from
'./FloorLine'
import
ShopFloorLine
from
'./ShopFloorLine'
...
...
@@ -24,6 +26,12 @@ import ShopHeader from './ShopHeader'
import
FindMore
from
'./FindMore'
import
Information
from
'./Information'
import
Footer
from
'./Footer'
import
CompanyInfo
from
'./CompanyInfo'
import
Album
from
'./Album'
import
HonroPic
from
'./HonroPic'
import
ChannelQuickNav
from
'./ChannelQuickNav'
import
ChannelCategory
from
'./ChannelCategory'
import
MobileBanner
from
'./MobileBanner'
import
MobileChannelBanner
from
'./MobileChannelBanner'
import
MobileQuickNav
from
'./MobileQuickNav'
...
...
@@ -43,9 +51,16 @@ export default {
MallLayout
,
MainNav
,
Advert
,
ChannelAdvert
,
ShopAdvert
,
QuickNav
,
FindMore
,
Information
,
CompanyInfo
,
Album
,
HonroPic
,
ChannelQuickNav
,
ChannelCategory
,
Footer
,
AboutUs
,
CommonTitle
,
...
...
src/pages/editor/settingsPanel/propsSettings/components/AdvertSetting/index.tsx
View file @
121d44d3
...
...
@@ -56,7 +56,7 @@ interface AdvertItemType {
interface
AdvertSettingPropsType
{
advertList
:
AdvertItemType
[];
onChange
:
Function
;
type
:
'top'
|
'banner'
|
'interact'
|
'category'
;
type
:
'top'
|
'banner'
|
'interact'
|
'category'
|
'service'
;
templateid
:
number
;
categoryid
?:
number
;
templateType
:
'channel'
|
'shop'
...
...
@@ -78,6 +78,8 @@ const AdvertSetting: React.FC<AdvertSettingPropsType> = forwardRef((props, ref)
return
"285*120"
case
'category'
:
return
"500*90"
case
'service'
:
return
"580*90"
}
}
...
...
@@ -262,7 +264,7 @@ const AdvertSetting: React.FC<AdvertSettingPropsType> = forwardRef((props, ref)
postFn
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
()
resolve
(
true
)
}
else
{
message
.
error
(
res
.
message
)
reject
()
...
...
src/pages/editor/shopEdit/defaultData.ts
View file @
121d44d3
...
...
@@ -10,7 +10,7 @@ export const mallLayoutConfig = {
"background"
:
"#FFF"
}
},
"childNodes"
:
[
"1"
,
"3"
,
"4"
,
"5"
,
"17"
,
"18"
,
"6"
]
"childNodes"
:
[
"1"
,
"3"
,
"4"
,
"5"
]
},
}
...
...
@@ -27,7 +27,7 @@ export const topBarConfig = {
export
const
topAdvertConfig
=
{
key
:
"2"
,
"2"
:
{
"componentName"
:
"Advert"
,
"componentName"
:
"
Shop
Advert"
,
"props"
:
{
"type"
:
"top"
,
"linkdisable"
:
true
,
...
...
@@ -51,14 +51,15 @@ export const mainNavConfig = {
key
:
"4"
,
"4"
:
{
"componentName"
:
"MainNav"
,
"props"
:
{},
"props"
:
{
},
},
}
export
const
bannerAdvertConfig
=
{
key
:
"5"
,
"5"
:
{
"componentName"
:
"Advert"
,
"componentName"
:
"
Shop
Advert"
,
"props"
:
{
"type"
:
"banner"
,
"linkdisable"
:
true
,
...
...
@@ -67,21 +68,10 @@ export const bannerAdvertConfig = {
},
}
export
const
CommonTitle1Config
=
{
key
:
"6"
,
"6"
:
{
"componentName"
:
"CommonTitle"
,
"props"
:
{
"title"
:
"热销商品"
,
"type"
:
"primary"
},
},
}
export
const
serviceAdvertConfig
=
{
key
:
"16"
,
"16"
:
{
"componentName"
:
"Advert"
,
"componentName"
:
"
Shop
Advert"
,
"props"
:
{
"type"
:
"service"
,
"linkdisable"
:
true
,
...
...
@@ -90,39 +80,34 @@ export const serviceAdvertConfig = {
},
}
export
const
CommonTitle2Config
=
{
key
:
"17"
,
"17"
:
{
"componentName"
:
"CommonTitle"
,
"props"
:
{
"title"
:
"关于我们"
,
"type"
:
"primary"
},
},
}
export
const
AboutUsConfig
=
{
export
const
CompanyInfoConfig
=
{
key
:
"18"
,
"18"
:
{
"componentName"
:
"AboutUs"
,
"props"
:
{
"shopInfo"
:
{}
},
"componentName"
:
"CompanyInfo"
,
"props"
:
{},
},
}
export
const
Information
Config
=
{
key
:
'19'
,
export
const
Album
Config
=
{
key
:
"19"
,
"19"
:
{
"componentName"
:
"
Information
"
,
"componentName"
:
"
Album
"
,
"props"
:
{},
},
}
export
const
Footer
Config
=
{
key
:
'20'
,
export
const
HonroPic
Config
=
{
key
:
"20"
,
"20"
:
{
"componentName"
:
"HonroPic"
,
"props"
:
{},
},
}
export
const
FooterConfig
=
{
key
:
'21'
,
"21"
:
{
"componentName"
:
"Footer"
,
"props"
:
{},
},
...
...
src/pages/editor/shopEdit/defaultMenu.ts
View file @
121d44d3
...
...
@@ -6,17 +6,17 @@ export const menuData = [
},
{
"path"
:
"/shop/commodity"
,
"name"
:
"商品"
,
"name"
:
"
现货
商品"
,
"key"
:
"shopCommodity"
,
},
{
"path"
:
"/shop/pointsMall"
,
"name"
:
"
积分兑换
"
,
"name"
:
"
询价商品
"
,
"key"
:
"shopPointsMall"
,
},
{
"path"
:
"/shop/infomation"
,
"name"
:
"
资讯
"
,
"name"
:
"
积分兑换
"
,
"key"
:
"shopInfomation"
,
},
{
...
...
src/pages/editor/shopEdit/index.tsx
View file @
121d44d3
...
...
@@ -5,7 +5,7 @@ import DesignPanel from '../components/DesignPanel'
import
SettingPanel
from
'../settingsPanel'
import
config
from
'../configs'
import
{
LAYOUT_TYPE
}
from
'@/constants'
import
{
topBarConfig
,
topAdvertConfig
,
headerConfig
,
mainNavConfig
,
bannerAdvertConfig
,
CommonTitle1Config
,
mallLayoutConfig
,
serviceAdvertConfig
,
CommonTitle2Config
,
AboutUsConfig
,
InformationConfig
,
FooterConfig
}
from
'./defaultData'
import
{
topBarConfig
,
topAdvertConfig
,
headerConfig
,
mainNavConfig
,
bannerAdvertConfig
,
mallLayoutConfig
,
serviceAdvertConfig
,
CompanyInfoConfig
,
AlbumConfig
,
HonroPicConfig
,
FooterConfig
}
from
'./defaultData'
import
{
menuData
}
from
'./defaultMenu'
import
Loading
from
'../components/Loading'
import
{
PublicApi
}
from
'@/services/api'
...
...
@@ -124,13 +124,14 @@ const ShopEdit: React.FC<ShopEditPropsType> = (props) => {
/**
* 获取店铺信息
*/
const
fetchShopInfo
=
()
=>
{
const
fetchShopInfo
=
(
shopId
:
number
)
=>
{
return
new
Promise
((
resolve
)
=>
{
const
param
:
any
=
{
memberId
,
roleId
:
memberRoleId
roleId
:
memberRoleId
,
shopId
,
}
PublicApi
.
getTemplateWebMemberShopWeb
FindByMemberIdAndRoleId
(
param
).
then
(
res
=>
{
PublicApi
.
getTemplateWebMemberShopWeb
MemberShopMain
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
...
...
@@ -151,14 +152,17 @@ const ShopEdit: React.FC<ShopEditPropsType> = (props) => {
// 二号位广告
serviceAdvertConfig
[
serviceAdvertConfig
.
key
].
props
.
advertList
=
await
findSecondAdvertsByType
()
//店铺信息
const
shopInfo
=
await
fetchShopInfo
()
headerConfig
[
headerConfig
.
key
].
props
.
shopInfo
=
shopInfo
const
shopList
=
GlobalConfig
.
web
.
shopInfo
const
webMallInfo
=
shopList
.
filter
(
item
=>
item
.
environment
===
1
&&
item
.
type
===
1
)[
0
]
const
shopInfo
:
any
=
await
fetchShopInfo
(
webMallInfo
.
id
)
headerConfig
[
headerConfig
.
key
].
props
.
shopInfo
=
shopInfo
headerConfig
[
headerConfig
.
key
].
props
.
logoUrl
=
webMallInfo
.
logoUrl
topBarConfig
[
topBarConfig
.
key
].
props
.
shopname
=
webMallInfo
.
name
AboutUsConfig
[
AboutUsConfig
.
key
].
props
.
shopInfo
=
shopInfo
CompanyInfoConfig
[
CompanyInfoConfig
.
key
].
props
.
shopInfo
=
shopInfo
||
{}
AlbumConfig
[
AlbumConfig
.
key
].
props
.
workshopPics
=
shopInfo
.
workshopPics
||
[]
HonroPicConfig
[
HonroPicConfig
.
key
].
props
.
honorPics
=
shopInfo
.
honorPics
||
[]
// AboutUsConfig[AboutUsConfig.key].props.shopInfo = shopInfo
let
initIndex
=
100
let
floorLineConfig
:
any
=
{}
const
floorLineKeys
:
any
=
[]
...
...
@@ -211,7 +215,7 @@ const ShopEdit: React.FC<ShopEditPropsType> = (props) => {
}
mallLayoutConfig
[
"0"
].
childNodes
=
[...
mallLayoutConfig
[
"0"
].
childNodes
,
...
floorLineKeys
,
serviceAdvertConfig
.
key
,
FooterConfig
.
key
]
mallLayoutConfig
[
"0"
].
childNodes
=
[...
mallLayoutConfig
[
"0"
].
childNodes
,
...
floorLineKeys
,
serviceAdvertConfig
.
key
,
CompanyInfoConfig
.
key
,
AlbumConfig
.
key
,
HonroPicConfig
.
key
,
FooterConfig
.
key
]
const
config
=
{
...
mallLayoutConfig
,
...
topBarConfig
,
...
...
@@ -219,11 +223,11 @@ const ShopEdit: React.FC<ShopEditPropsType> = (props) => {
...
headerConfig
,
...
mainNavConfig
,
...
bannerAdvertConfig
,
...
CommonTitle2Config
,
...
AboutUsConfig
,
...
CommonTitle1Config
,
...
floorLineConfig
,
...
serviceAdvertConfig
,
...
CompanyInfoConfig
,
...
AlbumConfig
,
...
HonroPicConfig
,
...
FooterConfig
}
setComponentConfigs
(
config
)
...
...
src/pages/editor/utils/index.ts
View file @
121d44d3
...
...
@@ -28,8 +28,8 @@ export const formatSpecialProps = (props: any, propsConfig: any) => {
if
(
funcTemplate
)
{
nextProps
[
k
]
=
()
=>
eval
(
funcTemplate
);
}
else
{
nextProps
[
k
]
=
()
=>
{
};
//
nextProps[k] = () => {
//
};
}
}
}
else
if
(
isObject
(
v
)
&&
!
isEmpty
(
propsConfig
[
k
].
childPropsConfig
)
&&
isEqual
(
keys
(
v
),
keys
(
propsConfig
[
k
].
childPropsConfig
)))
{
...
...
@@ -134,7 +134,6 @@ export const diffProps = (restProps: any, props: any) => {
});
return
props
;
};
...
...
@@ -153,9 +152,10 @@ export const getAdvertType = (type) => {
switch
(
type
)
{
case
'banner'
:
return
1
case
'service'
:
case
'interact'
:
return
2
case
'service'
:
return
3
}
}
...
...
src/pages/lxMall/commodityDetail/index.tsx
View file @
121d44d3
...
...
@@ -23,8 +23,8 @@ import { GlobalConfig } from '@/global/config'
import
ErrorResult
from
'./error'
import
{
isEmpty
}
from
'lodash'
import
useStoreId
from
'@/hooks/useStoreId'
import
{
LAYOUT_TYPE
,
COMMODITY_TYPE
,
OrderModalType
}
from
'@/constants'
import
{
OrderModalType
}
from
'@/constants/order'
import
{
LAYOUT_TYPE
,
COMMODITY_TYPE
}
from
'@/constants'
const
Logistics_Type
=
{
1
:
'物流'
,
...
...
src/pages/lxMall/order/index.tsx
View file @
121d44d3
...
...
@@ -16,7 +16,8 @@ import SignModal from '@/components/SignModal'
import
{
isEmpty
}
from
'lodash'
import
{
GlobalConfig
}
from
'@/global/config'
import
{
getAuth
}
from
'@/utils/auth'
import
{
LAYOUT_TYPE
,
OrderModalType
,
COMMODITY_TYPE
}
from
'@/constants'
import
{
OrderModalType
}
from
'@/constants/order'
import
{
LAYOUT_TYPE
,
COMMODITY_TYPE
}
from
'@/constants'
import
useStoreId
from
'@/hooks/useStoreId'
interface
OrderPropsType
{
...
...
src/pages/lxMall/purchaseOrder/index.tsx
View file @
121d44d3
...
...
@@ -11,7 +11,8 @@ import { priceFormat, numFormat } from "@/utils/numberFomat"
import
{
useLocalStore
,
observer
}
from
'mobx-react'
import
ImageBox
from
'@/components/ImageBox'
import
{
store
}
from
'@/store'
import
{
LAYOUT_TYPE
,
OrderModalType
}
from
'@/constants'
import
{
LAYOUT_TYPE
}
from
'@/constants'
import
{
OrderModalType
}
from
'@/constants/order'
import
{
GetSearchShopPurchaseGetPurchaseListResponse
}
from
'@/services/SearchApi'
import
{
GetTemplateWebMemberChannelWebMemberChannelMainResponse
}
from
'@/services/TemplateApi'
import
{
isEmpty
}
from
'lodash'
...
...
src/theme/science/styles/colors.less
View file @
121d44d3
...
...
@@ -16,13 +16,14 @@
// 渠道科技类模板
.theme-channel-science {
font-size: 14px;
--mall_main_color: #464552;
--mall_sub_color: #00B37F;
--mall_main_color: #00B37A;
--mall_main_color_opacity_2: #daf2e7;
--mall_sub_color: #daf2e7;
--mall_main_nav_hover_color: #00B37A;
--category_content_bg: #
464552
;
--category_content_title_text: #
FFFFFF
;
--category_content_title_text_hover: #
FFFFFF
;
--category_content_sub_title_text:
rgba(255, 255, 255, 0.45)
;
--category_content_bg: #
FFFFFF
;
--category_content_title_text: #
303133
;
--category_content_title_text_hover: #
00B37A
;
--category_content_sub_title_text:
#606266
;
}
// 店铺科技类模板颜色配置
...
...
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