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
52275304
Commit
52275304
authored
Sep 18, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:企业商城首页快速导航链接
parent
c9b8cf43
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
26 deletions
+34
-26
index.tsx
src/pages/lxMall/commodity/index.tsx
+12
-5
index.tsx
...Mall/components/Filter/components/CommodityType/index.tsx
+4
-3
index.tsx
src/pages/lxMall/components/FloorAnchor/index.tsx
+2
-2
index.tsx
src/pages/lxMall/components/QuickNav/index.tsx
+7
-7
index.tsx
src/pages/lxMall/order/index.tsx
+9
-9
No files found.
src/pages/lxMall/commodity/index.tsx
View file @
52275304
...
...
@@ -52,7 +52,7 @@ const Commodity: React.FC<CommodityPropsType> = (props) => {
const
[
commonlyUsedName
,
setCommonlyUsedName
]
=
useState
<
string
>
(
""
)
const
{
filterList
,
filterUpdate
,
filterParam
,
onDeleteFilterItem
,
onResetFilter
,
onFilter
,
onFilterParamChange
,
saveCommonlyUsedFilter
}
=
FilterStore
const
{
layoutType
,
shopId
,
memberId
}
=
props
const
{
query
:
{
categoryId
,
categoryName
,
brandId
,
brandName
}
}
=
props
.
location
const
{
query
:
{
categoryId
,
categoryName
,
brandId
,
brandName
,
priceType
}
}
=
props
.
location
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
true
)
const
[
showType
,
setShowType
]
=
useState
<
number
>
(
1
)
// 展示方式:1:矩阵排列; 2:列表排列
const
[
commodityList
,
setCommodityList
]
=
useState
<
GetSearchShopEnterpriseGetCommodityListResponseDetail
[]
>
([])
...
...
@@ -62,10 +62,6 @@ const Commodity: React.FC<CommodityPropsType> = (props) => {
const
[
filterConfig
,
setFilterConfig
]
=
useState
([
FILTER_TYPE
.
categoryAndAttr
,
FILTER_TYPE
.
brand
,
FILTER_TYPE
.
price
,
FILTER_TYPE
.
useArea
,
FILTER_TYPE
.
commodityType
])
useEffect
(()
=>
{
fetchCommodityList
(
1
)
},
[
filterParam
])
useEffect
(()
=>
{
if
(
categoryId
&&
categoryName
)
{
onFilter
({
key
:
[
categoryId
],
...
...
@@ -80,9 +76,20 @@ const Commodity: React.FC<CommodityPropsType> = (props) => {
type
:
FILTER_TYPE
.
brand
,
})
}
if
(
priceType
)
{
onFilter
({
key
:
priceType
,
title
:
Number
(
priceType
)
===
1
?
'只看现价商品'
:
'只看询价商品'
,
type
:
FILTER_TYPE
.
commodityType
,
})
}
},
[
props
.
location
.
query
])
useEffect
(()
=>
{
fetchCommodityList
(
1
)
},
[
filterParam
])
useEffect
(()
=>
{
if
(
!
isEmpty
(
filterList
)
||
filterUpdate
)
{
handleFilterChange
(
filterList
)
}
...
...
src/pages/lxMall/components/Filter/components/CommodityType/index.tsx
View file @
52275304
import
React
,
{
useState
,
useEffect
}
from
'react'
import
{
Checkbox
}
from
'antd'
import
FilterBox
from
'../FilterBox'
import
{
observer
}
from
'mobx-react'
import
{
LAYOUT_TYPE
,
FILTER_TYPE
}
from
'@/constants'
import
isEmpty
from
'lodash/isEmpty'
import
styles
from
'./index.less'
...
...
@@ -13,7 +14,7 @@ interface CommodityTypePropsType {
const
CheckboxGroup
=
Checkbox
.
Group
const
CommodityType
:
React
.
FC
<
CommodityTypePropsType
>
=
(
props
)
=>
{
const
{
layoutType
=
LAYOUT_TYPE
.
mall
}
=
props
//
const { layoutType = LAYOUT_TYPE.mall } = props
const
{
onFilter
,
filterList
}
=
props
.
FilterStore
const
[
selectKeys
,
setSelectKeys
]
=
useState
<
number
[]
>
([])
...
...
@@ -29,7 +30,7 @@ const CommodityType: React.FC<CommodityTypePropsType> = (props) => {
let
initKeys
=
[]
for
(
let
item
of
filterList
)
{
if
(
item
.
type
===
FILTER_TYPE
.
commodityType
)
{
initKeys
.
push
(
item
.
key
)
initKeys
.
push
(
Number
(
item
.
key
)
)
}
}
setSelectKeys
(
initKeys
)
...
...
@@ -74,4 +75,4 @@ const CommodityType: React.FC<CommodityTypePropsType> = (props) => {
)
}
export
default
CommodityType
export
default
observer
(
CommodityType
)
src/pages/lxMall/components/FloorAnchor/index.tsx
View file @
52275304
...
...
@@ -31,7 +31,7 @@ const FloorAnchor: React.FC<FloorAnchorPropsType> = (props) => {
<
ToTopOutlined
/>
<
span
className=
"text"
>
顶部
</
span
>
</
BackTop
>
{
{
/* {
type === 'mall' && (
<div className="qrcode">
<div className="qrcode_img">
...
...
@@ -40,7 +40,7 @@ const FloorAnchor: React.FC<FloorAnchorPropsType> = (props) => {
<div>扫码下载APP</div>
</div>
)
}
}
*/
}
</
Anchor
>
</
div
>
)
...
...
src/pages/lxMall/components/QuickNav/index.tsx
View file @
52275304
...
...
@@ -28,11 +28,11 @@ const QuickNav: React.FC<QuickNavPropsType> = (props) => {
title
:
'上传商品'
,
},
{
path
:
'/memberCenter/tranactionAbility/enquiry
Submit
/addEnquiry'
,
path
:
'/memberCenter/tranactionAbility/enquiry
Offer
/addEnquiry'
,
title
:
'报价'
,
},
{
path
:
'/memberCenter/
home
'
,
path
:
'/memberCenter/
tranactionAbility/saleOrder
'
,
title
:
'接单'
,
},
]
...
...
@@ -40,11 +40,11 @@ const QuickNav: React.FC<QuickNavPropsType> = (props) => {
// 买家服务快捷导航
const
buy_quick_nav_list
=
[
{
path
:
'/
purchaseOnline
'
,
path
:
'/
memberCenter/tranactionAbility/enquirySubmit/addEnquiry
'
,
title
:
'我要求购'
,
},
{
path
:
'/memberCenter/
home
'
,
path
:
'/memberCenter/
tranactionAbility/enquiryOffer/toSubmit
'
,
title
:
'报价信息'
,
},
{
...
...
@@ -55,15 +55,15 @@ const QuickNav: React.FC<QuickNavPropsType> = (props) => {
// 公用快捷导航
const
quick_nav_list
=
[
{
path
:
'/
memberCenter/home
'
,
path
:
'/
commodity?priceType=1
'
,
title
:
'找现货'
,
},
{
path
:
'/
memberCenter/home
'
,
path
:
'/
commodity?priceType=2
'
,
title
:
'找供应'
,
},
{
path
:
'/
memberCenter/hom
e'
,
path
:
'/
purchaseOnlin
e'
,
title
:
'去求购'
,
},
{
...
...
src/pages/lxMall/order/index.tsx
View file @
52275304
...
...
@@ -156,14 +156,6 @@ const Order: React.FC<OrderPropsType> = (props) => {
* 提交订单
*/
const
submitOrder
=
()
=>
{
// if (isEmpty(selectPayWay)) {
// message.info('请选择支付方式')
// return
// }
// if (!needTheContract) {
// message.info('请先同意签订电子合同')
// return
// }
let
params
:
any
=
{
orderModel
:
getOrderMode
(),
// 下单模式
deliveryAddresId
:
selectAddressInfo
.
id
,
...
...
@@ -220,11 +212,19 @@ const Order: React.FC<OrderPropsType> = (props) => {
message
.
info
(
'请选择支付方式'
)
return
}
if
(
needTheInvoice
)
{
if
(
!
selectInvoiceInfo
)
{
message
.
info
(
'请选择发票'
)
return
}
}
if
(
!
needTheContract
)
{
message
.
info
(
'请先同意签订电子合同'
)
return
}
setSignModalVisible
(
true
)
// setSignModalVisible(true)
submitOrder
()
}
const
handleSignModalConfirm
=
()
=>
{
...
...
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