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
黄庭坚
jinfa-platform
Commits
9eb3c65a
Commit
9eb3c65a
authored
Mar 09, 2022
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 渠道&店铺&自营模板装修添加分类是否显示选项
parent
d0e67dd8
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
52 additions
and
12 deletions
+52
-12
editor.ts
src/locales/en-US/editor.ts
+3
-0
editor.ts
src/locales/ko-KR/editor.ts
+3
-0
editor.ts
src/locales/zh-CN/editor.ts
+3
-0
index.tsx
src/pages/editor/channelEdit/index.tsx
+2
-1
index.tsx
src/pages/editor/ownMallEdit/index.tsx
+2
-1
preview.tsx
src/pages/editor/ownMallEdit/preview.tsx
+3
-2
index.tsx
...opsSettings/components/CategoryreCommendSetting/index.tsx
+28
-3
index.tsx
src/pages/editor/shopEdit/index.tsx
+2
-1
index.tsx
src/pages/preview/channelPreview/index.tsx
+3
-2
index.tsx
src/pages/preview/shopPreview/index.tsx
+3
-2
No files found.
src/locales/en-US/editor.ts
View file @
9eb3c65a
...
...
@@ -270,4 +270,7 @@
'editor.shopfloorline.goods'
:
'Product Recommendation Settings'
,
'editor.shopfloorline.category'
:
'Classification Recommendation Settings'
,
'editor.mainnav.title'
:
'Navigation bar editor'
,
'editor.cateogry.show.title'
:
'Whether to show recommended categories'
,
'editor.cateogry.show.yes'
:
'Yes'
,
'editor.cateogry.show.no'
:
'No'
,
}
src/locales/ko-KR/editor.ts
View file @
9eb3c65a
...
...
@@ -270,5 +270,8 @@ export default {
'editor.shopfloorline.goods'
:
'상품 추천 설정'
,
'editor.shopfloorline.category'
:
'분류 권장 설정'
,
'editor.mainnav.title'
:
'탐색 모음 편집기'
,
'editor.cateogry.show.title'
:
'추천 카테고리 표시 여부'
,
'editor.cateogry.show.yes'
:
'예'
,
'editor.cateogry.show.no'
:
'아니요'
,
}
src/locales/zh-CN/editor.ts
View file @
9eb3c65a
...
...
@@ -270,5 +270,8 @@ export default {
'editor.shopfloorline.goods'
:
'商品推荐设置'
,
'editor.shopfloorline.category'
:
'分类推荐设置'
,
'editor.mainnav.title'
:
'导航栏编辑'
,
'editor.cateogry.show.title'
:
'是否展示推荐分类'
,
'editor.cateogry.show.yes'
:
'是'
,
'editor.cateogry.show.no'
:
'否'
,
}
src/pages/editor/channelEdit/index.tsx
View file @
9eb3c65a
...
...
@@ -312,7 +312,8 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
categoryAdvertPicUrl
:
categoryDetail
.
categoryAdvertPicUrl
,
categoryid
:
item
.
categoryId
,
linkdisable
:
true
,
categoryList
:
categoryDetail
.
categoryBOList
categoryList
:
categoryDetail
.
categoryBOList
,
isShow
:
categoryDetail
?.
isShow
},
},
}
...
...
src/pages/editor/ownMallEdit/index.tsx
View file @
9eb3c65a
...
...
@@ -255,7 +255,8 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => {
categoryAdvertPicUrl: categoryDetail.categoryAdvertPicUrl,
categoryid: item.categoryId,
linkdisable: true,
categoryList: categoryDetail.categoryBOList
categoryList: categoryDetail.categoryBOList,
isShow: categoryDetail?.isShow
},
},
}
...
...
src/pages/editor/ownMallEdit/preview.tsx
View file @
9eb3c65a
...
...
@@ -232,7 +232,7 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => {
for (const item of firstCategory) {
if (item.categoryId ){
const categoryDetail: any = await fetchCategoryById(item.categoryId)
if (categoryDetail?.isShow !== 1) return
let floorLineConfigItem = {}
floorLineKeys.push(String(initIndex + 1))
...
...
@@ -253,7 +253,8 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => {
categoryAdvertPicUrl: categoryDetail.categoryAdvertPicUrl,
categoryid: item.categoryId,
linkdisable: true,
categoryList: categoryDetail.categoryBOList
categoryList: categoryDetail.categoryBOList,
isShow: categoryDetail?.isShow
},
},
}
...
...
src/pages/editor/settingsPanel/propsSettings/components/CategoryreCommendSetting/index.tsx
View file @
9eb3c65a
import
React
,
{
useState
,
useEffect
,
useCallback
}
from
'react'
import
{
Checkbox
,
Row
,
Col
,
message
,
Modal
}
from
'antd'
import
{
Checkbox
,
Row
,
Col
,
message
,
Modal
,
Radio
}
from
'antd'
import
{
useIntl
}
from
'umi'
import
UploadImage
from
'@/components/UploadImage'
import
SettingPanel
from
'../../../../components/SettingPanel'
...
...
@@ -20,16 +20,26 @@ interface CategoryRecommendSettingPropsType {
categoryid
?:
number
;
templateType
:
'channel'
|
'shop'
|
'own'
,
shopId
:
number
,
isShow
:
number
}
const
CategoryRecommendSetting
:
React
.
FC
<
CategoryRecommendSettingPropsType
>
=
(
props
)
=>
{
const
{
categoryList
=
[],
categoryAdvertPicUrl
=
''
,
shopId
,
onChange
,
templateid
,
categoryid
,
templateType
}
=
props
const
{
categoryList
=
[],
categoryAdvertPicUrl
=
''
,
shopId
,
isShow
,
templateid
,
categoryid
,
templateType
}
=
props
const
[
imgUrl
,
setImgUrl
]
=
useState
<
string
>
(
categoryAdvertPicUrl
)
const
[
selectKeys
,
setSelectKeys
]
=
useState
<
number
[]
>
([])
const
[
categoryResponseList
,
setCategoryResponseList
]
=
useState
<
any
>
([])
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
<
boolean
>
(
false
)
const
[
newProps
,
setNewProps
]
=
useState
(
props
)
const
intl
=
useIntl
()
const
[
showState
,
setShowState
]
=
useState
<
number
>
(
1
)
useEffect
(()
=>
{
if
(
isShow
)
{
setShowState
(
1
)
}
else
{
setShowState
(
0
)
}
},
[
isShow
])
const
changeNewProps
=
(
key
:
string
,
data
:
any
)
=>
{
const
result
=
{
...
newProps
}
...
...
@@ -119,7 +129,8 @@ const CategoryRecommendSetting: React.FC<CategoryRecommendSettingPropsType> = (p
templateId
:
templateid
,
categoryId
:
categoryid
,
categoryAdvertPicUrl
,
twoCategoryIds
:
selectKeys
twoCategoryIds
:
selectKeys
,
isShow
:
showState
}
let
postFn
;
if
(
templateType
===
'channel'
)
{
...
...
@@ -157,6 +168,11 @@ const CategoryRecommendSetting: React.FC<CategoryRecommendSettingPropsType> = (p
}
},
[
newProps
])
const
options
=
[
{
label
:
intl
.
formatMessage
({
id
:
'editor.cateogry.show.yes'
}),
value
:
1
},
{
label
:
intl
.
formatMessage
({
id
:
'editor.cateogry.show.no'
}),
value
:
0
},
];
return
(
<
SettingPanel
confirmLoading=
{
confirmLoading
}
...
...
@@ -165,6 +181,15 @@ const CategoryRecommendSetting: React.FC<CategoryRecommendSettingPropsType> = (p
>
<
div
className=
{
styles
.
category_recommend
}
>
<
div
className=
{
styles
.
category_recommend_title
}
>
<
span
>
{
intl
.
formatMessage
({
id
:
'editor.cateogry.show.title'
})
}
</
span
>
</
div
>
<
div
className=
{
styles
.
category_recommend_body
}
>
<
Radio
.
Group
options=
{
options
}
value=
{
showState
}
onChange=
{
(
e
)
=>
{
changeNewProps
(
'isShow'
,
e
.
target
.
value
);
setShowState
(
e
.
target
.
value
)
}
}
/>
</
div
>
<
div
className=
{
styles
.
category_recommend_title
}
>
<
span
>
{
intl
.
formatMessage
({
id
:
'editor.setting.category.first.title'
})
}
</
span
>
</
div
>
<
div
className=
{
styles
.
category_recommend_body
}
>
...
...
src/pages/editor/shopEdit/index.tsx
View file @
9eb3c65a
...
...
@@ -203,7 +203,8 @@ const ShopEdit: React.FC<ShopEditPropsType> = (props) => {
categoryAdvertPicUrl
:
categoryDetail
.
categoryAdvertPicUrl
,
categoryid
:
item
.
categoryId
,
linkdisable
:
true
,
categoryList
:
categoryDetail
.
categoryBOList
categoryList
:
categoryDetail
.
categoryBOList
,
isShow
:
categoryDetail
?.
isShow
},
},
}
...
...
src/pages/preview/channelPreview/index.tsx
View file @
9eb3c65a
...
...
@@ -291,7 +291,7 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
for
(
const
item
of
firstCategory
)
{
if
(
item
.
categoryId
)
{
const
categoryDetail
:
any
=
await
fetchCategoryById
(
item
.
categoryId
)
if
(
categoryDetail
?.
isShow
!==
1
)
return
let
floorLineConfigItem
=
{}
floorLineKeys
.
push
(
String
(
initIndex
+
1
))
...
...
@@ -312,7 +312,8 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
categoryAdvertPicUrl
:
categoryDetail
.
categoryAdvertPicUrl
,
categoryid
:
item
.
categoryId
,
linkdisable
:
true
,
categoryList
:
categoryDetail
.
categoryBOList
categoryList
:
categoryDetail
.
categoryBOList
,
isShow
:
categoryDetail
?.
isShow
},
},
}
...
...
src/pages/preview/shopPreview/index.tsx
View file @
9eb3c65a
...
...
@@ -181,7 +181,7 @@ const ShopEdit: React.FC<ShopEditPropsType> = (props) => {
for
(
const
item
of
firstCategory
)
{
if
(
item
.
categoryId
){
const
categoryDetail
:
any
=
await
fetchCategoryById
(
item
.
categoryId
)
if
(
categoryDetail
?.
isShow
!==
1
)
return
let
floorLineConfigItem
=
{}
floorLineKeys
.
push
(
String
(
initIndex
+
1
))
...
...
@@ -201,7 +201,8 @@ const ShopEdit: React.FC<ShopEditPropsType> = (props) => {
"props"
:
{
categoryAdvertPicUrl
:
categoryDetail
.
categoryAdvertPicUrl
,
categoryid
:
item
.
categoryId
,
categoryList
:
categoryDetail
.
categoryBOList
categoryList
:
categoryDetail
.
categoryBOList
,
isShow
:
categoryDetail
?.
isShow
},
},
}
...
...
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