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
bcea6348
Commit
bcea6348
authored
Sep 23, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev
parents
70cc3116
14dd1dc2
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
286 additions
and
9 deletions
+286
-9
BasicLayout.tsx
src/layouts/BasicLayout.tsx
+1
-1
Roles.tsx
src/layouts/components/Roles.tsx
+1
-1
index.tsx
src/pages/lxMall/order/index.tsx
+30
-4
commodity.tsx
src/pages/systemSetting/collection/commodity.tsx
+64
-2
index.less
src/pages/systemSetting/collection/index.less
+189
-0
index.tsx
src/pages/systemSetting/collection/index.tsx
+1
-1
No files found.
src/layouts/BasicLayout.tsx
View file @
bcea6348
...
@@ -141,7 +141,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
...
@@ -141,7 +141,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
)
}
)
}
collapsed=
{
collapsed
}
collapsed=
{
collapsed
}
onCollapse=
{
handleMenuCollapse
}
onCollapse=
{
handleMenuCollapse
}
disableContentMargin=
{
currentRouter
.
noMargin
!==
undefined
}
disableContentMargin=
{
currentRouter
?
.
noMargin
!==
undefined
}
breadcrumbRender=
{
(
routers
=
[])
=>
[
breadcrumbRender=
{
(
routers
=
[])
=>
[
]
}
]
}
...
...
src/layouts/components/Roles.tsx
View file @
bcea6348
...
@@ -14,7 +14,7 @@ const Roles: React.FC = () => {
...
@@ -14,7 +14,7 @@ const Roles: React.FC = () => {
const
[
roles
,
setRoles
]
=
useState
<
MemberRole
[]
>
([]);
const
[
roles
,
setRoles
]
=
useState
<
MemberRole
[]
>
([]);
useEffect
(()
=>
{
useEffect
(()
=>
{
const
userInfo
=
getAuth
();
const
userInfo
=
getAuth
()
||
{}
;
setRoles
(
userInfo
.
roles
||
[]);
setRoles
(
userInfo
.
roles
||
[]);
if
(
userInfo
.
roles
&&
userInfo
.
roles
.
length
)
{
if
(
userInfo
.
roles
&&
userInfo
.
roles
.
length
)
{
...
...
src/pages/lxMall/order/index.tsx
View file @
bcea6348
...
@@ -42,6 +42,8 @@ const Order: React.FC<OrderPropsType> = (props) => {
...
@@ -42,6 +42,8 @@ const Order: React.FC<OrderPropsType> = (props) => {
const
[
selectAddressInfo
,
setSelectAddressInfo
]
=
useState
<
GetLogisticsReceiverAddressGetResponse
>
()
const
[
selectAddressInfo
,
setSelectAddressInfo
]
=
useState
<
GetLogisticsReceiverAddressGetResponse
>
()
const
[
selectInvoiceInfo
,
setSelectInvoiceInfo
]
=
useState
<
any
>
()
const
[
selectInvoiceInfo
,
setSelectInvoiceInfo
]
=
useState
<
any
>
()
const
[
logisticsFee
,
setLogisticsFee
]
=
useState
<
number
>
(
0
)
const
[
logisticsFee
,
setLogisticsFee
]
=
useState
<
number
>
(
0
)
const
[
isElectronicContract
,
setIsElectronicContract
]
=
useState
<
boolean
>
(
false
)
// 是否选用电子合同
const
[
contractInfo
,
setContractInfo
]
=
useState
()
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
!
spam_id
)
{
if
(
!
spam_id
)
{
...
@@ -75,12 +77,28 @@ const Order: React.FC<OrderPropsType> = (props) => {
...
@@ -75,12 +77,28 @@ const Order: React.FC<OrderPropsType> = (props) => {
item
.
orderList
=
tempOrderList
item
.
orderList
=
tempOrderList
result
.
push
(
item
)
result
.
push
(
item
)
}
}
const
productId
=
sessionOrderInfo
?.
orderList
[
0
]?.
orderList
[
0
].
id
if
(
productId
)
{
try
{
const
rulesRes
=
await
PublicApi
.
getOrderTradingRulesByProductId
({
productId
})
const
{
data
}
=
rulesRes
if
(
data
)
{
// 是否选用电子合同
if
(
data
.
isElectronicContract
)
{
setIsElectronicContract
(
true
)
}
}
}
catch
(
error
)
{
console
.
log
(
"获取交易规则失败"
)
}
}
setOrderList
(
result
)
setOrderList
(
result
)
setOrderInfo
(
sessionOrderInfo
)
setOrderInfo
(
sessionOrderInfo
)
setSpinningState
(
false
)
setSpinningState
(
false
)
}
}
const
renderLogisticsInfo
=
(
type
,
logisticsInfo
)
=>
{
const
renderLogisticsInfo
=
(
type
,
logisticsInfo
)
=>
{
switch
(
type
)
{
switch
(
type
)
{
case
1
:
case
1
:
...
@@ -245,6 +263,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
...
@@ -245,6 +263,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
}
}
const
checkOrder
=
()
=>
{
const
checkOrder
=
()
=>
{
message
.
destroy
()
if
(
isEmpty
(
selectPayWay
))
{
if
(
isEmpty
(
selectPayWay
))
{
message
.
info
(
'请选择支付方式'
)
message
.
info
(
'请选择支付方式'
)
return
return
...
@@ -256,12 +275,17 @@ const Order: React.FC<OrderPropsType> = (props) => {
...
@@ -256,12 +275,17 @@ const Order: React.FC<OrderPropsType> = (props) => {
}
}
}
}
if
(
!
needTheContract
)
{
if
(
isElectronicContract
&&
!
needTheContract
)
{
message
.
info
(
'请先同意签订电子合同'
)
message
.
info
(
'请先同意签订电子合同'
)
return
return
}
}
// 根据状态判断是否需要签订电子合同
if
(
isElectronicContract
)
{
setSignModalVisible
(
true
)
setSignModalVisible
(
true
)
// submitOrder()
}
else
{
submitOrder
()
}
}
}
const
handleSignModalConfirm
=
()
=>
{
const
handleSignModalConfirm
=
()
=>
{
...
@@ -287,7 +311,9 @@ const Order: React.FC<OrderPropsType> = (props) => {
...
@@ -287,7 +311,9 @@ const Order: React.FC<OrderPropsType> = (props) => {
<
PayWay
selectItem=
{
selectPayWay
}
payWayList=
{
orderInfo
.
payWayList
}
onChange=
{
(
val
)
=>
setSelectPayWay
(
val
)
}
/>
<
PayWay
selectItem=
{
selectPayWay
}
payWayList=
{
orderInfo
.
payWayList
}
onChange=
{
(
val
)
=>
setSelectPayWay
(
val
)
}
/>
{
/* <Delivery /> */
}
{
/* <Delivery /> */
}
<
Invoice
state=
{
needTheInvoice
}
onChange=
{
(
val
)
=>
setNeedTheInvoice
(
val
)
}
onSelect=
{
(
val
)
=>
setSelectInvoiceInfo
(
val
)
}
/>
<
Invoice
state=
{
needTheInvoice
}
onChange=
{
(
val
)
=>
setNeedTheInvoice
(
val
)
}
onSelect=
{
(
val
)
=>
setSelectInvoiceInfo
(
val
)
}
/>
<
Contract
state=
{
needTheContract
}
onChange=
{
(
val
)
=>
setneedTheContract
(
val
)
}
/>
{
isElectronicContract
&&
<
Contract
state=
{
needTheContract
}
onChange=
{
(
val
)
=>
setneedTheContract
(
val
)
}
/>
}
<
div
className=
{
styles
.
common_title
}
>
<
div
className=
{
styles
.
common_title
}
>
<
span
>
订单信息
</
span
>
<
span
>
订单信息
</
span
>
</
div
>
</
div
>
...
...
src/pages/systemSetting/collection/commodity.tsx
View file @
bcea6348
import
React
from
'react'
import
React
from
'react'
import
cx
from
'classnames'
import
{
Button
,
Pagination
}
from
'antd'
import
{
StarFilled
}
from
'@ant-design/icons'
import
shop_icon
from
'@/assets/imgs/shop_icon.png'
import
credit_icon
from
'@/assets/imgs/credit_icon.png'
import
styles
from
'./index.less'
import
styles
from
'./index.less'
const
Commodity
:
React
.
FC
=
()
=>
{
const
Commodity
:
React
.
FC
=
()
=>
{
let
CommodityList
=
Array
.
apply
({},
new
Array
(
7
))
return
(
return
(
<
div
>
<>
Commodity
<
div
className=
{
styles
.
commodity_list
}
>
{
CommodityList
.
map
((
item
,
index
)
=>
(
<
div
className=
{
styles
.
commodity_list_item
}
key=
{
`commodity_list_item_${index}`
}
>
<
div
className=
{
cx
(
styles
.
commodity_list_item_item
,
styles
.
morehalf
)
}
>
<
div
className=
{
styles
.
shop_header_info
}
>
<
div
className=
{
styles
.
shop_header_info_logo
}
>
<
img
src=
"https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/69f3f329d5a848119dc89029a10acb081600332395671.jpg"
/>
</
div
>
<
div
className=
{
styles
.
shop_header_info_content
}
>
<
p
className=
{
styles
.
commodity_name
}
>
0.8-1.0mm黑色手折纹胎水牛皮
</
p
>
<
ul
className=
{
styles
.
tags_list
}
>
<
li
className=
{
styles
.
tags_list_item
}
key=
{
`tags_list_item`
}
>
黄牛头皮层自然摔纹
</
li
>
<
li
className=
{
styles
.
tags_list_item
}
key=
{
`tags_list_item`
}
>
硬度适中偏软
</
li
>
<
li
className=
{
styles
.
tags_list_item
}
key=
{
`tags_list_item`
}
>
手感舒适
</
li
>
</
ul
>
</
div
>
</
div
>
</
div
>
<
div
className=
{
cx
(
styles
.
commodity_list_item_item
)
}
>
<
div
className=
{
styles
.
shop_header_info_content_about_item
}
>
<
i
className=
{
styles
.
icon
}
><
img
src=
{
credit_icon
}
/></
i
>
<
span
>
1288
</
span
>
</
div
>
<
div
className=
{
styles
.
commodity_shopname
}
>
温州市龙昌皮业有限公司
</
div
>
</
div
>
<
div
className=
{
cx
(
styles
.
commodity_list_item_item
)
}
>
{
/* <div className={styles.commodity_price}>
<span>¥</span>
<label>79.00</label>
</div> */
}
{
/* <div className={styles.commodity_tag}>在线询价</div> */
}
<
div
className=
{
styles
.
commodity_point
}
>
2,000~3,000积分
</
div
>
</
div
>
<
div
className=
{
cx
(
styles
.
commodity_list_item_item
)
}
>
<
span
className=
{
styles
.
date
}
>
2020-10-25 10:58
</
span
>
</
div
>
<
div
className=
{
cx
(
styles
.
commodity_list_item_item
)
}
>
<
div
className=
{
styles
.
collection_state_wrap
}
>
<
div
className=
{
cx
(
styles
.
collection_state
)
}
>
<
StarFilled
/>
<
label
>
收藏
</
label
>
</
div
>
<
Button
className=
{
styles
.
collection_state_wrap_btn
}
type=
"primary"
>
再次购买
</
Button
>
</
div
>
</
div
>
</
div
>
))
}
</
div
>
<
div
className=
{
styles
.
pagination_wrap
}
>
<
Pagination
showSizeChanger=
{
false
}
defaultCurrent=
{
1
}
total=
{
100
}
/>
</
div
>
</
div
>
</>
)
)
}
}
...
...
src/pages/systemSetting/collection/index.less
View file @
bcea6348
...
@@ -152,6 +152,195 @@
...
@@ -152,6 +152,195 @@
}
}
}
}
.commodity_list {
&_item {
position: relative;
display: flex;
margin-bottom: 16px;
&_item {
flex: 1;
display: flex;
justify-content: center;
flex-direction: column;
.commodity_shopname {
color: #909399;
font-size: 12px;
margin-top: 4px;
}
.commodity_price {
color: #D32F2F;
}
.commodity_point {
color: #EA8000;
}
.commodity_tag {
width: 68px;
height: 24px;
line-height: 24px;
text-align: center;
background-color: #F0F8FF;
color: #3F7ED2;
font-size: 12px;
}
&.morehalf {
flex: 1.5;
}
.shop_header_info {
position: relative;
display: flex;
&_logo {
border-radius: 4px;
overflow: hidden;
width: 72px;
height: 72px;
margin-right: 16px;
&>img {
width: 72px;
height: 72px;
}
}
&_content {
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
.commodity_name {
color: #303133;
margin-bottom: 4px;
max-width: 300px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tags_list {
padding: 0;
margin: 0;
&_item {
display: inline-block;
list-style: none;
color: #999999;
font-size: 12px;
margin-right: 20px;
}
}
&_name {
font-size: 14px;
color: #333333;
font-weight: 500;
}
&_about {
display: flex;
margin-top: 10px;
&_item {
// flex: 1;
display: flex;
align-items: center;
margin-right: 16px;
&>span {
font-size: 14px;
color: #333333;
line-height: 20px;
&.red {
color: #D32F2F;
margin-right: 4px;
}
}
&>.icon {
position: relative;
top: -1px;
overflow: hidden;
margin-right: 5px;
&>img {
width: 20px;
height: 20px;
}
}
}
}
&_icon {
color: #cccccc;
font-size: 12px;
margin-left: 6px;
}
}
}
.date {
color: #909399;
font-size: 12px;
}
.collection_state_wrap {
display: flex;
align-items: center;
&_btn {
margin-left: 28px;
}
}
.collection_state {
font-size: 14px;
color: #00B37A;
cursor: pointer;
&>label {
margin-left: 4px;
cursor: pointer;
}
}
.rate_wrap {
font-size: 12px;
:global {
.ant-rate {
font-size: 14px;
}
}
}
.level_icon {
width: 54px;
height: 16px;
margin-bottom: 4px;
display: block;
background-size: 100% 100%;
background-repeat: no-repeat;
&.level3 {
background-image: url(/static/imgs/level2@2x.png);
}
}
}
}
}
.information_list {
.information_list {
&_item {
&_item {
position: relative;
position: relative;
...
...
src/pages/systemSetting/collection/index.tsx
View file @
bcea6348
...
@@ -15,7 +15,7 @@ const Collection: React.FC = () => {
...
@@ -15,7 +15,7 @@ const Collection: React.FC = () => {
return
(
return
(
<
PageHeaderWrapper
>
<
PageHeaderWrapper
>
<
div
className=
{
styles
.
collection_wrap
}
>
<
div
className=
{
styles
.
collection_wrap
}
>
<
Tabs
defaultActiveKey=
"
information
"
className=
{
styles
.
collection_tabs
}
>
<
Tabs
defaultActiveKey=
"
commodity
"
className=
{
styles
.
collection_tabs
}
>
<
TabPane
tab=
"商品收藏"
key=
"commodity"
>
<
TabPane
tab=
"商品收藏"
key=
"commodity"
>
<
Commodity
/>
<
Commodity
/>
</
TabPane
>
</
TabPane
>
...
...
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