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
8ceb2997
Commit
8ceb2997
authored
Jul 23, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 平台首页装修品牌选择问题
parent
933da47a
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
6 deletions
+24
-6
global.d.ts
src/global/config/global.d.ts
+2
-2
index.tsx
src/pages/pageCustomized/mallEdit/index.tsx
+4
-1
index.tsx
src/pages/pageCustomized/preview/mallPreview/index.tsx
+4
-1
BrandItem.tsx
...anel/propsSettings/components/PlatformBrand/BrandItem.tsx
+1
-0
index.tsx
...ngsPanel/propsSettings/components/PlatformBrand/index.tsx
+13
-2
No files found.
src/global/config/global.d.ts
View file @
8ceb2997
...
@@ -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/mallEdit/index.tsx
View file @
8ceb2997
...
@@ -70,7 +70,10 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
...
@@ -70,7 +70,10 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
*/
*/
const
fetchFirstCategory
=
()
=>
{
const
fetchFirstCategory
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
return
new
Promise
((
resolve
)
=>
{
PublicApi
.
getTemplateWebCategoryWebFindAllFirstCategory
().
then
(
res
=>
{
const
headers
:
any
=
{
shopId
}
PublicApi
.
getTemplateWebCategoryWebFindAllFirstCategory
({},
{
headers
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
);
resolve
(
res
.
data
);
}
else
{
}
else
{
...
...
src/pages/pageCustomized/preview/mallPreview/index.tsx
View file @
8ceb2997
...
@@ -69,7 +69,10 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
...
@@ -69,7 +69,10 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
*/
*/
const
fetchFirstCategory
=
()
=>
{
const
fetchFirstCategory
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
return
new
Promise
((
resolve
)
=>
{
PublicApi
.
getTemplateWebCategoryWebFindAllFirstCategory
().
then
(
res
=>
{
const
headers
:
any
=
{
shopId
}
PublicApi
.
getTemplateWebCategoryWebFindAllFirstCategory
({},
{
headers
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
);
resolve
(
res
.
data
);
}
else
{
}
else
{
...
...
src/pages/pageCustomized/settingsPanel/propsSettings/components/PlatformBrand/BrandItem.tsx
View file @
8ceb2997
...
@@ -9,6 +9,7 @@ export interface BrandItemType {
...
@@ -9,6 +9,7 @@ export interface BrandItemType {
brandLogo
:
string
,
brandLogo
:
string
,
brandName
:
string
,
brandName
:
string
,
describe
:
string
,
describe
:
string
,
shopId
:
number
,
}
}
interface
BrandItemPropsType
{
interface
BrandItemPropsType
{
...
...
src/pages/pageCustomized/settingsPanel/propsSettings/components/PlatformBrand/index.tsx
View file @
8ceb2997
...
@@ -22,6 +22,7 @@ interface NewSelectItemType {
...
@@ -22,6 +22,7 @@ interface NewSelectItemType {
label
:
string
,
label
:
string
,
}
}
const
PlatformBrand
:
React
.
FC
<
PlatformGoodsProps
>
=
(
props
)
=>
{
const
PlatformBrand
:
React
.
FC
<
PlatformGoodsProps
>
=
(
props
)
=>
{
const
{
templateId
}
=
props
;
const
{
templateId
}
=
props
;
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
<
boolean
>
(
false
);
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
<
boolean
>
(
false
);
...
@@ -31,6 +32,7 @@ const PlatformBrand: React.FC<PlatformGoodsProps> = (props) => {
...
@@ -31,6 +32,7 @@ const PlatformBrand: React.FC<PlatformGoodsProps> = (props) => {
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
number
[]
>
([]);
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
number
[]
>
([]);
const
[
selectedRows
,
setSelectedRows
]
=
useState
<
BrandItemType
[]
>
([]);
const
[
selectedRows
,
setSelectedRows
]
=
useState
<
BrandItemType
[]
>
([]);
const
[
mallSelectList
,
setMallSelectList
]
=
useState
<
NewSelectItemType
[]
>
([]);
const
[
mallSelectList
,
setMallSelectList
]
=
useState
<
NewSelectItemType
[]
>
([]);
const
[
shopId
,
setShopId
]
=
useState
<
number
>
()
const
ref
=
useRef
<
any
>
({});
const
ref
=
useRef
<
any
>
({});
const
initMallList
=
(
mallList
:
any
[])
=>
{
const
initMallList
=
(
mallList
:
any
[])
=>
{
...
@@ -45,6 +47,11 @@ const PlatformBrand: React.FC<PlatformGoodsProps> = (props) => {
...
@@ -45,6 +47,11 @@ const PlatformBrand: React.FC<PlatformGoodsProps> = (props) => {
};
};
newList
.
push
(
tempItem
);
newList
.
push
(
tempItem
);
}
}
if
(
newList
&&
newList
.
length
>
0
)
{
setShopId
(
newList
[
0
].
value
)
}
return
newList
;
return
newList
;
};
};
...
@@ -113,6 +120,9 @@ const PlatformBrand: React.FC<PlatformGoodsProps> = (props) => {
...
@@ -113,6 +120,9 @@ const PlatformBrand: React.FC<PlatformGoodsProps> = (props) => {
params
.
templateId
=
templateId
;
params
.
templateId
=
templateId
;
const
idList
=
dataList
.
map
((
item
)
=>
item
.
brandId
);
const
idList
=
dataList
.
map
((
item
)
=>
item
.
brandId
);
params
.
brandIdList
=
idList
||
[];
params
.
brandIdList
=
idList
||
[];
if
(
params
.
shopId
)
{
setShopId
(
params
.
shopId
)
}
PublicApi
.
getTemplateAdornWebPlatformFindBrandList
(
params
).
then
(
res
=>
{
PublicApi
.
getTemplateAdornWebPlatformFindBrandList
(
params
).
then
(
res
=>
{
const
{
data
}
=
res
;
const
{
data
}
=
res
;
resolve
(
data
);
resolve
(
data
);
...
@@ -149,7 +159,8 @@ const PlatformBrand: React.FC<PlatformGoodsProps> = (props) => {
...
@@ -149,7 +159,8 @@ const PlatformBrand: React.FC<PlatformGoodsProps> = (props) => {
brandId
:
item
.
brandId
,
brandId
:
item
.
brandId
,
brandName
:
item
.
brandName
,
brandName
:
item
.
brandName
,
describe
:
''
,
describe
:
''
,
brandLogo
:
item
.
brandLogo
brandLogo
:
item
.
brandLogo
,
shopId
:
shopId
||
1
});
});
}
}
changeNewProps
(
'dataList'
,
[...
dataList
,
...
newList
]);
changeNewProps
(
'dataList'
,
[...
dataList
,
...
newList
]);
...
@@ -255,7 +266,7 @@ const PlatformBrand: React.FC<PlatformGoodsProps> = (props) => {
...
@@ -255,7 +266,7 @@ const PlatformBrand: React.FC<PlatformGoodsProps> = (props) => {
properties
:
{
properties
:
{
shopId
:
{
shopId
:
{
type
:
'string'
,
type
:
'string'
,
default
Value
:
(
mallSelectList
&&
mallSelectList
.
length
>
0
)
?
mallSelectList
[
0
].
value
:
undefined
,
default
:
(
mallSelectList
&&
mallSelectList
.
length
>
0
)
?
mallSelectList
[
0
].
value
:
undefined
,
enum
:
mallSelectList
,
enum
:
mallSelectList
,
'x-component-props'
:
{
'x-component-props'
:
{
placeholder
:
'商城'
,
placeholder
:
'商城'
,
...
...
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