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
shenshaokai
jinfa-admin
Commits
e76fd382
Commit
e76fd382
authored
Jun 17, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 平台首页装修修改
parent
aa9d996a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
7 deletions
+19
-7
utils.ts
src/pages/pageCustomized/platformEdit/utils.ts
+8
-3
index.tsx
...ngsPanel/propsSettings/components/PlatformGoods/index.tsx
+10
-4
ShopItem.tsx
...el/propsSettings/components/PlatformMerchant/ShopItem.tsx
+1
-0
No files found.
src/pages/pageCustomized/platformEdit/utils.ts
View file @
e76fd382
...
...
@@ -16,13 +16,18 @@ 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
webMallList
=
shopInfo
.
filter
((
item
:
any
)
=>
item
.
type
===
1
&&
item
.
environment
===
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
defaultEnterprise
=
webMallList
.
filter
((
item
)
=>
item
.
isDefault
===
1
)
let
enterpriseSubDomain
=
''
if
(
defaultEnterprise
&&
defaultEnterprise
.
length
>
0
)
{
enterpriseSubDomain
=
defaultEnterprise
[
0
].
url
}
else
{
enterpriseSubDomain
=
webMallList
[
0
].
url
}
const
channelSubDomain
=
channelList
[
0
].
url
return
[
{
"id"
:
0
,
...
...
src/pages/pageCustomized/settingsPanel/propsSettings/components/PlatformGoods/index.tsx
View file @
e76fd382
...
...
@@ -29,6 +29,8 @@ interface GoodsItemType {
goodsIdList
:
number
[],
goodsList
?:
any
[],
name
:
string
,
memberId
:
number
,
memberRoleId
:
number
,
secondId
:
string
|
undefined
,
shopId
:
number
|
undefined
,
thirdId
:
string
|
undefined
,
...
...
@@ -229,7 +231,7 @@ const PlatformGoods: React.FC<PlatformGoodsProps> = (props) => {
switch
(
type
)
{
case
'first'
:
for
(
const
item
of
categoryList
)
{
if
(
item
.
id
===
value
)
{
if
(
item
.
id
&&
item
.
id
===
value
)
{
if
(
item
.
children
)
{
changeNewProps
(
'dataInfo'
,
Object
.
assign
(
dataInfo
,
{
firstId
:
item
.
id
,
secondId
:
undefined
,
thirdId
:
undefined
}))
setSecondCategoryList
(
item
.
children
)
...
...
@@ -239,7 +241,7 @@ const PlatformGoods: React.FC<PlatformGoodsProps> = (props) => {
break
case
'second'
:
for
(
const
item
of
secondCategoryList
)
{
if
(
item
.
id
===
value
)
{
if
(
item
.
id
&&
item
.
id
===
value
)
{
if
(
item
.
children
)
{
changeNewProps
(
'dataInfo'
,
Object
.
assign
(
dataInfo
,
{
secondId
:
item
.
id
,
thirdId
:
undefined
}))
setThirdCategoryList
(
item
.
children
)
...
...
@@ -282,13 +284,17 @@ const PlatformGoods: React.FC<PlatformGoodsProps> = (props) => {
const
handleDeleteSelect
=
(
goodItem
:
any
)
=>
{
const
newList
:
any
[]
=
[]
const
ids
:
number
[]
=
[]
dataInfo
.
goodsList
?.
forEach
((
item
)
=>
{
if
(
item
.
id
!==
goodItem
.
i
d
)
{
if
(
item
.
goodsId
!==
goodItem
.
goodsI
d
)
{
newList
.
push
(
item
)
ids
.
push
(
item
.
goodsId
)
}
})
changeNewProps
(
'dataInfo'
,
Object
.
assign
(
dataInfo
,
{
goodsList
:
newList
goodsList
:
newList
,
goodsIdList
:
ids
}))
}
...
...
src/pages/pageCustomized/settingsPanel/propsSettings/components/PlatformMerchant/ShopItem.tsx
View file @
e76fd382
...
...
@@ -12,6 +12,7 @@ export interface MerchantItem {
avgTradeCommentStar
:
number
,
areas
:
string
,
memberId
:
string
,
memberRoleId
:
number
,
memberName
:
string
,
logo
:
string
,
}
...
...
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