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
120b47a0
Commit
120b47a0
authored
Aug 03, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 平台首页装修分类选择问题
parent
403283b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
global.d.ts
src/global/config/global.d.ts
+2
-2
index.tsx
...ngsPanel/propsSettings/components/PlatformGoods/index.tsx
+16
-1
No files found.
src/global/config/global.d.ts
View file @
120b47a0
...
@@ -41,7 +41,7 @@ export interface ShopInfo {
...
@@ -41,7 +41,7 @@ export interface ShopInfo {
describe
:
string
;
describe
:
string
;
state
:
number
;
state
:
number
;
url
:
string
;
url
:
string
;
isDefault
:
number
;
isDefault
?:
any
;
}
}
export
interface
OrderMode
{
export
interface
OrderMode
{
...
@@ -60,7 +60,7 @@ export interface SiteInfo {
...
@@ -60,7 +60,7 @@ export interface SiteInfo {
name
:
string
;
name
:
string
;
logo
:
string
;
logo
:
string
;
siteUrl
:
string
;
siteUrl
:
string
;
symbol
:
string
;
symbol
?:
any
;
}
}
export
interface
Site
{
export
interface
Site
{
...
...
src/pages/pageCustomized/settingsPanel/propsSettings/components/PlatformGoods/index.tsx
View file @
120b47a0
...
@@ -81,10 +81,24 @@ const PlatformGoods: React.FC<PlatformGoodsProps> = (props) => {
...
@@ -81,10 +81,24 @@ const PlatformGoods: React.FC<PlatformGoodsProps> = (props) => {
const
[
selectedRows
,
setSelectedRows
]
=
useState
([]);
const
[
selectedRows
,
setSelectedRows
]
=
useState
([]);
const
[
mallSelectList
,
setMallSelectList
]
=
useState
<
NewSelectItemType
[]
>
([]);
const
[
mallSelectList
,
setMallSelectList
]
=
useState
<
NewSelectItemType
[]
>
([]);
const
[
selectMallInfo
,
setSelectMallInfo
]
=
useState
<
NewSelectItemType
>
();
const
[
selectMallInfo
,
setSelectMallInfo
]
=
useState
<
NewSelectItemType
>
();
const
[
categoryId
,
setCategoryId
]
=
useState
<
number
>
();
const
[
categoryId
,
setCategoryId
]
=
useState
<
string
>
();
const
[
fontColor
,
setFontColor
]
=
useState
<
string
>
();
const
[
fontColor
,
setFontColor
]
=
useState
<
string
>
();
const
ref
=
useRef
<
any
>
({});
const
ref
=
useRef
<
any
>
({});
const
initCategoryId
=
()
=>
{
if
(
dataInfo
)
{
if
(
dataInfo
.
thirdId
)
{
setCategoryId
(
dataInfo
.
thirdId
)
}
else
if
(
dataInfo
.
secondId
)
{
setCategoryId
(
dataInfo
.
secondId
)
}
else
if
(
dataInfo
.
firstId
){
setCategoryId
(
dataInfo
.
firstId
)
}
else
{
setCategoryId
(
undefined
)
}
}
}
const
initMallList
=
(
mallList
:
ShopInfo
[])
=>
{
const
initMallList
=
(
mallList
:
ShopInfo
[])
=>
{
if
(
!
mallList
)
{
if
(
!
mallList
)
{
return
[];
return
[];
...
@@ -134,6 +148,7 @@ const PlatformGoods: React.FC<PlatformGoodsProps> = (props) => {
...
@@ -134,6 +148,7 @@ const PlatformGoods: React.FC<PlatformGoodsProps> = (props) => {
const
enterpriseMallList
=
GlobalConfig
.
web
.
shopInfo
.
filter
((
item
)
=>
item
.
type
===
1
&&
item
.
environment
===
1
);
const
enterpriseMallList
=
GlobalConfig
.
web
.
shopInfo
.
filter
((
item
)
=>
item
.
type
===
1
&&
item
.
environment
===
1
);
setMallSelectList
(
initMallList
(
enterpriseMallList
));
setMallSelectList
(
initMallList
(
enterpriseMallList
));
initColorPicker
();
initColorPicker
();
initCategoryId
()
},
[]);
},
[]);
useEffect
(()
=>
{
useEffect
(()
=>
{
...
...
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