Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wx-boss
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
姜雷
wx-boss
Commits
874c3fc6
Commit
874c3fc6
authored
Dec 03, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into test
parents
e1146d3d
00d1515c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
7 deletions
+41
-7
userGrowth.js
miniprogram/pages/userGrowth/userGrowth.js
+0
-0
userGrowth.ts
miniprogram/pages/userGrowth/userGrowth.ts
+39
-6
userGrowth.wxml
miniprogram/pages/userGrowth/userGrowth.wxml
+2
-1
No files found.
miniprogram/pages/userGrowth/userGrowth.js
View file @
874c3fc6
This diff is collapsed.
Click to expand it.
miniprogram/pages/userGrowth/userGrowth.ts
View file @
874c3fc6
...
...
@@ -18,6 +18,7 @@ Page({
areaName
:
''
,
areaList
:
[],
growthList
:
[],
activateList
:
[],
registerCount
:
0
,
customerCount
:
0
,
activeCount
:
0
,
...
...
@@ -86,12 +87,12 @@ Page({
...
entity
,
};
statisticsFetch
({
url
:
'/dcxy/reportInfo/queryReportList'
,
url
:
'/dcxy/reportInfo/
boss/
queryReportList'
,
data
:
reqBody
,
})
.
then
(
res
=>
{
console
.
log
(
res
);
const
{
customerCount
,
dayVos
,
activeCount
}
=
res
.
data
;
const
{
customerCount
,
dayVos
,
activeCount
,
dayAcs
}
=
res
.
data
;
let
dayList
=
new
Array
(
31
)
.
fill
({
count
:
0
,
...
...
@@ -103,12 +104,43 @@ Page({
for
(
let
index
=
0
;
index
<
oList
.
length
;
index
++
)
{
const
element
=
oList
[
index
];
let
daysIndex
=
Number
(
element
.
days
.
slice
(
-
2
));
dayList
[
daysIndex
-
1
]
=
{
...
dayList
[
daysIndex
-
1
],
count
:
element
.
count
,
};
if
(
dayList
[
daysIndex
-
1
].
count
)
{
dayList
[
daysIndex
-
1
]
=
{
...
dayList
[
daysIndex
-
1
],
count
:
dayList
[
daysIndex
-
1
].
count
+
element
.
count
,
};
}
else
{
dayList
[
daysIndex
-
1
]
=
{
...
dayList
[
daysIndex
-
1
],
count
:
element
.
count
,
};
}
}
}
let
activateList
=
new
Array
(
31
)
.
fill
({
count
:
0
,
})
.
map
((
v
,
idx
)
=>
({
...
v
,
days
:
idx
+
1
}));
if
(
dayAcs
&&
dayAcs
.
length
)
{
let
oList
=
dayAcs
;
for
(
let
index
=
0
;
index
<
oList
.
length
;
index
++
)
{
const
element
=
oList
[
index
];
let
daysIndex
=
Number
(
element
.
days
.
slice
(
-
2
));
if
(
activateList
[
daysIndex
-
1
].
count
)
{
activateList
[
daysIndex
-
1
]
=
{
...
activateList
[
daysIndex
-
1
],
count
:
activateList
[
daysIndex
-
1
].
count
+
element
.
count
,
};
}
else
{
activateList
[
daysIndex
-
1
]
=
{
...
activateList
[
daysIndex
-
1
],
count
:
element
.
count
,
};
}
}
}
let
registerCount
=
dayVos
.
reduce
(
(
total
,
current
)
=>
(
total
+=
current
.
count
),
0
,
...
...
@@ -116,6 +148,7 @@ Page({
console
.
log
(
'dayList:'
,
dayList
);
this
.
setData
!
({
growthList
:
dayList
,
activateList
:
activateList
,
registerCount
:
registerCount
,
customerCount
:
customerCount
?
customerCount
:
0
,
activeCount
:
activeCount
?
activeCount
:
0
,
...
...
miniprogram/pages/userGrowth/userGrowth.wxml
View file @
874c3fc6
...
...
@@ -37,7 +37,7 @@
<view class="userGrowth-title-text">用户活跃</view>
</view>
<view class="userGrowth-canvas">
<user-activity-chart dataList="{{
growth
List}}" month="{{month}}" />
<user-activity-chart dataList="{{
activate
List}}" month="{{month}}" />
</view>
</view>
</view>
\ No newline at end of file
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