Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dcxy-system
Project
Overview
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
姜雷
dcxy-system
Commits
7290b389
Commit
7290b389
authored
May 05, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改星期显示
parent
ccabf1e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
index.js
src/utils/index.js
+4
-4
No files found.
src/utils/index.js
View file @
7290b389
...
@@ -21,8 +21,7 @@ export function parseTime(time, cFormat) {
...
@@ -21,8 +21,7 @@ export function parseTime(time, cFormat) {
};
};
const
time_str
=
format
.
replace
(
/{
(
y|m|d|h|i|s|a
)
+}/g
,
(
result
,
key
)
=>
{
const
time_str
=
format
.
replace
(
/{
(
y|m|d|h|i|s|a
)
+}/g
,
(
result
,
key
)
=>
{
let
value
=
formatObj
[
key
];
let
value
=
formatObj
[
key
];
if
(
key
===
'a'
)
if
(
key
===
'a'
)
return
[
'日'
,
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
][
value
];
return
[
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
,
'日'
][
value
-
1
];
if
(
result
.
length
>
0
&&
value
<
10
)
{
if
(
result
.
length
>
0
&&
value
<
10
)
{
value
=
'0'
+
value
;
value
=
'0'
+
value
;
}
}
...
@@ -358,8 +357,9 @@ export const formatterMoneyToDouble = val => {
...
@@ -358,8 +357,9 @@ export const formatterMoneyToDouble = val => {
export
const
formatPrice
=
price
=>
{
export
const
formatPrice
=
price
=>
{
var
result
=
[],
var
result
=
[],
counter
=
0
;
counter
=
0
;
price
=
(
price
||
0
).
toString
().
split
(
''
);
price
=
(
price
||
0
).
toFixed
(
2
).
split
(
''
);
for
(
var
i
=
price
.
length
-
1
;
i
>=
0
;
i
--
)
{
result
.
push
(
price
.
slice
(
-
3
).
join
(
''
));
for
(
var
i
=
price
.
length
-
4
;
i
>=
0
;
i
--
)
{
counter
++
;
counter
++
;
result
.
unshift
(
price
[
i
]);
result
.
unshift
(
price
[
i
]);
if
(
!
(
counter
%
3
)
&&
i
!=
0
)
{
if
(
!
(
counter
%
3
)
&&
i
!=
0
)
{
...
...
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