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
shenshaokai
jinfa-platform
Commits
57f52f00
Commit
57f52f00
authored
Oct 13, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
3b99726b
90f46fa3
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
83 additions
and
18 deletions
+83
-18
index.tsx
src/components/InputNumber/index.tsx
+4
-2
index.tsx
...ages/lxMall/commodityDetail/components/ShopInfo/index.tsx
+12
-1
index.tsx
src/pages/lxMall/pay/components/transfer/index.tsx
+6
-3
index.tsx
src/pages/lxMall/pay/index.tsx
+17
-3
index.less
src/pages/lxMall/purchaseOrder/index.less
+2
-0
index.tsx
src/pages/lxMall/purchaseOrder/index.tsx
+5
-4
index.tsx
src/pages/systemSetting/collection/index.tsx
+1
-1
shops.tsx
src/pages/systemSetting/collection/shops.tsx
+36
-4
No files found.
src/components/InputNumber/index.tsx
View file @
57f52f00
...
...
@@ -32,13 +32,15 @@ const InputNumber: React.FC<InputNumberPropsType> = (props) => {
}
},
[
min
,
max
])
const
handleReduce
=
()
=>
{
const
handleReduce
=
(
e
)
=>
{
e
.
stopPropagation
()
if
(
value
>
minCount
)
{
onChange
(
Number
(
value
)
-
1
)
}
}
const
handleAdd
=
()
=>
{
const
handleAdd
=
(
e
)
=>
{
e
.
stopPropagation
()
if
(
value
<
maxCount
)
{
onChange
(
Number
(
value
)
+
1
)
}
...
...
src/pages/lxMall/commodityDetail/components/ShopInfo/index.tsx
View file @
57f52f00
...
...
@@ -31,6 +31,17 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
}
}
const
handleCollect
=
()
=>
{
let
param
=
{
shopId
:
shopInfo
.
shopId
,
status
:
true
}
PublicApi
.
postTemplateShopCollect
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
}
})
}
return
(
<
div
className=
{
styles
.
shop_info
}
>
...
...
@@ -72,7 +83,7 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
<
div
className=
{
styles
.
dashed_split
}
></
div
>
<
div
className=
{
styles
.
shop_info_btn_group
}
>
<
div
className=
{
styles
.
shop_info_btn
}
><
Link
to=
{
`/shop?shopId=${shopUrlParam}`
}
>
进入店铺
</
Link
></
div
>
<
div
className=
{
styles
.
shop_info_btn
}
>
收藏本店
</
div
>
<
div
className=
{
styles
.
shop_info_btn
}
onClick=
{
()
=>
handleCollect
()
}
>
收藏本店
</
div
>
</
div
>
<
Button
loading=
{
applyLoading
}
className=
{
styles
.
apply_member_btn
}
onClick=
{
()
=>
applyFroVip
()
}
>
申请成为本店会员
</
Button
>
</
div
>
...
...
src/pages/lxMall/pay/components/transfer/index.tsx
View file @
57f52f00
...
...
@@ -12,11 +12,12 @@ const { Dragger } = Upload
interface
TransferPayWayPropsType
{
payInfo
:
GetOrderOrderPayDetailsResponse
orderId
:
number
orderId
:
number
,
onChange
:
Function
}
const
TransferPayWay
:
React
.
FC
<
TransferPayWayPropsType
>
=
(
props
)
=>
{
const
{
payInfo
,
orderId
}
=
props
const
{
payInfo
,
orderId
,
onChange
}
=
props
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
)
const
[
payOrderUrl
,
setPayOrderUrls
]
=
useState
<
string
>
()
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
<
boolean
>
(
false
)
...
...
@@ -75,11 +76,13 @@ const TransferPayWay: React.FC<TransferPayWayPropsType> = (props) => {
if
(
res
.
code
===
1000
)
{
message
.
destroy
()
message
.
success
(
"支付成功"
)
onChange
(
true
)
}
else
{
setConfirmLoading
(
false
)
onChange
(
false
)
}
}).
catch
(()
=>
{
onChange
(
false
)
setConfirmLoading
(
false
)
})
}
...
...
src/pages/lxMall/pay/index.tsx
View file @
57f52f00
...
...
@@ -48,6 +48,7 @@ const getPayTypeTitle = (type) => {
const
PayPage
:
React
.
FC
<
PayPagePropsType
>
=
(
props
)
=>
{
const
{
shopInfo
,
mallInfo
,
layoutType
,
}
=
props
const
[
payState
,
setPayState
]
=
useState
<
boolean
>
(
false
)
const
{
orderId
}
=
props
.
location
.
query
const
[
pageTitle
,
setPageTitle
]
=
useState
<
string
>
()
const
[
payType
]
=
useState
<
string
|
number
>
(
PayWayType
.
bank
)
...
...
@@ -72,6 +73,10 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
})
}
const
handlePayChangge
=
(
state
)
=>
{
setPayState
(
state
)
}
const
renderPayWay
=
()
=>
{
if
(
!
payInfo
)
{
return
...
...
@@ -89,7 +94,7 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
case
PayWayType
.
bank
:
return
<
BankPayWay
/>
case
PayWayType
.
transfer
:
return
<
TransferPayWay
payInfo=
{
payInfo
}
orderId=
{
orderId
}
/>
return
<
TransferPayWay
payInfo=
{
payInfo
}
orderId=
{
orderId
}
onChange=
{
(
state
)
=>
handlePayChangge
(
state
)
}
/>
default
:
return
null
}
...
...
@@ -98,7 +103,7 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
window
.
location
.
href
=
'/'
}
return
payInfo
?
(
return
payInfo
?
!
payState
?
(
<
div
className=
{
styles
.
pay
}
>
<
CommonHeader
logoUrl=
{
(
layoutType
===
LAYOUT_TYPE
.
channel
||
layoutType
===
LAYOUT_TYPE
.
ichannel
)
?
shopInfo
?.
logo
:
mallInfo
.
logoUrl
}
...
...
@@ -110,7 +115,16 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
}
</
div
>
</
div
>
)
:
<
div
>
)
:
(<
div
>
<
CommonHeader
logoUrl=
{
(
layoutType
===
LAYOUT_TYPE
.
channel
||
layoutType
===
LAYOUT_TYPE
.
ichannel
)
?
shopInfo
?.
logo
:
mallInfo
.
logoUrl
}
title=
"支付成功"
/>
<
div
className=
{
styles
.
errmsg
}
>
<
p
>
支付成功
</
p
>
<
Button
type=
"primary"
className=
{
styles
.
backbtn
}
onClick=
{
()
=>
backHome
()
}
>
继续购物
</
Button
>
</
div
>
</
div
>)
:
<
div
>
<
CommonHeader
logoUrl=
{
(
layoutType
===
LAYOUT_TYPE
.
channel
||
layoutType
===
LAYOUT_TYPE
.
ichannel
)
?
shopInfo
?.
logo
:
mallInfo
.
logoUrl
}
title=
"支付错误"
...
...
src/pages/lxMall/purchaseOrder/index.less
View file @
57f52f00
...
...
@@ -51,6 +51,7 @@
height: 130px;
align-items: center;
font-size: 12px;
user-select: none;
&_item {
display: flex;
...
...
@@ -85,6 +86,7 @@
text-align: center;
margin-top: 10px;
white-space: nowrap;
user-select: none;
}
}
...
...
src/pages/lxMall/purchaseOrder/index.tsx
View file @
57f52f00
...
...
@@ -2,7 +2,6 @@ import React, { useState, useEffect } from 'react'
import
CommonHeader
from
'../components/CommonHeader'
import
InputNumber
from
'@/components/InputNumber'
import
Recommand
from
'../components/Recommand'
import
{
history
}
from
'umi'
import
cx
from
'classnames'
import
{
Checkbox
,
Affix
,
message
,
Modal
,
Button
}
from
'antd'
import
styles
from
'./index.less'
...
...
@@ -475,12 +474,12 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
buyOrderInfo
.
payWayList
=
await
getPayWayListByMemberId
(
selectItem
.
memberId
)
PublicApi
.
postOrderIsWorkFlow
({
productIds
}).
then
(
res
=>
{
message
.
destroy
()
setConfirmLoading
(
false
)
if
(
res
.
code
===
1000
)
{
PublicApi
.
postOrderDirectPayment
({
productId
:
productIds
[
0
]
}).
then
(
res
=>
{
message
.
destroy
()
PublicApi
.
postOrderDirectPayment
({
productId
:
productIds
[
0
]
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
message
.
destroy
()
let
sessionKey
=
`
${
selectItem
.
id
}${
new
Date
().
getTime
()}
`
updateOrderInfo
(
buyOrderInfo
,
sessionKey
).
then
(()
=>
{
...
...
@@ -604,7 +603,9 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
</
div
>
<
div
className=
{
cx
(
styles
.
order_list_item_item
,
styles
.
count
)
}
>
<
InputNumber
disabled=
{
true
}
max=
{
childItem
.
stockCount
||
0
}
min=
{
childItem
.
commodityUnitPrice
.
commodity
.
minOrder
||
1
}
value=
{
childItem
.
count
}
onChange=
{
(
value
)
=>
handleCountChange
(
value
,
childItem
.
id
)
}
/>
<
div
className=
{
styles
.
stock
}
>
(库存
{
numFormat
(
childItem
.
stockCount
)
}{
childItem
.
commodityUnitPrice
.
commodity
.
unitName
}
)
</
div
>
<
div
className=
{
styles
.
stock
}
>
<
span
>
(库存
{
numFormat
(
childItem
.
stockCount
)
}{
childItem
.
commodityUnitPrice
.
commodity
.
unitName
}
)
</
span
>
</
div
>
</
div
>
<
div
className=
{
cx
(
styles
.
order_list_item_item
,
styles
.
amount
)
}
>
<
span
className=
{
styles
.
order_list_item_item_price
}
>
{
priceFormat
(
computeItemPrice
(
childItem
.
commodityUnitPrice
?.
priceRange
,
childItem
.
count
))
}
</
span
>
...
...
src/pages/systemSetting/collection/index.tsx
View file @
57f52f00
...
...
@@ -15,7 +15,7 @@ const Collection: React.FC = () => {
return
(
<
PageHeaderWrapper
>
<
div
className=
{
styles
.
collection_wrap
}
>
<
Tabs
defaultActiveKey=
"
commodity
"
className=
{
styles
.
collection_tabs
}
>
<
Tabs
defaultActiveKey=
"
shops
"
className=
{
styles
.
collection_tabs
}
>
<
TabPane
tab=
"商品收藏"
key=
"commodity"
>
<
Commodity
/>
</
TabPane
>
...
...
src/pages/systemSetting/collection/shops.tsx
View file @
57f52f00
import
React
from
'react'
import
React
,
{
useEffect
,
useState
}
from
'react'
import
cx
from
'classnames'
import
{
Rate
,
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
{
PublicApi
}
from
'@/services/api'
import
styles
from
'./index.less'
const
Shops
:
React
.
FC
=
()
=>
{
const
[
list
,
setList
]
=
useState
([])
const
[
current
,
setCurrent
]
=
useState
<
number
>
(
1
)
const
[
pageSize
,
setPageSize
]
=
useState
<
number
>
(
10
)
const
[
totalCount
,
setTotalCount
]
=
useState
<
number
>
(
0
)
let
shopList
=
Array
.
apply
({},
new
Array
(
7
))
useEffect
(()
=>
{
fetchCollectShopList
()
},
[
current
])
/**
* 获取收藏的店铺列表
*/
const
fetchCollectShopList
=
()
=>
{
let
param
=
{
current
,
pageSize
}
//@ts-ignore
PublicApi
.
getTemplateShopCollectList
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setList
(
res
.
data
.
data
)
setTotalCount
(
res
.
data
.
totalCount
)
}
})
}
const
handleChange
=
(
page
)
=>
{
setCurrent
(
page
)
}
return
(
<>
<
div
className=
{
styles
.
shops_list
}
>
{
shopL
ist
.
map
((
item
,
index
)
=>
(
list
&&
l
ist
.
map
((
item
,
index
)
=>
(
<
div
className=
{
styles
.
shops_list_item
}
key=
{
`shops_list_item_${index}`
}
>
<
div
className=
{
cx
(
styles
.
shops_list_item_item
,
styles
.
morehalf
)
}
>
<
div
className=
{
styles
.
shop_header_info
}
>
...
...
@@ -61,9 +89,13 @@ const Shops: React.FC = () => {
}
</
div
>
{
totalCount
>
0
&&
(
<
div
className=
{
styles
.
pagination_wrap
}
>
<
Pagination
showSizeChanger=
{
false
}
defaultCurrent=
{
1
}
total=
{
100
}
/>
<
Pagination
showSizeChanger=
{
false
}
current=
{
current
}
total=
{
totalCount
}
pageSize=
{
pageSize
}
onChange=
{
handleChange
}
/>
</
div
>
)
}
</>
)
}
...
...
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