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
64d8e163
Commit
64d8e163
authored
Feb 22, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 渠道商城返回商城首页链接问题
parent
ee658bec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
9 deletions
+21
-9
index.tsx
src/pages/lxMall/pay/index.tsx
+5
-3
index.tsx
src/pages/lxMall/payResult/index.tsx
+16
-6
No files found.
src/pages/lxMall/pay/index.tsx
View file @
64d8e163
import
React
,
{
useState
,
useEffect
}
from
'react'
import
{
inject
}
from
'mobx-react'
import
CommonHeader
from
'../components/CommonHeader'
import
PointPayWay
from
'./components/point'
import
BablancePayWay
from
'./components/balance'
...
...
@@ -17,6 +18,7 @@ interface PayPagePropsType {
shopInfo
:
any
;
mallInfo
:
any
;
layoutType
:
LAYOUT_TYPE
;
SiteStore
:
any
,
}
enum
PayWayType
{
...
...
@@ -47,7 +49,7 @@ const getPayTypeTitle = (type) => {
}
const
PayPage
:
React
.
FC
<
PayPagePropsType
>
=
(
props
)
=>
{
const
{
shopInfo
,
mallInfo
,
layoutType
}
=
props
const
{
shopInfo
,
mallInfo
,
layoutType
,
SiteStore
:
{
currentLayoutInfo
}
}
=
props
const
[
payState
,
setPayState
]
=
useState
<
boolean
>
(
false
)
const
{
orderId
}
=
props
.
location
.
query
const
[
pageTitle
,
setPageTitle
]
=
useState
<
string
>
()
...
...
@@ -120,7 +122,7 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
}
const
backHome
=
()
=>
{
window
.
location
.
href
=
'/'
window
.
location
.
href
=
currentLayoutInfo
.
mallLink
}
const
renderError
=
()
=>
{
...
...
@@ -153,4 +155,4 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
)
:
loading
?
null
:
renderError
():
renderError
()
}
export
default
PayPage
export
default
inject
(
"SiteStore"
)(
PayPage
)
src/pages/lxMall/payResult/index.tsx
View file @
64d8e163
/*
* @Author: ghua
* @Date: 2020-11-09 18:18:52
* @LastEditTime: 2021-02-22 14:47:14
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /lingxi-business-paltform/src/pages/lxMall/payResult/index.tsx
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
import
CommonHeader
from
'../components/CommonHeader'
import
{
LAYOUT_TYPE
}
from
'@/constants'
import
{
history
}
from
'umi'
import
{
inject
}
from
'mobx-react'
import
{
Button
,
message
}
from
'antd'
import
cx
from
'classnames'
import
paySuccessIcon
from
'@/assets/imgs/pay_success.png'
...
...
@@ -12,11 +21,12 @@ interface PayResultPropsType {
shopInfo
:
any
;
mallInfo
:
any
;
layoutType
:
LAYOUT_TYPE
;
SiteStore
:
any
,
}
let
timer
=
null
const
PayResult
:
React
.
FC
<
PayResultPropsType
>
=
(
props
)
=>
{
const
{
shopInfo
,
mallInfo
,
layoutType
,
}
=
props
const
{
shopInfo
,
mallInfo
,
layoutType
,
SiteStore
:
{
currentLayoutInfo
}
}
=
props
const
{
orderId
}
=
props
.
location
.
query
const
[
count
,
setCount
]
=
useState
<
number
>
(
10
)
...
...
@@ -36,7 +46,7 @@ const PayResult: React.FC<PayResultPropsType> = (props) => {
}
const
backHome
=
()
=>
{
window
.
location
.
href
=
"/"
window
.
location
.
href
=
currentLayoutInfo
.
mallLink
}
const
goToDetail
=
()
=>
{
...
...
@@ -58,9 +68,9 @@ const PayResult: React.FC<PayResultPropsType> = (props) => {
<
img
className=
{
styles
.
success_icon
}
src=
{
paySuccessIcon
}
/>
<
div
className=
{
styles
.
result_text
}
>
支付成功!
</
div
>
<
div
className=
{
styles
.
btn_group
}
>
<
Button
className=
{
cx
(
styles
.
btn_item
,
styles
.
primary
)
}
type=
"primary"
<
Button
className=
{
cx
(
styles
.
btn_item
,
styles
.
primary
)
}
type=
"primary"
onClick=
{
()
=>
goToDetail
()
}
>
去订单查看(
{
count
}
s)
...
...
@@ -72,4 +82,4 @@ const PayResult: React.FC<PayResultPropsType> = (props) => {
)
}
export
default
PayResult
export
default
inject
(
"SiteStore"
)(
PayResult
)
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