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
aa75caec
Commit
aa75caec
authored
Aug 21, 2020
by
LeeJiancong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接会员支付配置,和无配置时效果
parent
4845a885
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
104 additions
and
20 deletions
+104
-20
icon_initpayBase@2x.png
public/static/imgs/icon_initpayBase@2x.png
+0
-0
app.tsx
src/app.tsx
+3
-3
initBase.css
src/pages/payandSettle/components/initBase.css
+18
-0
initBase.less
src/pages/payandSettle/components/initBase.less
+19
-0
initBase.tsx
src/pages/payandSettle/components/initBase.tsx
+28
-0
index.tsx
src/pages/payandSettle/paySetting/index.tsx
+36
-17
No files found.
public/static/imgs/icon_initpayBase@2x.png
0 → 100644
View file @
aa75caec
35.2 KB
src/app.tsx
View file @
aa75caec
...
...
@@ -98,9 +98,9 @@ export function render(oldRender: Function) {
export
function
onRouteChange
({
routes
,
matchedRoutes
,
location
,
action
})
{
console
.
log
(
'onRouteChange'
)
//
if (isDev) {
//
return;
//
}
if
(
isDev
)
{
return
;
}
if
(
whiteLists
.
includes
(
location
.
pathname
))
return
;
...
...
src/pages/payandSettle/components/initBase.css
0 → 100644
View file @
aa75caec
.init-img
{
width
:
400px
;
height
:
300px
;
}
.right
{
padding
:
64px
0
0
64px
;
}
.right
.title
{
font-size
:
32px
;
font-weight
:
600
;
color
:
black
;
}
.right
.btn
{
margin-top
:
48px
;
width
:
80px
;
height
:
32px
;
line-height
:
32px
;
}
src/pages/payandSettle/components/initBase.less
0 → 100644
View file @
aa75caec
.init-img{
width: 400px;
height: 300px;
}
.right{
padding: 64px 0 0 64px;
.title{
font-size: 32px;
font-weight: 600;
color: black;
}
.btn{
margin-top: 48px;
width: 80px;
height: 32px;
line-height: 32px;
}
}
\ No newline at end of file
src/pages/payandSettle/components/initBase.tsx
0 → 100644
View file @
aa75caec
import
React
,
{
Component
}
from
'react'
import
{
Card
,
Row
,
Col
,
Space
,
Button
}
from
'antd'
import
style
from
'./initBase.less'
const
initBase
:
React
.
FC
<
{}
>
=
(
props
:
any
)
=>
{
const
initImg
=
require
(
'../../../../public/static/imgs/icon_initpayBase@2x.png'
)
return
(
<
Card
>
<
Row
>
<
Col
pull=
{
6
}
push=
{
6
}
>
<
Row
>
<
Col
span=
{
12
}
>
<
img
className=
{
style
[
'init-img'
]
}
src=
{
initImg
}
/>
</
Col
>
<
Col
span=
{
12
}
className=
{
style
[
'right'
]
}
>
<
Space
direction=
"vertical"
>
<
div
className=
{
style
[
'title'
]
}
>
抱歉
</
div
>
<
div
>
平台还未配置您的支付方式,请联系平台客服
</
div
>
<
Button
className=
{
style
[
'btn'
]
}
type=
"primary"
size=
'small'
>
联系客服
</
Button
>
</
Space
>
</
Col
>
</
Row
>
</
Col
>
</
Row
>
</
Card
>
)
}
export
default
initBase
\ No newline at end of file
src/pages/payandSettle/paySetting/index.tsx
View file @
aa75caec
/*
* @Author: LeeJiancong
* @Date: 2020-08-1
3 09:50:41
* @Date: 2020-08-1
9 15:25:54
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-08-20 16:04:56
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-08-21 18:19:53
*/
import
React
,
{
useEffect
,
useState
,
useRef
}
from
'react'
import
{
Card
,
Button
,
Tabs
,
Radio
,
Space
,
Row
,
Col
,
Table
,
Popconfirm
,
Input
}
from
'antd'
...
...
@@ -12,6 +13,7 @@ import EyePreview from '@/components/EyePreview'
import
{
createFormActions
,
FormEffectHooks
,
useFormEffects
}
from
'@formily/antd'
import
{
GlobalConfig
}
from
'@/global/config'
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
InitBase
from
'../components/initBase'
import
SettingModal
from
'../components/settingModal'
import
{
PublicApi
}
from
'@/services/api'
import
{
history
}
from
'umi'
...
...
@@ -33,7 +35,13 @@ const PaySetting: React.FC<{}> = () => {
const
[
initialValues
,
setinitialValues
]
=
useState
({})
const
[
type
,
settype
]
=
useState
<
any
>
(
null
)
const
[
hasEdit
,
sethasEdit
]
=
useState
<
boolean
>
(
false
)
const
[
showInput
,
setshowInput
]
=
useState
(
true
)
/**
* @description: isSetting
* @param {type} 默认为已从pass平台为此账号配置好了策略
* @return {type}
*/
const
[
isSetting
,
setisSetting
]
=
useState
(
true
)
const
[
showInput
,
setshowInput
]
=
useState
(
true
)
//是否显示授权
const
[
initParam
,
setinitParam
]
=
useState
({
//授权参数
code
:
''
,
value
:
''
,
...
...
@@ -50,7 +58,7 @@ const PaySetting: React.FC<{}> = () => {
})
const
handleAddMemberBtn
=
(
id
:
string
|
number
,
type
:
number
)
=>
{
console
.
log
(
'id'
,
id
,
'type'
,
type
)
//
console.log('id', id, 'type', type)
setmode
(
0
)
settype
(
type
)
setvisible
(
true
)
...
...
@@ -139,9 +147,6 @@ const PaySetting: React.FC<{}> = () => {
}
// const tableAddButton = <Button style={{ marginBottom: 16 }} block icon={<PlusOutlined />} onClick={() => handleAddMemberBtn(1)} type='dashed'>新增参数配置1</Button>
// const tableAddButton2 = <Button style={{ marginBottom: 16 }} block icon={<PlusOutlined />} onClick={() => handleAddMemberBtn(2)} type='dashed'>新增参数配置2</Button>
// const tableAddButton3 = <Button style={{ marginBottom: 16 }} block icon={<PlusOutlined />} onClick={() => handleAddMemberBtn(3)} type='dashed'>新增参数配置3</Button>
const
tableColumns
:
ColumnType
<
any
>
[]
=
[
{
dataIndex
:
'code'
,
title
:
'参数代码'
,
align
:
'center'
},
{
dataIndex
:
'value'
,
align
:
'center'
,
title
:
'参数值'
,
render
:
(
_
,
record
)
=>
<
EyePreview
url=
{
`/memberCenter/memberAbility/manage/addMember?id=${record.memberId}&preview=1`
}
>
{
_
}
</
EyePreview
>
},
...
...
@@ -166,7 +171,8 @@ const PaySetting: React.FC<{}> = () => {
let
{
id
,
isPitchOn
,
payParametersList
,
payParametersListResponses
}
=
res
.
data
setisPitchOn
(
isPitchOn
)
if
(
id
==
6
){
let
{
id
,
code
,
value
,
describe
}
=
payParametersListResponses
[
0
]
||
{}
setinitParam
({...
initParam
,
code
,
value
,
describe
})
}
else
{
payParametersList
=
payParametersList
?
payParametersList
:
[]
...
...
@@ -187,23 +193,22 @@ const PaySetting: React.FC<{}> = () => {
settabid
(
ids
[
0
])
initBase
(
ids
[
0
])
}
}
else
{
setisSetting
(
false
)
}
})
// let ids = TabList.map((v, i) => v.id)
// settabid(ids[0])
// const init = setTimeout(() => {
// tabid = tabid ? tabid : ids[0]
// initBase(tabid)
// }, 1000)
return
()
=>
{
// clearTimeout(init)
}
},
[])
const
useTabEffects
=
()
=>
{
}
//提交表单
/**
* @description: 提交表单 保存
* @param {type}
* @return {type}
*/
const
handleSubmit
=
()
=>
{
let
list
:
any
=
[]
if
(
tabid
==
1
)
{
...
...
@@ -213,6 +218,7 @@ const PaySetting: React.FC<{}> = () => {
}
else
if
(
tabid
==
6
){
list
=
[{
type
:
type
,
code
:
initParam
.
code
,
value
:
initParam
.
value
,
describe
:
initParam
.
describe
...
...
@@ -247,6 +253,9 @@ const PaySetting: React.FC<{}> = () => {
}
const
changeTab
=
(
tab
)
=>
{
settabid
(
tab
)
if
(
tab
==
6
){
//授信
settype
(
tab
)
}
initBase
(
tab
)
}
const
changeRadio
=
(
e
)
=>
{
...
...
@@ -275,6 +284,8 @@ const PaySetting: React.FC<{}> = () => {
</
Button
>
}
>
{
isSetting
&&
<
Card
>
<
Tabs
onTabClick=
{
(
e
)
=>
changeTab
(
e
)
}
type=
"card"
>
...
...
@@ -350,7 +361,14 @@ const PaySetting: React.FC<{}> = () => {
onOK=
{
(
list
)
=>
handleModalOK
(
list
)
}
/>
</
Card
>
}
{
isSetting
===
false
&&
<
InitBase
/>
}
</
PageHeaderWrapper
>
)
}
export
default
PaySetting
\ No newline at end of file
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