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
f495d88b
Commit
f495d88b
authored
Oct 21, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:保存常用筛选没有保存到属性的问题
parent
619f156d
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
48 additions
and
5 deletions
+48
-5
index.less
src/pages/editor/components/toolBar/index.less
+5
-0
index.tsx
src/pages/editor/components/toolBar/index.tsx
+1
-0
defaultData.ts
src/pages/editor/shopEdit/defaultData.ts
+2
-1
index.tsx
src/pages/editor/shopEdit/index.tsx
+6
-1
index.less
src/pages/lxMall/commodity/index.less
+1
-0
index.tsx
src/pages/lxMall/commodity/index.tsx
+2
-1
index.tsx
...xMall/components/Filter/components/CommonlyUsed/index.tsx
+0
-1
index.ts
src/store/filter/index.ts
+31
-1
No files found.
src/pages/editor/components/toolBar/index.less
View file @
f495d88b
...
...
@@ -30,3 +30,7 @@
}
}
}
.modal_confirm {
width: 420px !important;
}
\ No newline at end of file
src/pages/editor/components/toolBar/index.tsx
View file @
f495d88b
...
...
@@ -10,6 +10,7 @@ const ToolBar: React.FC = () => {
Modal
.
confirm
({
content
:
"是否确认离开模板装修页面?"
,
okText
:
"确认"
,
className
:
styles
.
modal_confirm
,
cancelText
:
"取消"
,
onOk
:
()
=>
{
history
.
goBack
()
...
...
src/pages/editor/shopEdit/defaultData.ts
View file @
f495d88b
...
...
@@ -41,7 +41,8 @@ export const headerConfig = {
"3"
:
{
"componentName"
:
"ShopHeader"
,
"props"
:
{
"shopInfo"
:
{}
"shopInfo"
:
{},
"logoUrl"
:
""
},
},
}
...
...
src/pages/editor/shopEdit/index.tsx
View file @
f495d88b
...
...
@@ -9,6 +9,7 @@ import { topBarConfig, topAdvertConfig, headerConfig, mainNavConfig, bannerAdver
import
{
menuData
}
from
'./defaultMenu'
import
Loading
from
'./loading'
import
{
PublicApi
}
from
'@/services/api'
import
{
GlobalConfig
}
from
'@/global/config'
import
styles
from
'./index.less'
interface
ShopEditPropsType
{
...
...
@@ -131,8 +132,12 @@ const ShopEdit: React.FC<ShopEditPropsType> = (props) => {
//店铺信息
const
shopInfo
=
await
fetchShopInfo
()
headerConfig
[
headerConfig
.
key
].
props
.
shopInfo
=
shopInfo
AboutUsConfig
[
AboutUsConfig
.
key
].
props
.
shopInfo
=
shopInfo
const
shopList
=
GlobalConfig
.
web
.
shopInfo
let
webMallInfo
=
shopList
.
filter
(
item
=>
item
.
environment
===
1
&&
item
.
type
===
1
)[
0
]
headerConfig
[
headerConfig
.
key
].
props
.
logoUrl
=
webMallInfo
.
logoUrl
topBarConfig
[
topBarConfig
.
key
].
props
.
shopname
=
webMallInfo
.
name
AboutUsConfig
[
AboutUsConfig
.
key
].
props
.
shopInfo
=
shopInfo
let
initIndex
=
100
let
floorLineConfig
:
any
=
{}
let
floorLineKeys
:
any
=
[]
...
...
src/pages/lxMall/commodity/index.less
View file @
f495d88b
...
...
@@ -201,6 +201,7 @@
.modal_confirm {
position: relative;
width: 520px !important;
:global {
.ant-modal-body {
...
...
src/pages/lxMall/commodity/index.tsx
View file @
f495d88b
...
...
@@ -326,7 +326,7 @@ const Commodity: React.FC<CommodityPropsType> = (props) => {
filterList
.
length
>
0
&&
(
<
div
className=
{
styles
.
filter_bar_left
}
>
{
userInfo
&&
(
(
userInfo
&&
layoutType
===
LAYOUT_TYPE
.
mall
)
&&
(
<>
<
div
className=
{
styles
.
filter_bar_left_text
}
onClick=
{
()
=>
handleSaveFilter
()
}
>
保存为常用筛选
</
div
>
<
div
className=
{
styles
.
filter_bar_left_split
}
></
div
>
...
...
@@ -369,6 +369,7 @@ const Commodity: React.FC<CommodityPropsType> = (props) => {
className=
{
styles
.
modal_confirm
}
confirmLoading=
{
confirmLoading
}
visible=
{
modalVisible
}
width=
{
520
}
onOk=
{
()
=>
handleSaveConfirm
()
}
onCancel=
{
()
=>
setModalVisible
(
false
)
}
>
...
...
src/pages/lxMall/components/Filter/components/CommonlyUsed/index.tsx
View file @
f495d88b
...
...
@@ -12,7 +12,6 @@ const CommonlyUsed: React.FC = () => {
const
{
commonlyUseFilter
,
getCommonlyUsedFilterList
,
deleteCommonlyUsedFilterItem
,
useCommonlyFilter
}
=
FilterStore
useEffect
(()
=>
{
console
.
log
(
!
isEmpty
(
commonlyUseFilter
),
JSON
.
parse
(
JSON
.
stringify
(
commonlyUseFilter
)),
"!isEmpty(commonlyUseFilter)"
)
if
(
isEmpty
(
commonlyUseFilter
))
{
getCommonlyUsedFilterList
()
}
...
...
src/store/filter/index.ts
View file @
f495d88b
...
...
@@ -40,11 +40,20 @@ const getItemText = (key: number) => {
return
result
}
const
changeAttributeDate
=
(
list
)
=>
{
const
changeAttributeDate
=
(
list
,
change
=
false
)
=>
{
if
(
!
list
)
{
return
[]
}
let
result
=
list
.
filter
(
item
=>
item
.
customerAttributeValueList
.
length
>
0
)
if
(
change
)
{
result
=
result
.
map
(
item
=>
{
return
{
id
:
item
.
customerAttributeId
,
name
:
item
.
customerAttributeName
,
customerAttributeValueList
:
item
.
customerAttributeValueList
}
})
}
return
result
}
...
...
@@ -221,6 +230,11 @@ class FilterStore {
tempFilterParam
.
cityCode
=
filterItem
.
key
tempFilterParam
.
cityName
=
filterItem
.
title
break
case
FILTER_TYPE
.
attribute
:
let
attributeList
=
filterItem
.
key
attributeList
=
changeAttributeDate
(
attributeList
,
true
)
tempFilterParam
.
customerAttributeList
=
attributeList
break
default
:
break
}
...
...
@@ -337,6 +351,22 @@ class FilterStore {
key
:
data
.
priceType
})
}
if
(
data
.
customerAttributeList
)
{
let
newCustomerAttributeList
=
data
.
customerAttributeList
.
map
(
item
=>
{
return
{
customerAttributeId
:
item
.
id
,
customerAttributeName
:
item
.
name
,
customerAttributeValueList
:
item
.
customerAttributeValueList
}
})
tempFilter
.
push
({
type
:
FILTER_TYPE
.
attribute
,
title
:
`
${
data
.
customerAttributeList
.
map
((
tsItem
:
any
)
=>
{
return
`
${
tsItem
.
name
}
:
${
tsItem
.
customerAttributeValueList
.
map
(
cabItem
=>
cabItem
.
name
)}
`
}).
join
(
';'
)}
`
,
key
:
newCustomerAttributeList
})
}
this
.
filterList
=
tempFilter
}
})
...
...
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