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
5d7c1441
Commit
5d7c1441
authored
Oct 30, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:1.未登录下库存的显示;2.商品详情交易评价和交易记录修改
parent
f7bd6623
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
52 additions
and
65 deletions
+52
-65
index.less
...s/lxMall/commodityDetail/components/Interested/index.less
+1
-0
index.tsx
...omponents/ProductDescription/components/Comment/index.tsx
+8
-4
index.tsx
...nents/ProductDescription/components/TradeRecord/index.tsx
+20
-2
index.tsx
src/pages/lxMall/commodityDetail/index.tsx
+2
-2
index.tsx
.../lxMall/components/FindMore/components/newTrade/index.tsx
+20
-17
index.tsx
src/pages/lxMall/components/FindMore/index.tsx
+0
-39
index.tsx
src/pages/lxMall/shopList/index.tsx
+1
-1
No files found.
src/pages/lxMall/commodityDetail/components/Interested/index.less
View file @
5d7c1441
.interested {
border: 1px solid rgba(245, 245, 245, 1);
width: 190px;
margin-bottom: 24px;
.interested_title {
font-size: 14px;
...
...
src/pages/lxMall/commodityDetail/components/ProductDescription/components/Comment/index.tsx
View file @
5d7c1441
...
...
@@ -18,7 +18,7 @@ interface CommentPropsType {
const
Comment
:
React
.
FC
<
CommentPropsType
>
=
(
props
)
=>
{
const
{
productIds
,
setCount
}
=
props
const
[
current
,
setCurrent
]
=
useState
<
number
>
(
1
)
const
[
pageSize
,
setPageSize
]
=
useState
<
number
>
(
10
)
const
[
pageSize
]
=
useState
<
number
>
(
4
)
const
[
totalCount
,
setTotalCount
]
=
useState
<
number
>
(
0
)
const
[
summaryInfo
,
setSummaryInfo
]
=
useState
<
GetMemberCommentMallTradeSummaryResponse
>
()
const
[
commentList
,
setCommentList
]
=
useState
<
GetMemberCommentMallTradeHistoryPageResponseDetail
[]
>
([])
...
...
@@ -128,7 +128,9 @@ const Comment: React.FC<CommentPropsType> = (props) => {
}]
setCommentCountList
(
result
)
setCount
(
allCount
)
setGoodRate
(
Math
.
floor
((
goodCount
/
allCount
)
*
100
))
if
(
goodCount
>
0
)
{
setGoodRate
(
Math
.
floor
((
goodCount
/
allCount
)
*
100
))
}
}
const
handleFilterCommentType
=
(
type
:
string
)
=>
{
...
...
@@ -171,7 +173,9 @@ const Comment: React.FC<CommentPropsType> = (props) => {
<
img
src=
{
defaultAvatar
}
/>
</
div
>
<
div
className=
{
styles
.
user_name
}
>
{
item
.
memberName
}
</
div
>
<
div
className=
{
styles
.
user_type
}
>
{
item
.
levelTag
}
</
div
>
{
item
.
levelTag
&&
<
div
className=
{
styles
.
user_type
}
>
{
item
.
levelTag
}
</
div
>
}
</
div
>
<
div
className=
{
styles
.
comment_list_item_right
}
>
<
Rate
className=
{
styles
.
comment_rate
}
value=
{
item
.
star
}
disabled
/>
...
...
@@ -188,7 +192,7 @@ const Comment: React.FC<CommentPropsType> = (props) => {
{
totalCount
>
0
&&
(
<
div
className=
{
styles
.
pagination_wrap
}
>
<
Pagination
showQuickJumper=
{
false
}
showSizeChanger=
{
false
}
onChange=
{
handlePageChange
}
current=
{
1
}
pageSize=
{
pageSize
}
total=
{
totalCount
}
/>
<
Pagination
showQuickJumper=
{
false
}
showSizeChanger=
{
false
}
onChange=
{
handlePageChange
}
current=
{
current
}
pageSize=
{
pageSize
}
total=
{
totalCount
}
/>
</
div
>
)
}
...
...
src/pages/lxMall/commodityDetail/components/ProductDescription/components/TradeRecord/index.tsx
View file @
5d7c1441
...
...
@@ -14,7 +14,7 @@ interface TradeRecordPropsType {
const
TradeRecord
:
React
.
FC
<
TradeRecordPropsType
>
=
(
props
)
=>
{
const
{
productIds
,
setCount
}
=
props
const
[
current
,
setCurrent
]
=
useState
<
number
>
(
1
)
const
[
pageSize
,
setPageSize
]
=
useState
<
number
>
(
10
)
const
[
pageSize
]
=
useState
<
number
>
(
4
)
const
[
totalCount
,
setTotalCount
]
=
useState
<
number
>
(
0
)
const
[
recordList
,
setRecordList
]
=
useState
<
GetOrderTransactionRecordsListResponseDetail
[]
>
([])
...
...
@@ -24,6 +24,12 @@ const TradeRecord: React.FC<TradeRecordPropsType> = (props) => {
}
},
[
productIds
])
useEffect
(()
=>
{
if
(
productIds
&&
!
isEmpty
(
productIds
))
{
fetchRecordsList
()
}
},
[
current
])
const
fetchRecordsList
=
()
=>
{
let
param
=
{
current
,
...
...
@@ -48,7 +54,9 @@ const TradeRecord: React.FC<TradeRecordPropsType> = (props) => {
return
(
<
div
className=
{
styles
.
columns_item
}
>
<
div
className=
{
styles
.
columns_item_name
}
>
{
record
.
memberName
}
</
div
>
<
div
className=
{
styles
.
columns_item_member
}
>
VIP会员
</
div
>
{
record
.
levelTag
&&
<
div
className=
{
styles
.
columns_item_member
}
>
{
record
.
levelTag
}
</
div
>
}
</
div
>
)
}
...
...
@@ -65,6 +73,10 @@ const TradeRecord: React.FC<TradeRecordPropsType> = (props) => {
render
:
(
tradingTime
)
=>
moment
(
tradingTime
).
format
(
'YYYY-MM-DD HH:mm'
)
},
]
const
handleChange
=
(
pagination
)
=>
{
const
{
current
}
=
pagination
setCurrent
(
current
)
}
return
(
<
div
id=
"trade_record"
className=
{
styles
.
trade_record
}
>
...
...
@@ -77,6 +89,12 @@ const TradeRecord: React.FC<TradeRecordPropsType> = (props) => {
columns=
{
columns
}
dataSource=
{
recordList
}
locale=
{
{
emptyText
:
'暂无交易记录'
}
}
onChange=
{
handleChange
}
pagination=
{
{
current
:
current
,
pageSize
:
pageSize
,
total
:
totalCount
}
}
/>
</
div
>
</
div
>
...
...
src/pages/lxMall/commodityDetail/index.tsx
View file @
5d7c1441
...
...
@@ -902,7 +902,7 @@ const CommodityDetail = (props) => {
<
div
className=
{
styles
.
product_info_line
}
>
<
div
className=
{
styles
.
product_info_line_label
}
>
库存数量
</
div
>
<
div
className=
{
styles
.
product_info_line_brief
}
>
<
span
className=
{
styles
.
text
}
>
{
numFormat
(
stockCount
)
}{
commodityDetail
?.
unitName
}
</
span
>
<
span
className=
{
styles
.
text
}
>
{
getAuth
()
?
`${numFormat(stockCount)}${commodityDetail?.unitName || ''}`
:
'仅会员可见'
}
</
span
>
</
div
>
</
div
>
)
:
(
...
...
@@ -911,7 +911,7 @@ const CommodityDetail = (props) => {
<
div
className=
{
cx
(
styles
.
product_info_line_brief
,
styles
.
row
)
}
>
<
InputNumber
disabled=
{
stockCount
===
0
}
value=
{
buyCount
}
min=
{
commodityDetail
?.
priceType
===
COMMODITY_TYPE
.
prompt
?
commodityDetail
?.
minOrder
:
1
}
max=
{
stockCount
}
onChange=
{
(
value
)
=>
setBuyCount
(
value
)
}
/>
<
span
className=
{
cx
(
styles
.
text
,
styles
.
mar_left_10
)
}
>
{
commodityDetail
?.
unitName
}
</
span
>
<
span
className=
{
cx
(
styles
.
text
,
styles
.
mar_left_10
)
}
>
(库存
{
numFormat
(
stockCount
)
}{
commodityDetail
?.
unitName
}
)
</
span
>
<
span
className=
{
cx
(
styles
.
text
,
styles
.
mar_left_10
)
}
>
{
getAuth
()
?
`(库存${numFormat(stockCount)}${commodityDetail?.unitName || ''})`
:
'(仅会员可见)'
}
</
span
>
</
div
>
</
div
>
)
...
...
src/pages/lxMall/components/FindMore/components/newTrade/index.tsx
View file @
5d7c1441
...
...
@@ -20,23 +20,26 @@ const NewTrade: React.FC = () => {
},
[])
const
autoPlayList
=
(
maxLenght
)
=>
{
const
autoPlaySpeed
=
5000
const
unitDistance
=
79
if
(
maxLenght
>
4
)
{
const
maxDistance
=
(
maxLenght
-
3
)
*
unitDistance
timer
=
setInterval
(()
=>
{
distance
+=
unitDistance
if
(
distance
<
maxDistance
)
{
const
new_trade_list
=
document
.
getElementById
(
"new_trade_list"
)
//@ts-ignore
new_trade_list
.
style
=
`transform: translateY(
${
-
distance
}
px);`
}
else
{
clearInterval
(
timer
)
timer
=
null
setTranslateY
(
distance
-
unitDistance
)
setCurrent
(
current
+
1
)
}
},
autoPlaySpeed
)
const
new_trade_list
=
document
.
getElementById
(
"new_trade_list"
)
if
(
new_trade_list
)
{
const
autoPlaySpeed
=
5000
const
unitDistance
=
79
if
(
maxLenght
>
4
)
{
const
maxDistance
=
(
maxLenght
-
3
)
*
unitDistance
timer
=
setInterval
(()
=>
{
distance
+=
unitDistance
if
(
distance
<
maxDistance
)
{
//@ts-ignore
new_trade_list
.
style
=
`transform: translateY(
${
-
distance
}
px);`
}
else
{
clearInterval
(
timer
)
timer
=
null
setTranslateY
(
distance
-
unitDistance
)
setCurrent
(
current
+
1
)
}
},
autoPlaySpeed
)
}
}
}
useEffect
(()
=>
{
...
...
src/pages/lxMall/components/FindMore/index.tsx
View file @
5d7c1441
...
...
@@ -6,45 +6,6 @@ import './index.less'
const
FindMore
:
React
.
FC
=
()
=>
{
const
buy_dynamic_list
=
[
{
title
:
'黑色头层牛皮自然摔纹'
,
state
:
0
,
content
:
'2000平方英尺'
,
date
:
'09/09 09:00'
},
{
title
:
'黑色头层牛皮自然摔纹'
,
state
:
0
,
content
:
'2000平方英尺'
,
date
:
'09/09 09:00'
},
{
title
:
'黑色头层牛皮自然摔纹'
,
state
:
0
,
content
:
'2000平方英尺'
,
date
:
'09/09 09:00'
},
{
title
:
'黑色头层牛皮自然摔纹'
,
state
:
1
,
content
:
'2000平方英尺'
,
date
:
'09/09 09:00'
},
{
title
:
'黑色头层牛皮自然摔纹'
,
state
:
1
,
content
:
'2000平方英尺'
,
date
:
'09/09 09:00'
},
{
title
:
'黑色头层牛皮自然摔纹'
,
state
:
1
,
content
:
'2000平方英尺'
,
date
:
'09/09 09:00'
},
]
return
(
<
div
className=
"find_more"
id=
"find_more"
>
<
div
className=
"find_more_container"
>
...
...
src/pages/lxMall/shopList/index.tsx
View file @
5d7c1441
...
...
@@ -29,7 +29,7 @@ const ShopList: React.FC<ShopListPropsType> = (props) => {
const
[
shopList
,
setShopList
]
=
useState
<
GetTemplateShopFindShopListResponseDetail
[]
>
([])
const
[
totalCount
,
setTotalCount
]
=
useState
<
number
>
(
0
)
//FILTER_TYPE.activeStores,
const
filterConfig
=
[
FILTER_TYPE
.
category
,
FILTER_TYPE
.
useArea
,
FILTER_TYPE
.
newJoin
]
const
filterConfig
=
[
FILTER_TYPE
.
category
,
FILTER_TYPE
.
useArea
,
FILTER_TYPE
.
activeStores
,
FILTER_TYPE
.
newJoin
]
useEffect
(()
=>
{
setCurrent
(
1
)
...
...
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