Commit b8c29d42 authored by 前端-许佳敏's avatar 前端-许佳敏

更换service文件

parent c0db64a0
{"userRegister":{"useType":{"memberType":[{"id":1,"typeName":"企业会员"},{"id":2,"typeName":"个人会员"},{"id":3,"typeName":"渠道企业会员"},{"id":4,"typeName":"渠道个人会员"}],"businessType":[{"id":1,"typeName":"new11"},{"id":2,"typeName":"王者农药"}]},"useDetail":[{"groupName":"企业组","elements":[{"id":2,"fieldName":"company","fieldCNName":"企业","fieldType":null,"fieldLength":10,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]}]},{"groupName":"企业信息","elements":[{"id":3,"fieldName":"company_name","fieldCNName":"公司名称","fieldType":null,"fieldLength":128,"fieldEmpty":1,"fieldOrder":1,"fieldRemark":"","checkRules":[]},{"id":4,"fieldName":"company_type","fieldCNName":"公司类型","fieldType":null,"fieldLength":128,"fieldEmpty":0,"fieldOrder":2,"fieldRemark":"","checkRules":[]}]},{"groupName":"444","elements":[{"id":1,"fieldName":"444","fieldCNName":"44","fieldType":null,"fieldLength":44,"fieldEmpty":1,"fieldOrder":44,"fieldRemark":null,"checkRules":[]}]}]},"global":{"logo":"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/logo.png","countryList":[{"name":"简体中文-ZH","key":"cn","icon":"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/china.png"},{"name":"English-EN","key":"en","icon":"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/us.png"},{"name":"日本語-JP","key":"jp","icon":"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/japen.png"},{"name":"한국어-KO","key":"ko","icon":"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/koren.png"}]}}
{"userRegister":{"useType":{"memberType":[{"id":1,"typeName":"企业会员"},{"id":2,"typeName":"个人会员"},{"id":3,"typeName":"渠道企业会员"},{"id":4,"typeName":"渠道个人会员"}],"businessType":[{"id":1,"typeName":"商品销售"},{"id":2,"typeName":"加工服务"},{"id":3,"typeName":"物流服务"},{"id":4,"typeName":"金融服务"},{"id":5,"typeName":"保险服务"},{"id":6,"typeName":"采购"}]},"useDetail":[{"groupName":"联系信息","elements":[{"id":62,"fieldName":"contact","fieldCNName":"联系人","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]},{"id":63,"fieldName":"fixed_contact_number","fieldCNName":"固定联系电话","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]},{"id":64,"fieldName":"phone_number","fieldCNName":"手机号码","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]},{"id":65,"fieldName":"fax_number","fieldCNName":"传真号码","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]},{"id":66,"fieldName":"address","fieldCNName":"地址","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]},{"id":67,"fieldName":"zip_code","fieldCNName":"邮编","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]},{"id":68,"fieldName":"url","fieldCNName":"网址","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]},{"id":69,"fieldName":"email","fieldCNName":"邮箱","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]}]},{"groupName":"营业执照信息","elements":[{"id":47,"fieldName":"enterprise_type","fieldCNName":"企业类型","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]},{"id":48,"fieldName":"residence","fieldCNName":"住所","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]},{"id":49,"fieldName":"legal_representative","fieldCNName":"法定代表人","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]},{"id":50,"fieldName":"register_capital","fieldCNName":"注册资本","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]},{"id":51,"fieldName":"establish_date","fieldCNName":"成立日期","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]},{"id":52,"fieldName":"business_term","fieldCNName":"营业期限","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]},{"id":53,"fieldName":"business_scope","fieldCNName":"经营范围","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]},{"id":54,"fieldName":"registration_authority","fieldCNName":"登记机关","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]},{"id":55,"fieldName":"registration_time","fieldCNName":"登记时间","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]},{"id":56,"fieldName":"unified_social_credit_code","fieldCNName":"统一社会信用代码","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]},{"id":57,"fieldName":"business_license","fieldCNName":"营业执照","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]}]},{"groupName":"填写会员基本信息","elements":[{"id":38,"fieldName":"member_type","fieldCNName":"会员类型","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]},{"id":39,"fieldName":"MEMBER_ROLE","fieldCNName":"会员角色","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]},{"id":40,"fieldName":"member_level","fieldCNName":"会员等级","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]},{"id":41,"fieldName":"REGISTER_PHONE","fieldCNName":"注册手机号","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]},{"id":42,"fieldName":"register_email","fieldCNName":"注册邮箱","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]}]},{"groupName":"法定代表人信息","elements":[{"id":60,"fieldName":"legal_id_card","fieldCNName":"法人身份证号","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]},{"id":61,"fieldName":"legal_id_card_information","fieldCNName":"法人身份证信息","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]},{"id":58,"fieldName":"legal_name","fieldCNName":"法人姓名","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]},{"id":59,"fieldName":"legal_phone","fieldCNName":"法人手机号","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]}]},{"groupName":"企业信息","elements":[{"id":3,"fieldName":"company_name","fieldCNName":"公司名称","fieldType":null,"fieldLength":128,"fieldEmpty":1,"fieldOrder":1,"fieldRemark":"","checkRules":[]},{"id":4,"fieldName":"company_type","fieldCNName":"公司类型","fieldType":null,"fieldLength":128,"fieldEmpty":0,"fieldOrder":2,"fieldRemark":"","checkRules":[]}]},{"groupName":"填写渠道信息","elements":[{"id":43,"fieldName":"channel_level","fieldCNName":"渠道级别","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]},{"id":44,"fieldName":"channel_type","fieldCNName":"渠道类型","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]},{"id":45,"fieldName":"agent_city","fieldCNName":"代理地市","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]},{"id":46,"fieldName":"channel_describe","fieldCNName":"渠道描述","fieldType":null,"fieldLength":100,"fieldEmpty":0,"fieldOrder":1,"fieldRemark":"test","checkRules":[]}]},{"groupName":"444","elements":[{"id":1,"fieldName":"444","fieldCNName":"44","fieldType":null,"fieldLength":44,"fieldEmpty":1,"fieldOrder":44,"fieldRemark":null,"checkRules":[]}]}]},"global":{"logo":"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/logo.png","countryList":[{"name":"简体中文-ZH","key":"cn","icon":"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/china.png"},{"name":"English-EN","key":"en","icon":"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/us.png"},{"name":"日本語-JP","key":"jp","icon":"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/japen.png"},{"name":"한국어-KO","key":"ko","icon":"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/koren.png"}]}}
......@@ -17,7 +17,7 @@ export default defineConfig({
},
routes,
extraBabelPlugins: [
['import', { libraryName: 'antd', libraryDirectory: 'es', style: true }, 'antd'],
// ['import', { libraryName: 'antd', libraryDirectory: 'es', style: true }, 'antd'],
['import', { libraryName: 'god', libraryDirectory: 'es', style: true }, 'god']
],
history: {
......
{
"name": "god-template",
"scripts": {
"api": "god-ytt",
"scripts:build": "node scripts/run",
"start:analyze": "ANALYZE=1 umi dev",
"start": "umi dev",
"start": "yarn scripts:build && umi dev",
"build": "umi build",
"build:analyze": "ANALYZE=1 umi build",
"postinstall": "umi generate tmp",
......@@ -45,6 +46,7 @@
"chalk": "^4.1.0",
"clone": "^2.1.2",
"fs-extra": "^9.0.1",
"god-yapi2ts": "^1.5.0",
"gulp": "^4.0.2",
"json2ts": "^0.0.7",
"ora": "^4.0.4"
......
......@@ -2,7 +2,7 @@ import { IRoutes } from '.';
import { history, RequestConfig } from 'umi';
import React from 'react'
import MobxProvider from './store'
import '@/global/styles/reset.less'; // 重置antd样式
import '@/global/styles/global.less'; // 导入全局样式
// 默认引入所有的ant样式, 不引入css因为无法做到变量覆盖
......
......@@ -94,4 +94,12 @@ h1, h2, h3, h4, h5, h6 {
// 间距
.mr_t-40 {
margin-top: 40px;
}
#registerForm {
.ant-input-group-addon {
padding: 0;
border: none;
background: none;
}
}
\ No newline at end of file
@import './mixins/layout.less';
#root {
.identityRadio{
display: flex;
flex-direction: column;
margin: 0 auto;
.make-center(text);
& label{
width: 320px;
height: 48px;
.make-center-space(margin, 12);
vertical-align: middle;
line-height: 48px;
}
}
.businessRadio{
display: flex;
flex-wrap: wrap;
width: 320px;
.make-center(margin);
.make-center(text);
& label{
width: 148px;
height: 32px;
line-height: 32px;
margin: 8px 0;
}
& label:nth-child(odd) {
margin-right: 24px;
}
}
}
\ No newline at end of file
......@@ -40,7 +40,7 @@ const LoginWrap: React.FC = () => {
onFinish={finish}
>
<Form.Item
name='username'
name='account'
rules={
[
{
......
......@@ -152,35 +152,7 @@
height: 40px;
.make-center-space(margin, 8);
}
.identityRadio{
display: flex;
flex-direction: column;
margin: 0 auto;
.make-center(text);
& label{
width: 320px;
height: 48px;
.make-center-space(margin, 12);
vertical-align: middle;
line-height: 48px;
}
}
.businessRadio{
display: flex;
flex-wrap: wrap;
width: 320px;
.make-center(margin);
.make-center(text);
& label{
width: 148px;
height: 32px;
line-height: 32px;
margin: 8px 0;
}
& label:nth-child(odd) {
margin-right: 24px;
}
}
.formBoxStep3{
width: 704px;
......
......@@ -40,7 +40,7 @@ let formCache: any = {}
const CustomCheckbox = props => {
const { layout } = props
return (
<Radio.Group value={props.value} onChange={props.onChange} className={layout === 'column' ? styles.identityRadio : styles.businessRadio} name={props.name}>
<Radio.Group value={props.value} onChange={props.onChange} className={layout === 'column' ? 'identityRadio' : 'businessRadio'} name={props.name}>
{
props.dataSource && props.dataSource.map((v, i) => <Radio.Button value={v.value} key={v.value + i}>{v.label}</Radio.Button>)
}
......@@ -49,11 +49,10 @@ const CustomCheckbox = props => {
}
const CustomInput = props => {
const { help } = props
const { help, ...restProps } = props
return (
<AntdInput
value={props.value}
onChange={props.onChange}
{...restProps}
addonAfter={help ? <Tooltip title={help}><QuestionCircleOutlined style={{color: '#6B778C', marginLeft: 5}}/></Tooltip> : undefined}
/>
)
......@@ -142,18 +141,18 @@ const UserRegistry = () => {
// clearInterval(timeChange)
// handleRegisterTypeList()
// }, [])
// useEffect(() => {
// console.log(current)
// if(current === 2) runTimerJump()
// }, [current])
// useEffect(() => {
// if(time === 0){
// clearInterval(timeChange)
// setTime(60)
// history.push('/user/login')
// console.log('执行登录跳转!')
// }
// }, [time])
useEffect(() => {
console.log(current)
if(current === 3) runTimerJump()
}, [current])
useEffect(() => {
if(time === 0){
clearInterval(timeChange)
setTime(60)
history.push('/user/login')
console.log('执行登录跳转!')
}
}, [time])
const runTimerJump = () => {
timeChange = setInterval(() => setTime(t => --t), 1000)
}
......@@ -219,6 +218,7 @@ const UserRegistry = () => {
}
})
// @todo 注册成功后 交互功能未完成
const submitForm = () => {
actions.submit().then(data => {
const { values } = data
......@@ -227,7 +227,8 @@ const UserRegistry = () => {
formCache.countryCode = '+86'
const params = omit(formCache, ['isRead', 'confirmPassword'])
postUserRegister(params).then(() => {
console.log('register success')
actions.dispatch('onFormStepNext', {})
setCurrent(current + 1)
})
})
}
......@@ -291,9 +292,36 @@ const UserRegistry = () => {
{
v.elements.map(field => {
// 字段类型暂时为null, 所以固定为input
return (
<Field x-mega-props={{span: 1}} name={field.fieldName} key={field.fieldName} x-component-props={{ help: field.fieldRemark}} x-component='CustomInput'></Field>
)
switch(field.fieldType) {
case 'file': return (
<Field
x-mega-props={{span: 1}}
name={field.fieldName}
key={field.fieldName}
title={field.fieldCNName}
x-component-props={{ listType: 'text'}}
x-component='Upload'
>
</Field>
)
default : return (
<Field
x-mega-props={{span: 1}}
name={field.fieldName}
key={field.fieldName}
required={field.fieldEmpty === 0}
x-rules={field.checkRules.map(v => {
return {
message: v.msg,
pattern: v.rulePattern
}
})}
x-component-props={{ help: field.fieldRemark, placeholder: `请输入${field.fieldCNName}`}}
x-component='CustomInput'
>
</Field>
)
}
})
}
</FormMegaLayout>
......@@ -303,27 +331,44 @@ const UserRegistry = () => {
}
</Field>
</FormMegaLayout>
<FormButtonGroup className={styles.registerForm}>
{
current === 0 &&
<Button type='primary' className={styles.continueButton} onClick={handleActionBtn}>同意协议并注册</Button>
}
{
current === 1 &&
<Button type='primary' className={styles.continueButton} onClick={() => {
actions.submit().then(data => {
const { values } = data
formCache = values
setCurrent(current + 1)
})
}}>下一步:继续完善</Button>
}
{
current === 2 &&
<Button type='primary' className={styles.continueButton} onClick={submitForm}>提交注册资料</Button>
}
</FormButtonGroup>
</SchemaForm>
<div className={styles.registerForm}>
{
current === 0 &&
<Button type='primary' className={styles.continueButton} onClick={handleActionBtn}>同意协议并注册</Button>
}
{
current === 1 &&
<Button type='primary' className={styles.continueButton} onClick={() => {
actions.submit().then(data => {
const { values } = data
formCache = values
setCurrent(current + 1)
})
}}>下一步:继续完善</Button>
}
{
current === 2 &&
<Button type='primary' className={styles.continueButton} onClick={submitForm}>提交注册资料</Button>
}
</div>
{
current === 3 &&
<div className={styles.formBoxStep3}>
<img src={im_success} alt="待审核"/>
<h2>您的注册资料已经提交成功,请等待平台审核</h2>
<div className={styles.description}>
<p>审核结果会以短信通知您</p>
<p>您也可以登录平台查看审核结果</p>
</div>
<p className={styles.guid}>
<span>{time}s 后自动跳转至登录页</span>
<br />
<span><Link to="/user/login">立即跳转</Link></span>
</p>
</div>
}
<Row justify='center' align='middle'>
已有平台账号?<Button type='link' onClick={handleJumpLogin}>去登陆</Button>
</Row>
......@@ -331,57 +376,6 @@ const UserRegistry = () => {
</div>
</div>
)
return (
<div className={cx(styles.register, globalStyles.lingxiBusinessContent1024)}>
<h3>欢迎您注册数商云账号</h3>
<div className={cx(styles.registerBox, globalStyles.lingxiBusinessMarginContent)}>
<Steps current={current} className={styles.stepWrap} size='small'>
{
stepList.map((v,i) => <Step title={v.title} key={v.key} onClick={() => {setCurrent(i)}}/>)
}
</Steps>
{
current === 1 && <div className={styles.formBoxStep2}>
<FormPage
renderFormLists={identityFormData}
onSubmit={handleSecondSubmit}
>
</FormPage>
</div>
}
{
current === 1.1 && <div className={styles.formBoxStep2}>
<FormPage
renderFormLists={licenseFormData}
onSubmit={handleLicenseSubmit}
formProps={{
...formItemLayout,
labelAlign: 'left',
colon: false
}}
>
</FormPage>
</div>
}
{
current === 2 && <div className={styles.formBoxStep3}>
<img src={im_success} alt="待审核"/>
<h2>您的注册资料已经提交成功,请等待平台审核</h2>
<div className={styles.description}>
<p>审核结果会以短信通知您</p>
<p>您也可以登录平台查看审核结果</p>
</div>
<p className={styles.guid}>
<span>{time}s 后自动跳转至登录页</span>
<br />
<span><Link to="/user/login">立即跳转</Link></span>
</p>
</div>
}
</div>
</div>
)
}
export default UserRegistry
\ No newline at end of file
declare namespace API {
}
\ No newline at end of file
// 用于表格数据时的模型定义
export interface ApiListData<T> {
data: T[],
totalCount: number
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
declare namespace LogisticsApi {
interface RegisterTypeDTO{
}
}
\ No newline at end of file
import request from '@/utils/request';
/**
* @description 物流公司
* @param
*/
export async function getCompanyList(params: LogisticsApi.RegisterTypeDTO) {
return request('', {
method: 'get',
data: params
})
}
\ No newline at end of file
declare namespace MemberApi {
interface RegisterBasicDTO {
phone: string;
smsCode: string;
password: string;
email: string;
}
interface RegisterBasicModel {
id: number;
}
interface RegisterTypeDTO {
id: number;
typeId: number;
businessTypeId: number;
}
interface MemberTypeItem {
id: number;
typeName: string;
}
interface BusinessTypeItem {
id: number;
businessTypeName: string;
}
interface RegisterTypeModel {
memberType: MemberTypeItem[];
businessType: BusinessTypeItem[];
}
interface CheckRulesItem {
id: number;
ruleName: string;
ruleType: string;
rulePattern: RegExp;
msg: string;
}
interface RegisterElementItem {
id: number;
fieldName: string;
fieldCNName: string;
fieldType: string;
fieldLength: number;
fieldEmpty: number;
fieldOrder: number;
fieldRemark: string;
checkRules: CheckRulesItem[];
}
interface RegisterDetailElementModel{
groupName: string;
elements: RegisterElementItem[];
}
}
\ No newline at end of file
import request from '@/utils/request';
const prefix = '/member/merchant'
/**
* @description 用户基础注册接口
* @param {MemberApi.RegisterBasicModel} params
*/
export async function postMemberRegister(params: MemberApi.RegisterBasicDTO) {
return request<MemberApi.RegisterBasicModel>('/member/register/basic', {
prefix,
method: 'post',
data: params
})
}
/**
* @description 用户会员注册 获取会员/业务类型
*
*/
export async function getRegisterTypeList() {
return request<MemberApi.RegisterTypeModel>('/menu/member/register/type', {
prefix
})
}
/**
* @description 用户会员注册 提交会员类型业务类型
* @param {MemberApi.RegisterTypeDTO}
*/
export async function postMemberRegisterType(params: MemberApi.RegisterTypeDTO) {
return request('/member/register/type', {
prefix,
method: 'post',
data: params
})
}
/**
* @description 获取注册详情页 element元素数据
*
*/
export async function getRegisterElementList() {
return request<MemberApi.RegisterDetailElementModel>('/menu/member/register/detail', {
prefix
})
}
/**
* @description 用户会员注册 提交注册详情
* @param {T}
*/
export async function postMemberRegisterDetail<T>(params: T) {
return request('/member/register/detail', {
prefix,
method: 'post',
data: params
})
}
\ No newline at end of file
declare namespace UpgradeRuleApi {
interface UpgradeRuleItem {
page: number;
rows: number;
}
}
\ No newline at end of file
import request from '@/utils/request';
const prefix = '/member/promotion'
/**
* @description 会员升级规则-列表
*
*/
export async function getUpgradeRuleList(params: any) {
return request('/rule/list', {
prefix,
params
})
}
\ No newline at end of file
declare namespace UserModalApi {
interface registerModal {
countryCode: string;
phone: string;
smsCode: string;
password: string;
email?: string;
typeId: number;
businessTypeId: number;
detail: {
[key: string]: any
}
}
}
\ No newline at end of file
import request from '@/utils/request';
const prefix = '/member/merchant'
/**
* @description 用户基础注册接口
* @param {MemberApi.RegisterBasicModel} params
* @todo 注册接口
*/
export async function postUserRegister(params: UserModalApi.registerModal) {
return request('/member/register', {
method: 'post',
data: params
})
}
\ No newline at end of file
import { Config } from 'god-yapi2ts'
const tokens = [
'b063a0a29fb1a570d9f00eaabbdd8ccfe8e6e10e24739441990cc1098e79b601', // 业务中台管理平台
'7c8f235d95f6224ceb97c4d832b09658f9a75fb8721a95699b230af0733d7fa4', // 仓库服务
'8d14d945507d1f8cd89afe139ca6d111bbad25f702fafe0aec59d3c9cd2e0ffe', // 物流服务
'3a46198c5b97ac7147e5b07ad2dff5ac5c93c1afed47e1911961db87149e6ebf', // 商户会员管理服务
'efe99e20ed1375dc0db3e809e4fc7692f42ecebaf60cd77e65c50ed65d6ba6c4', // 商品服务
]
const genMap = (tokens) => {
return tokens.map(v => {
return {
token: v,
categories: [
{
id: 0,
getRequestFunctionName(interfaceInfo, changeCase) {
return changeCase.camelCase(interfaceInfo.method + interfaceInfo.path)
},
},
]
}
})
}
const config: Config = [
{
serverUrl: 'http://10.0.0.25:4000/',
typesOnly: false,
reactHooks: {
enabled: false,
},
outputFilePath: 'src/services/index.ts',
requestFunctionFilePath: 'request.ts',
dataKey: 'data',
projects: genMap(tokens),
},
]
export default config
\ 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