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
a0af7fb6
Commit
a0af7fb6
authored
Nov 17, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:店铺页面id的获取;微信支付方式支付结果查询
parent
f611fc4d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
6 deletions
+41
-6
LXShopLayout.tsx
src/pages/lxMall/layouts/LXShopLayout.tsx
+1
-1
index.less
src/pages/lxMall/pay/components/wechat/index.less
+0
-2
index.tsx
src/pages/lxMall/pay/components/wechat/index.tsx
+38
-1
list.tsx
src/pages/lxMall/shopList/list.tsx
+2
-2
No files found.
src/pages/lxMall/layouts/LXShopLayout.tsx
View file @
a0af7fb6
...
...
@@ -112,7 +112,7 @@ const LXShopLayout: React.FC<LXMallLayoutPropsType> = (props) => {
return
React
.
cloneElement
(
child
,
{
layoutType
:
LAYOUT_TYPE
.
shop
,
shopId
:
query
.
shopI
d
,
shopId
:
shopInfo
.
i
d
,
memberId
:
query
.
memberId
,
shopUrlParam
:
shopId
,
shopInfo
,
...
...
src/pages/lxMall/pay/components/wechat/index.less
View file @
a0af7fb6
...
...
@@ -15,8 +15,6 @@
&_imgbox {
padding: 20px;
width: 180px;
height: 180px;
border: 1px solid rgba(245, 245, 245, 1);
&>img {
...
...
src/pages/lxMall/pay/components/wechat/index.tsx
View file @
a0af7fb6
...
...
@@ -4,6 +4,7 @@ import { LAYOUT_TYPE } from '@/constants'
import
wechatIcon
from
'@/assets/imgs/wechat_icon.png'
import
{
priceFormat
}
from
'@/utils/numberFomat'
import
{
PublicApi
}
from
'@/services/api'
import
{
linkToUrl
}
from
'../../utils'
import
{
message
,
Spin
}
from
'antd'
import
QRCode
from
'qrcode'
import
styles
from
'./index.less'
...
...
@@ -22,7 +23,8 @@ const WechatPayWay: React.FC<WechatPayWayPropsType> = (props) => {
const
{
payInfo
,
orderId
,
onChange
,
orderInfo
,
layoutType
,
shopUrlParam
}
=
props
const
[
wechatPayUrl
,
setWechatPayUrl
]
=
useState
<
any
>
(
''
)
const
[
pageLoading
,
setPageLoading
]
=
useState
<
boolean
>
(
true
)
let
checkCount
=
0
let
checkTimer
=
null
useEffect
(()
=>
{
pay
()
},
[])
...
...
@@ -49,6 +51,9 @@ const WechatPayWay: React.FC<WechatPayWayPropsType> = (props) => {
if
(
res
.
code
===
1000
)
{
message
.
destroy
()
generateQrCode
(
res
.
data
)
setTimeout
(()
=>
{
checkPayState
()
},
5000
);
}
setPageLoading
(
false
)
// setWechatPayUrl(res.data)
...
...
@@ -58,6 +63,38 @@ const WechatPayWay: React.FC<WechatPayWayPropsType> = (props) => {
})
}
const
checkPayState
=
()
=>
{
if
(
checkCount
<
12
)
{
let
param
=
{
id
:
Number
(
orderId
),
paymentInformationId
:
payInfo
.
paymentInformationId
,
payTypeId
:
payInfo
.
paymentChannelsId
,
}
//@ts-ignore
PublicApi
.
getOrderPayResultsl
(
param
).
then
(
res
=>
{
const
{
data
,
code
}
=
res
if
(
code
===
1000
)
{
message
.
destroy
()
if
(
data
)
{
message
.
success
(
"支付成功"
)
linkToUrl
(
`/pay/result?orderId=
${
orderId
}
`
,
layoutType
,
shopUrlParam
)
}
else
{
checkCount
++
checkTimer
=
setTimeout
(()
=>
{
checkPayState
()
},
5000
)
}
}
else
{
message
.
error
(
res
.
message
)
}
})
}
else
{
clearTimeout
(
checkTimer
)
checkTimer
=
null
}
}
return
(
<
Spin
spinning=
{
pageLoading
}
>
<
div
className=
{
styles
.
common_title
}
>
...
...
src/pages/lxMall/shopList/list.tsx
View file @
a0af7fb6
...
...
@@ -77,8 +77,8 @@ const CommodityList: React.FC<CommodityListPropsType> = (props) => {
</
div
>
<
div
className=
{
styles
.
shop_list_line
}
>
<
label
>
以上信息已通过会员认证|
</
label
>
<
Link
to=
{
`/shop/about?shopId=${btoa(JSON.stringify({
shopId: item.id,
memberId: item.memberId }))}`
}
className=
{
styles
.
shop_list_line_link
}
>
资质证书
>
</
Link
>
<
Link
to=
{
`/shop/about?shopId=${btoa(JSON.stringify({
shopId: item.id,
memberId: item.memberId }))}`
}
className=
{
styles
.
shop_list_line_link
}
>
公司信息
>
</
Link
>
<
Link
to=
{
`/shop/about?shopId=${btoa(JSON.stringify({ memberId: item.memberId }))}`
}
className=
{
styles
.
shop_list_line_link
}
>
资质证书
>
</
Link
>
<
Link
to=
{
`/shop/about?shopId=${btoa(JSON.stringify({ memberId: item.memberId }))}`
}
className=
{
styles
.
shop_list_line_link
}
>
公司信息
>
</
Link
>
</
div
>
</
div
>
<
div
className=
{
styles
.
shop_list_goods
}
>
...
...
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