Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
account-book
Project
Project
Details
Activity
Releases
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
刘文虎
account-book
Commits
74bcf119
Commit
74bcf119
authored
Oct 31, 2022
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 数字处理bug
parent
4919fa79
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
index.vue
pages/index/index.vue
+8
-1
common.js
utils/common.js
+2
-2
No files found.
pages/index/index.vue
View file @
74bcf119
...
@@ -330,6 +330,13 @@ export default {
...
@@ -330,6 +330,13 @@ export default {
if
(
this
.
checkToken
())
{
if
(
this
.
checkToken
())
{
this
.
monthRecord
();
this
.
monthRecord
();
this
.
bookRecord
();
this
.
bookRecord
();
}
else
{
setTimeout
(()
=>
{
if
(
this
.
freshing
)
{
this
.
triggered
=
false
;
this
.
freshing
=
false
;
}
},
1500
)
}
}
},
},
async
getWeather
()
{
async
getWeather
()
{
...
@@ -396,7 +403,7 @@ export default {
...
@@ -396,7 +403,7 @@ export default {
})
})
.
catch
(
res
=>
{});
.
catch
(
res
=>
{});
},
},
bookRecord
()
{
bookRecord
()
{
bookRecord
({})
bookRecord
({})
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
res
.
data
)
{
if
(
res
.
data
)
{
...
...
utils/common.js
View file @
74bcf119
...
@@ -639,11 +639,11 @@ export function formatCount(count) {
...
@@ -639,11 +639,11 @@ export function formatCount(count) {
string
+=
'00'
string
+=
'00'
var
num
=
0
var
num
=
0
if
(
Number
(
string
.
substring
(
index
+
3
,
index
+
4
)
||
0
)
>=
5
)
{
if
(
Number
(
string
.
substring
(
index
+
3
,
index
+
4
)
||
0
)
>=
5
)
{
num
=
0.0
1
num
=
1
}
}
string
=
string
.
substring
(
0
,
index
+
3
)
string
=
string
.
substring
(
0
,
index
+
3
)
if
(
num
>
0
)
{
if
(
num
>
0
)
{
return
formatCount
(
Number
(
string
)
+
num
)
return
formatCount
(
Math
.
round
(
Number
(
string
)
*
100
+
num
)
/
100
)
}
}
}
else
{
}
else
{
string
+=
'.00'
string
+=
'.00'
...
...
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