Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
37221294
Commit
37221294
authored
Jun 25, 2018
by
yoyo837
Committed by
陈帅
Jun 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prettier
parent
bfda5fe2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
src/utils/request.js
src/utils/request.js
+5
-1
src/utils/utils.js
src/utils/utils.js
+4
-4
No files found.
src/utils/request.js
View file @
37221294
...
...
@@ -47,7 +47,11 @@ export default function request(url, options) {
credentials
:
'
include
'
,
};
const
newOptions
=
{
...
defaultOptions
,
...
options
};
if
(
newOptions
.
method
===
'
POST
'
||
newOptions
.
method
===
'
PUT
'
||
newOptions
.
method
===
'
DELETE
'
)
{
if
(
newOptions
.
method
===
'
POST
'
||
newOptions
.
method
===
'
PUT
'
||
newOptions
.
method
===
'
DELETE
'
)
{
if
(
!
(
newOptions
.
body
instanceof
FormData
))
{
newOptions
.
headers
=
{
Accept
:
'
application/json
'
,
...
...
src/utils/utils.js
View file @
37221294
...
...
@@ -74,15 +74,15 @@ function accMul(arg1, arg2) {
let
m
=
0
;
const
s1
=
arg1
.
toString
();
const
s2
=
arg2
.
toString
();
m
+=
s1
.
split
(
"
.
"
).
length
>
1
?
s1
.
split
(
"
.
"
)[
1
].
length
:
0
;
m
+=
s2
.
split
(
"
.
"
).
length
>
1
?
s2
.
split
(
"
.
"
)[
1
].
length
:
0
;
return
Number
(
s1
.
replace
(
"
.
"
,
""
))
*
Number
(
s2
.
replace
(
"
.
"
,
""
))
/
10
**
m
;
m
+=
s1
.
split
(
'
.
'
).
length
>
1
?
s1
.
split
(
'
.
'
)[
1
].
length
:
0
;
m
+=
s2
.
split
(
'
.
'
).
length
>
1
?
s2
.
split
(
'
.
'
)[
1
].
length
:
0
;
return
(
Number
(
s1
.
replace
(
'
.
'
,
''
))
*
Number
(
s2
.
replace
(
'
.
'
,
''
)
))
/
10
**
m
;
}
export
function
digitUppercase
(
n
)
{
const
fraction
=
[
'
角
'
,
'
分
'
];
const
digit
=
[
'
零
'
,
'
壹
'
,
'
贰
'
,
'
叁
'
,
'
肆
'
,
'
伍
'
,
'
陆
'
,
'
柒
'
,
'
捌
'
,
'
玖
'
];
const
unit
=
[[
'
元
'
,
'
万
'
,
'
亿
'
],[
''
,
'
拾
'
,
'
佰
'
,
'
仟
'
,
'
万
'
]];
const
unit
=
[[
'
元
'
,
'
万
'
,
'
亿
'
],
[
''
,
'
拾
'
,
'
佰
'
,
'
仟
'
,
'
万
'
]];
let
num
=
Math
.
abs
(
n
);
let
s
=
''
;
fraction
.
forEach
((
item
,
index
)
=>
{
...
...
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