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
project
jinfa-admin
Commits
f2c60d7f
Commit
f2c60d7f
authored
Aug 17, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 平台首页装修品类接口缺少商城id问题
parent
d862a107
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
1 deletion
+24
-1
index.tsx
src/pages/pageCustomized/preview/platformPreview/index.tsx
+24
-1
No files found.
src/pages/pageCustomized/preview/platformPreview/index.tsx
View file @
f2c60d7f
...
...
@@ -57,6 +57,24 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
getPlatformConfig
();
},
[]);
const
getDefaultEnterprise
=
()
=>
{
const
shopInfo
=
GlobalConfig
.
web
.
shopInfo
;
const
webMallList
=
shopInfo
.
filter
(
(
item
:
{
environment
:
number
;
type
:
number
})
=>
item
.
environment
===
1
&&
item
.
type
===
1
,
);
const
defaultMall
=
webMallList
.
filter
(
item
=>
item
.
isDefault
===
1
)[
0
];
let
result
:
any
=
undefined
;
if
(
defaultMall
)
{
result
=
defaultMall
;
}
else
{
if
(
webMallList
&&
webMallList
.
length
>
0
)
{
result
=
webMallList
[
0
];
}
}
return
result
;
};
/**
* 获取平台首页装修信息
*/
...
...
@@ -88,10 +106,15 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
*/
const
getCategoryTree
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
const
defaultMallInfo
=
getDefaultEnterprise
()
const
param
:
any
=
{
templateId
:
id
};
PublicApi
.
getTemplateWebCategoryWebFindEnterpriseCategoryTree
(
param
).
then
(
res
=>
{
const
headers
:
any
=
{
shopId
:
defaultMallInfo
.
id
};
PublicApi
.
getTemplateWebCategoryWebFindEnterpriseCategoryTree
(
param
,
{
headers
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
);
}
else
{
...
...
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