Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
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
project
jinfa-admin
Commits
da792376
Commit
da792376
authored
Sep 10, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接完已有接口
parent
2bffb388
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
88 additions
and
49 deletions
+88
-49
index.ts
src/constants/index.ts
+3
-0
addEquity.tsx
src/pages/member/memberLevel/addEquity.tsx
+3
-1
addMember.tsx
src/pages/member/memberMaintain/addMember.tsx
+0
-0
index.tsx
src/pages/member/memberMaintain/schema/index.tsx
+66
-40
auditPr1.tsx
src/pages/member/memberPr1/auditPr1.tsx
+4
-2
auditPr2.tsx
src/pages/member/memberPr2/auditPr2.tsx
+4
-2
auditPrComfirm.tsx
src/pages/member/memberPrConfirm/auditPrComfirm.tsx
+4
-2
auditPrSubmit.tsx
src/pages/member/memberPrSubmit/auditPrSubmit.tsx
+4
-2
No files found.
src/constants/index.ts
View file @
da792376
...
...
@@ -82,6 +82,9 @@ export const STATUS_ENUM = [
}
]
// 1是阿里云oss服务器, 2是本地文件服务器
export
const
UPLOAD_TYPE
=
isDev
?
2
:
1
// 会员规则类型
export
const
VIP_RULE_TRANSACTION
=
1
;
// 交易
export
const
VIP_RULE_LOGIN
=
2
;
// 登录
...
...
src/pages/member/memberLevel/addEquity.tsx
View file @
da792376
...
...
@@ -172,9 +172,11 @@ const addEquity: React.FC<[]> = () => {
setSubmitLoading
(
true
);
try
{
const
res
=
await
Promise
.
all
(
promises
);
const
resArr
=
await
Promise
.
all
(
promises
);
if
(
resArr
.
every
(
item
=>
item
&&
item
.
code
===
1000
))
{
message
.
success
(
'保存成功'
);
getMemberLevelInfo
();
}
}
catch
(
errInfo
)
{
}
...
...
src/pages/member/memberMaintain/addMember.tsx
View file @
da792376
This diff is collapsed.
Click to expand it.
src/pages/member/memberMaintain/schema/index.tsx
View file @
da792376
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
UPLOAD_TYPE
}
from
'@/constants'
;
import
{
PATTERN_MAPS
}
from
'@/constants/regExp'
;
export
const
importSchema
:
ISchema
=
{
type
:
'object'
,
...
...
@@ -154,44 +156,59 @@ export const auditModalSchema: ISchema = {
},
};
const
getCompnentValue
=
(
elements
:
any
)
=>
{
let
components
=
{};
for
(
let
item
of
elements
)
{
let
xComponentProps
=
item
.
fieldType
===
'string'
?
{
const
FIELD_TYPE_MAP
=
{
'string'
:
'string'
,
'long'
:
'string'
,
'upload'
:
'customUpload'
,
};
const
getXComponentProps
=
(
type
,
item
)
=>
{
const
MAP
=
{
'string'
:
{
placeholder
:
item
.
fieldRemark
,
}
:
{
},
'upload'
:
{
listType
:
'card'
,
action
:
'/api/file/file/upload'
,
data
:
{
fileType
:
2
},
data
:
{
fileType
:
UPLOAD_TYPE
},
fileList
:
[],
onChange
:
file
=>
console
.
log
(
file
),
},
};
return
MAP
[
type
];
};
const
getCompnentValue
=
(
elements
:
any
)
=>
{
const
components
=
{};
for
(
let
item
of
elements
)
{
// 先判断是否存在 type,防止不存在的 type 报错
const
realType
=
FIELD_TYPE_MAP
[
item
.
fieldType
];
if
(
realType
)
{
components
[
item
.
fieldName
]
=
{
type
:
item
.
fieldType
,
type
:
FIELD_TYPE_MAP
[
item
.
fieldType
]
,
required
:
item
.
fieldEmpty
===
0
,
title
:
item
.
fieldCNName
,
'x-component-props'
:
xComponentProps
,
'x-component-props'
:
getXComponentProps
(
realType
,
item
)
,
};
}
}
return
components
;
};
export
const
initDetailSchema
=
(
props
:
any
)
=>
{
let
tabSchema
=
{
let
tabSchema
:
ISchema
=
{
properties
:
{
'tab-1'
:
{
type
:
'object'
,
'x-component'
:
'
tabp
ane'
,
'x-component'
:
'
TabP
ane'
,
'x-component-props'
:
{
tab
:
'基本信息'
,
},
properties
:
{
MEGA_LAYOUT1
:
{
type
:
'object'
,
'x-component'
:
'
mega-l
ayout'
,
'x-component'
:
'
Mega-L
ayout'
,
'x-component-props'
:
{
labelCol
:
4
,
wrapperCol
:
8
,
...
...
@@ -215,8 +232,11 @@ export const initDetailSchema = (props: any) => {
'x-component-props'
:
{
placeholder
:
'请选择'
,
},
'x-props'
:
{
hasFeedback
:
true
,
},
level
:
{
},
levelId
:
{
type
:
'string'
,
required
:
true
,
title
:
'会员等级'
,
...
...
@@ -224,25 +244,20 @@ export const initDetailSchema = (props: any) => {
'x-component-props'
:
{
placeholder
:
'请选择'
,
},
'x-props'
:
{
hasFeedback
:
true
,
},
},
MEGA_LAYOUT1_1
:
{
type
:
'object'
,
'x-component'
:
'
mega-l
ayout'
,
'x-component'
:
'
Mega-L
ayout'
,
'x-component-props'
:
{
label
:
'注册手机'
,
wrapperCol
:
24
,
required
:
true
,
inline
:
true
,
},
properties
:
{
MEGA_LAYOUT1_1_1
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
grid
:
true
,
full
:
true
,
},
properties
:
{
telCode
:
{
countryCodeId
:
{
type
:
'string'
,
enum
:
[],
'x-component-props'
:
{
...
...
@@ -250,23 +265,32 @@ export const initDetailSchema = (props: any) => {
},
required
:
true
,
},
tel
:
{
phone
:
{
type
:
'string'
,
'x-mega-props'
:
{
span
:
2
},
required
:
true
,
'x-component-props'
:
{
placeholder
:
'请输入你的手机号码'
,
maxLength
:
11
,
},
required
:
true
,
},
'x-rules'
:
[
{
pattern
:
PATTERN_MAPS
.
phone
,
message
:
'请输入正确格式的手机号'
,
},
],
},
},
},
memberE
mail
:
{
e
mail
:
{
type
:
'string'
,
title
:
'邮箱'
,
'x-component-props'
:
{},
'x-rules'
:
[
{
pattern
:
PATTERN_MAPS
.
email
,
message
:
'请输入正确格式的邮箱'
,
},
],
},
},
},
...
...
@@ -275,18 +299,18 @@ export const initDetailSchema = (props: any) => {
},
};
if
(
Object
.
keys
(
props
).
length
>
0
)
{
for
(
let
[
index
,
item
]
of
props
.
groups
.
entries
())
{
tabSchema
.
properties
[
`tab-
${
index
+
2
}
`
]
=
{
if
(
Array
.
isArray
(
props
)
)
{
for
(
let
[
index
,
item
]
of
props
.
entries
())
{
tabSchema
.
properties
!
[
`tab-
${
index
+
2
}
`
]
=
{
type
:
'object'
,
'x-component'
:
'
tabp
ane'
,
'x-component'
:
'
TabP
ane'
,
'x-component-props'
:
{
tab
:
item
.
groupName
,
},
properties
:
{
[
`MEGA_LAYOUT
${
index
+
2
}
`
]:
{
type
:
'object'
,
'x-component'
:
'
mega-l
ayout'
,
'x-component'
:
'
Mega-L
ayout'
,
'x-component-props'
:
{
labelCol
:
4
,
wrapperCol
:
8
,
...
...
@@ -299,13 +323,15 @@ export const initDetailSchema = (props: any) => {
}
}
let
detailSchema
=
{
let
detailSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
REPOSIT_TABS
:
{
tabs
:
{
type
:
'object'
,
'x-component'
:
'tab'
,
'x-component-props'
:
{},
'x-component'
:
'Tab'
,
'x-component-props'
:
{
type
:
'card'
,
},
...
tabSchema
,
},
},
...
...
src/pages/member/memberPr1/auditPr1.tsx
View file @
da792376
...
...
@@ -237,12 +237,14 @@ const AuditPr1: React.FC<QueryProps> = props => {
}),
];
Promise
.
all
(
promises
).
then
(
res
=>
{
setConfirmLoading
(
false
);
Promise
.
all
(
promises
).
then
(
res
Arr
=>
{
if
(
resArr
.
every
(
item
=>
item
&&
item
.
code
===
1000
))
{
setTimeout
(()
=>
{
history
.
goBack
();
},
800
);
setModalVisible
(
false
);
}
setConfirmLoading
(
false
);
}).
catch
(()
=>
{
setConfirmLoading
(
false
);
});
...
...
src/pages/member/memberPr2/auditPr2.tsx
View file @
da792376
...
...
@@ -237,12 +237,14 @@ const AuditPr2: React.FC<QueryProps> = props => {
}),
];
Promise
.
all
(
promises
).
then
(
res
=>
{
setConfirmLoading
(
false
);
Promise
.
all
(
promises
).
then
(
res
Arr
=>
{
if
(
resArr
.
every
(
item
=>
item
&&
item
.
code
===
1000
))
{
setTimeout
(()
=>
{
history
.
goBack
();
},
800
);
setModalVisible
(
false
);
}
setConfirmLoading
(
false
);
}).
catch
(()
=>
{
setConfirmLoading
(
false
);
});
...
...
src/pages/member/memberPrConfirm/auditPrComfirm.tsx
View file @
da792376
...
...
@@ -237,12 +237,14 @@ const AuditPrComfirm: React.FC<QueryProps> = props => {
}),
];
Promise
.
all
(
promises
).
then
(
res
=>
{
setConfirmLoading
(
false
);
Promise
.
all
(
promises
).
then
(
res
Arr
=>
{
if
(
resArr
.
every
(
item
=>
item
&&
item
.
code
===
1000
))
{
setTimeout
(()
=>
{
history
.
goBack
();
},
800
);
setModalVisible
(
false
);
}
setConfirmLoading
(
false
);
}).
catch
(()
=>
{
setConfirmLoading
(
false
);
});
...
...
src/pages/member/memberPrSubmit/auditPrSubmit.tsx
View file @
da792376
...
...
@@ -237,12 +237,14 @@ const AuditPrSubmit: React.FC<QueryProps> = props => {
}),
];
Promise
.
all
(
promises
).
then
(
res
=>
{
setConfirmLoading
(
false
);
Promise
.
all
(
promises
).
then
(
res
Arr
=>
{
if
(
resArr
.
every
(
item
=>
item
&&
item
.
code
===
1000
))
{
setTimeout
(()
=>
{
history
.
goBack
();
},
800
);
setModalVisible
(
false
);
}
setConfirmLoading
(
false
);
}).
catch
(()
=>
{
setConfirmLoading
(
false
);
});
...
...
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