Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
663c8b38
authored
May 11, 2024
by
芋道源码
Committed by
GitHub
May 11, 2024
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #42 from JJBoy1995/fix-bug
【修复】商城管理首页统计数据显示问题
parents
05e6c2c2
1cf286b0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
src/utils/index.ts
+1
-1
src/views/mall/home/components/TradeTrendCard.vue
+1
-1
No files found.
src/utils/index.ts
View file @
663c8b38
...
@@ -313,7 +313,7 @@ export const fenToYuan = (price: string | number): string => {
...
@@ -313,7 +313,7 @@ export const fenToYuan = (price: string | number): string => {
*/
*/
export
const
calculateRelativeRate
=
(
value
?:
number
,
reference
?:
number
)
=>
{
export
const
calculateRelativeRate
=
(
value
?:
number
,
reference
?:
number
)
=>
{
// 防止除0
// 防止除0
if
(
!
reference
)
return
0
if
(
!
reference
||
reference
==
0
)
return
0
return
((
100
*
((
value
||
0
)
-
reference
))
/
reference
).
toFixed
(
0
)
return
((
100
*
((
value
||
0
)
-
reference
))
/
reference
).
toFixed
(
0
)
}
}
...
...
src/views/mall/home/components/TradeTrendCard.vue
View file @
663c8b38
...
@@ -186,7 +186,7 @@ const getOrderCountTrendComparison = async (
...
@@ -186,7 +186,7 @@ const getOrderCountTrendComparison = async (
dates
.
push
(
item
.
value
.
date
)
dates
.
push
(
item
.
value
.
date
)
if
(
series
.
length
===
2
)
{
if
(
series
.
length
===
2
)
{
series
[
0
].
data
.
push
(
fenToYuan
(
item
?.
value
?.
orderPayPrice
||
0
))
// 当前金额
series
[
0
].
data
.
push
(
fenToYuan
(
item
?.
value
?.
orderPayPrice
||
0
))
// 当前金额
series
[
1
].
data
.
push
(
fenToYuan
(
item
?.
value
?.
orderPayCount
||
0
)
)
// 当前数量
series
[
1
].
data
.
push
(
item
?.
value
?.
orderPayCount
||
0
)
// 当前数量
}
else
{
}
else
{
series
[
0
].
data
.
push
(
fenToYuan
(
item
?.
reference
?.
orderPayPrice
||
0
))
// 对照金额
series
[
0
].
data
.
push
(
fenToYuan
(
item
?.
reference
?.
orderPayPrice
||
0
))
// 对照金额
series
[
1
].
data
.
push
(
fenToYuan
(
item
?.
value
?.
orderPayPrice
||
0
))
// 当前金额
series
[
1
].
data
.
push
(
fenToYuan
(
item
?.
value
?.
orderPayPrice
||
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