Commit 4845a885 authored by LeeJiancong's avatar LeeJiancong

对接会员支付参数

parent a0ab05f7
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-13 14:08:50
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-18 18:56:08
* @LastEditTime: 2020-08-19 15:39:49
*/
import CommodityRoute from './commodityRoute' // 商品能力路由
import MemberRoute from './memberRoute' // 会员能力路由
......@@ -10,8 +10,9 @@ import ShopRoute from './shopRoute' // 店铺能力路由
import ChannelRoute from './channelRoute' // 渠道能力路由
import TranactionRoute from './tranactionRoute' // 交易能力路由
import LogisticsRoute from './logisticsRoutes' // 物流能力路由
import PayandSettleRoute from './payandSettle' //支付与结算
const routes = [CommodityRoute, MemberRoute, ShopRoute, ChannelRoute, TranactionRoute, LogisticsRoute]
const routes = [CommodityRoute, MemberRoute, ShopRoute, ChannelRoute, TranactionRoute,PayandSettleRoute ,LogisticsRoute]
const memberCenterRoute = {
path: '/memberCenter',
......
/*
* @Author: LeeJiancong
* @Date: 2020-07-13 14:36:02
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-08-19 15:34:24
*/
/*
* @Author: Ljc
* @Date: 2020-07-10 16:15:28
* @Last Modified by: ljc
......
/*
* @Author: LeeJiancong
* @Date: 2020-08-19 15:33:27
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-08-20 10:22:11
*/
const payandSettleRoute = {
path:'/memberCenter/payandSettle',
name:'payandSettle',
icon:'smile',
routes:[
{
path:'/memberCenter/payandSettle/paySetting',
name:'paySetting',
key:'paySetting',
routes:[
{
path:'/memberCenter/payandSettle/paySetting/payParamsSetting',
name:'payParamsSetting',
key:'payParamsSetting',
component:'@/pages/payandSettle/paySetting'
}
]
}
]
}
export default payandSettleRoute
\ No newline at end of file
/*
* @Author: LeeJiancong
* @Date: 2020-07-17 18:01:43
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-08-19 17:24:16
*/
/**
* 用于在项目开始前获取所有的配置
* 在项目开始前运行`yarn scripts:build`
......@@ -44,6 +51,14 @@ const serviceConfig = {
// // }
// }
},
//初始化会员支付策略配置
payConfig:{
paymemberConfig:{
url:'/pay/member/pay/config',
method: 'get'
}
}
}
......@@ -68,13 +83,15 @@ async function batchAxiosHttps() {
// }
// serverFn(asyncHttpQueue)
for (const item in serviceConfig) {
for (const subItem in serviceConfig[item]) {
try {
const data = await axios(serviceConfig[item][subItem])
asyncHttpQueue[item][subItem] = data.data.data
} catch(err) {
console.log(serviceConfig[item][subItem].url)
console.log(err.response.data)
if(JSON.stringify(item) !== '{}'){
for (const subItem in serviceConfig[item]) {
try {
const data = await axios(serviceConfig[item][subItem])
asyncHttpQueue[item][subItem] = data.data.data
} catch(err) {
console.log(serviceConfig[item][subItem].url)
console.log(err.response.data)
}
}
}
}
......
export interface MemberType {
id: number;
typeName: string;
}
export interface BusinessType {
id: number;
typeName: string;
}
export interface UseType {
memberType: MemberType[];
businessType: BusinessType[];
}
export interface UserRegister {
useType: UseType;
}
export interface ShopInfo {
id: number;
name: string;
type: number;
environment: number;
logoUrl: string;
describe: string;
state: number;
url: string;
}
export interface Web {
shopInfo: ShopInfo[];
}
export interface CountryList {
name: string;
key: string;
icon: string;
}
export interface Global {
siteId: number;
siteUrl: string;
logo: string;
countryList: CountryList[];
}
export interface RootObject {
userRegister: UserRegister;
web: Web;
global: Global;
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-13 14:08:50
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-28 11:31:13
* @LastEditTime: 2020-08-20 10:22:52
*/
export default {
......@@ -115,4 +115,8 @@ export default {
'menu.logisticsAbility.logisticsResult.orderResultSearchList': '物流单查询',
'menu.logisticsAbility.logisticsResult.orderResultDeatil': '物流单详情',
'menu.logisticsAbility.logisticsResult.toOrderComfirmList': '待确认物流单',
'menu.payandSettle': '支付',
'menu.payandSettle.paySetting': '支付方式管理',
'menu.payandSettle.paySetting.payParamsSetting': '会员支付参数配置',
};
\ No newline at end of file
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-14 15:07:34
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-08-19 10:53:33
* @LastEditTime: 2020-08-20 16:45:16
*/
import React, { Component, ReactNode, useRef, useState } from 'react'
import { history } from 'umi'
......@@ -122,7 +122,7 @@ const AddressList: React.FC<ListProps> = (props) => {
const [table, setTable] = useState([])
const [editingKey, setEditingKey] = useState('');
const toEdit = (id: number) => {
history.push(`/memberCenter/logisticsAbility/logistics/addressForm?type=${props.type}&id=${id}`)
history.push(`/memberCenter/logisticsAbility/logistics/addressForm?page_type=${props.type}&id=${id}`)
};
const columns: ColumnType<any>[] = [
{
......@@ -280,7 +280,7 @@ const AddressList: React.FC<ListProps> = (props) => {
formilyChilds={{
children: (
<>
<Button type="primary" icon={<PlusOutlined />} onClick={() => history.push(`/memberCenter/logisticsAbility/logistics/addressForm?type=${props.type}&id=0`)}>新建</Button>
<Button type="primary" icon={<PlusOutlined />} onClick={() => history.push(`/memberCenter/logisticsAbility/logistics/addressForm?page_type=${props.type}&id=0`)}>新建</Button>
</>
)
}}
......
.radio-group-box {
.ant-radio-button-wrapper {
width: 80px;
text-align: center;
}
}
\ No newline at end of file
import React, { Component, useState, useEffect } from 'react';
import { Modal, Button, Form,Radio } from 'antd'
import {
SchemaForm, SchemaMarkupField as Field,
createFormActions,
FormEffectHooks
} from '@formily/antd'
import { Input, FormMegaLayout } from '@formily/antd-components'
import { PublicApi } from '@/services/api'
export interface Params {
id?: any,
mode:number,
type?: number|string,
dialogVisible: boolean;
onCancel: Function;
onOK?: Function;
initialValues?: any;
dontReceive?: boolean; //默认展示
}
const actions = createFormActions()
const { onFieldChange$ } = FormEffectHooks
const comfirmDialog: React.FC<Params> = (props) => {
const handleCancel = () => {
}
const handletOk = (values: any) => {
let value = { ...values }
if(props.type){
value.type = props.type
}
console.log('列表',value)
props.onOK(value)
}
useEffect(() => {
return () => {
}
}, [])
const useFormEffects = () => {
const { setFieldState } = createFormActions()
}
return (
<>
<Modal
title={ props.mode === 0 ?'新增参数配置':'编辑参数配置'}
width={800}
visible={props.dialogVisible}
onOk={() => actions.submit()}
onCancel={() => props.onCancel()}
destroyOnClose
afterClose={() => actions.reset()}
okText={`确定`}
cancelText='取消'
>
<SchemaForm
labelCol={3}
components={{
Input, Radio: Radio.Group, TextArea: Input.TextArea
}}
actions={actions}
effects={() => useFormEffects()}
onSubmit={(values) => handletOk(values)}
initialValues={
props.initialValues
}
>
<Field
name='code'
title='参数代码'
required
x-component-props={{
placeholder: '',
}}
x-component="Input"
/>
<>
<Field
title='参数值'
name="value"
x-component="Input"
required
x-component-props={{
placeholder: '',
// addonBefore: ' '
}}
x-rules={{
message: ''
}}
/>
{/* <FormMegaLayout name='remarkOption' label='不接受原因' full required labelCol={2} labelAlign="top"> */}
<Field
title='参数描述'
name="describe"
x-component="TextArea"
x-component-props={{
placeholder: '最长128个字符'
}}
x-rules={{
max: 128,
// maximum:10,//最大数值
// message: '参数描述最多128个汉字'
}}
/>
</>
</SchemaForm>
</Modal>
</>
)
}
comfirmDialog.defaultProps = {
dontReceive: true,
type:1 //1.支付宝 2.支付宝转账到银行卡参数配置 3.微信
}
export default comfirmDialog
\ No newline at end of file
This diff is collapsed.
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