Commit 29ef9f09 authored by XieZhiXiong's avatar XieZhiXiong
parents cf074b2c 87cbbe84
...@@ -99,9 +99,9 @@ export function render(oldRender: Function) { ...@@ -99,9 +99,9 @@ export function render(oldRender: Function) {
export function onRouteChange({ routes, matchedRoutes, location, action }) { export function onRouteChange({ routes, matchedRoutes, location, action }) {
console.log('onRouteChange') console.log('onRouteChange')
// if (isDev) { if (isDev) {
// return; return;
// } }
if (whiteLists.includes(location.pathname)) return; if (whiteLists.includes(location.pathname)) return;
const routeAuthUrls = getRouters() const routeAuthUrls = getRouters()
......
.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;
}
.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
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
/* /*
* @Author: LeeJiancong * @Author: LeeJiancong
* @Date: 2020-08-13 09:50:41 * @Date: 2020-08-19 15:25:54
* @LastEditors: LeeJiancong * @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 React, { useEffect, useState, useRef } from 'react'
import { Card, Button, Tabs, Radio, Space, Row, Col, Table,Popconfirm,Input } from 'antd' import { Card, Button, Tabs, Radio, Space, Row, Col, Table,Popconfirm,Input } from 'antd'
...@@ -12,6 +13,7 @@ import EyePreview from '@/components/EyePreview' ...@@ -12,6 +13,7 @@ import EyePreview from '@/components/EyePreview'
import { createFormActions, FormEffectHooks, useFormEffects } from '@formily/antd' import { createFormActions, FormEffectHooks, useFormEffects } from '@formily/antd'
import { GlobalConfig } from '@/global/config' import { GlobalConfig } from '@/global/config'
import { ColumnType } from 'antd/lib/table/interface' import { ColumnType } from 'antd/lib/table/interface'
import InitBase from '../components/initBase'
import SettingModal from '../components/settingModal' import SettingModal from '../components/settingModal'
import { PublicApi } from '@/services/api' import { PublicApi } from '@/services/api'
import { history } from 'umi' import { history } from 'umi'
...@@ -33,7 +35,13 @@ const PaySetting: React.FC<{}> = () => { ...@@ -33,7 +35,13 @@ const PaySetting: React.FC<{}> = () => {
const [initialValues, setinitialValues] = useState({}) const [initialValues, setinitialValues] = useState({})
const [type, settype] = useState<any>(null) const [type, settype] = useState<any>(null)
const [hasEdit, sethasEdit] = useState<boolean>(false) 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({//授权参数 const [initParam, setinitParam] = useState({//授权参数
code:'', code:'',
value:'', value:'',
...@@ -50,7 +58,7 @@ const PaySetting: React.FC<{}> = () => { ...@@ -50,7 +58,7 @@ const PaySetting: React.FC<{}> = () => {
}) })
const handleAddMemberBtn = (id: string | number, type: number) => { const handleAddMemberBtn = (id: string | number, type: number) => {
console.log('id', id, 'type', type) // console.log('id', id, 'type', type)
setmode(0) setmode(0)
settype(type) settype(type)
setvisible(true) setvisible(true)
...@@ -139,9 +147,6 @@ const PaySetting: React.FC<{}> = () => { ...@@ -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>[] = [ const tableColumns: ColumnType<any>[] = [
{ dataIndex: 'code', title: '参数代码', align: 'center' }, { dataIndex: 'code', title: '参数代码', align: 'center' },
{ dataIndex: 'value', align: 'center', title: '参数值', render: (_, record) => <EyePreview url={`/memberCenter/memberAbility/manage/addMember?id=${record.memberId}&preview=1`}>{_}</EyePreview> }, { 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<{}> = () => { ...@@ -166,7 +171,8 @@ const PaySetting: React.FC<{}> = () => {
let { id, isPitchOn, payParametersList, payParametersListResponses } = res.data let { id, isPitchOn, payParametersList, payParametersListResponses } = res.data
setisPitchOn(isPitchOn) setisPitchOn(isPitchOn)
if(id == 6){ if(id == 6){
let {id,code,value,describe} = payParametersListResponses[0] || {}
setinitParam({...initParam,code,value,describe})
}else{ }else{
payParametersList = payParametersList ? payParametersList : [] payParametersList = payParametersList ? payParametersList : []
...@@ -187,23 +193,22 @@ const PaySetting: React.FC<{}> = () => { ...@@ -187,23 +193,22 @@ const PaySetting: React.FC<{}> = () => {
settabid(ids[0]) settabid(ids[0])
initBase(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 () => { return () => {
// clearTimeout(init)
} }
}, []) }, [])
const useTabEffects = () => { const useTabEffects = () => {
} }
//提交表单 /**
* @description: 提交表单 保存
* @param {type}
* @return {type}
*/
const handleSubmit = () => { const handleSubmit = () => {
let list: any = [] let list: any = []
if (tabid == 1) { if (tabid == 1) {
...@@ -213,6 +218,7 @@ const PaySetting: React.FC<{}> = () => { ...@@ -213,6 +218,7 @@ const PaySetting: React.FC<{}> = () => {
} else if(tabid == 6){ } else if(tabid == 6){
list = [{ list = [{
type: type,
code: initParam.code, code: initParam.code,
value: initParam.value, value: initParam.value,
describe: initParam.describe describe: initParam.describe
...@@ -247,6 +253,9 @@ const PaySetting: React.FC<{}> = () => { ...@@ -247,6 +253,9 @@ const PaySetting: React.FC<{}> = () => {
} }
const changeTab = (tab) => { const changeTab = (tab) => {
settabid(tab) settabid(tab)
if(tab == 6){//授信
settype(tab)
}
initBase(tab) initBase(tab)
} }
const changeRadio = (e) => { const changeRadio = (e) => {
...@@ -275,6 +284,8 @@ const PaySetting: React.FC<{}> = () => { ...@@ -275,6 +284,8 @@ const PaySetting: React.FC<{}> = () => {
</Button> </Button>
} }
> >
{
isSetting &&
<Card> <Card>
<Tabs onTabClick={(e) => changeTab(e)} type="card"> <Tabs onTabClick={(e) => changeTab(e)} type="card">
...@@ -350,7 +361,14 @@ const PaySetting: React.FC<{}> = () => { ...@@ -350,7 +361,14 @@ const PaySetting: React.FC<{}> = () => {
onOK={(list) => handleModalOK(list)} onOK={(list) => handleModalOK(list)}
/> />
</Card> </Card>
}
{
isSetting === false &&
<InitBase/>
}
</PageHeaderWrapper> </PageHeaderWrapper>
) )
} }
export default PaySetting export default PaySetting
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment