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
linweijiong
jinfa-platform
Commits
a08dee18
Commit
a08dee18
authored
Dec 02, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:商品列表属性筛选问题;购买数量小数点问题
parent
680e09e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
index.tsx
src/components/InputNumber/index.tsx
+11
-5
index.tsx
...es/lxMall/components/Filter/components/Category/index.tsx
+3
-5
No files found.
src/components/InputNumber/index.tsx
View file @
a08dee18
...
...
@@ -48,7 +48,7 @@ const InputNumber: React.FC<InputNumberPropsType> = (props) => {
const
handleChange
=
(
e
)
=>
{
const
{
value
}
=
e
.
target
;
const
reg
=
/^
\d
*
?
$/
;
const
reg
=
/^
\d
*
([
.
]?\d{0,3})
$/
if
(
reg
.
test
(
value
))
{
onChange
(
value
,
'change'
)
}
...
...
@@ -56,15 +56,21 @@ const InputNumber: React.FC<InputNumberPropsType> = (props) => {
const
handleBlur
=
(
e
)
=>
{
const
{
value
}
=
e
.
target
;
if
(
value
===
""
)
{
let
num
:
string
=
value
const
reg
=
/^
\d
*
(
.$
)
/
if
(
reg
.
test
(
num
))
{
num
=
value
.
replace
(
'.'
,
""
)
}
console
.
log
(
num
,
"num"
)
if
(
num
===
""
)
{
onChange
(
minCount
,
'blur'
)
}
else
{
if
(
Number
(
value
)
<
minCount
)
{
if
(
Number
(
num
)
<
minCount
)
{
onChange
(
minCount
,
'blur'
)
}
else
if
(
Number
(
value
)
>
maxCount
)
{
}
else
if
(
Number
(
num
)
>
maxCount
)
{
onChange
(
maxCount
,
'blur'
)
}
else
{
onChange
(
value
,
'blur'
)
onChange
(
num
,
'blur'
)
}
}
}
...
...
src/pages/lxMall/components/Filter/components/Category/index.tsx
View file @
a08dee18
...
...
@@ -93,8 +93,6 @@ const Category: React.FC<CategoryPropsType> = (props) => {
break
case
LAYOUT_TYPE
.
shopList
:
getCategoryListFn
=
PublicApi
.
getProductPlatformGetCategoryTree
default
:
break
}
getCategoryListFn
&&
getCategoryListFn
(
param
,
{
headers
}).
then
((
res
)
=>
{
if
(
res
.
code
===
1000
)
{
...
...
@@ -175,7 +173,6 @@ const Category: React.FC<CategoryPropsType> = (props) => {
return
{
title
:
<
span
className=
{
styles
.
sub_category_title
}
>
{
thirdCategoryItem
.
title
}
</
span
>,
name
:
thirdCategoryItem
.
title
,
isLastNode
:
true
,
key
:
thirdCategoryItem
.
id
,
children
:
[]
}
...
...
@@ -189,9 +186,10 @@ const Category: React.FC<CategoryPropsType> = (props) => {
}
const
handleSelect
=
(
selectedKeys
,
info
)
=>
{
const
{
title
,
isLastNode
,
name
}
=
info
.
node
console
.
log
(
info
)
const
{
title
,
children
,
name
}
=
info
.
node
setSelectedKeys
(
selectedKeys
)
if
(
isLastNode
)
{
if
(
children
.
length
===
0
)
{
if
(
lastCategoryId
!==
selectedKeys
[
0
])
{
setLastCategoryId
(
selectedKeys
[
0
])
}
...
...
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