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
00d1515c
Commit
00d1515c
authored
Dec 03, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改获取接口
parent
cf9efeed
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
3 deletions
+37
-3
userGrowth.js
miniprogram/pages/userGrowth/userGrowth.js
+0
-0
userGrowth.ts
miniprogram/pages/userGrowth/userGrowth.ts
+35
-2
userGrowth.wxml
miniprogram/pages/userGrowth/userGrowth.wxml
+2
-1
No files found.
miniprogram/pages/userGrowth/userGrowth.js
View file @
00d1515c
This diff is collapsed.
Click to expand it.
miniprogram/pages/userGrowth/userGrowth.ts
View file @
00d1515c
...
@@ -18,6 +18,7 @@ Page({
...
@@ -18,6 +18,7 @@ Page({
areaName
:
''
,
areaName
:
''
,
areaList
:
[],
areaList
:
[],
growthList
:
[],
growthList
:
[],
activateList
:
[],
registerCount
:
0
,
registerCount
:
0
,
customerCount
:
0
,
customerCount
:
0
,
activeCount
:
0
,
activeCount
:
0
,
...
@@ -86,12 +87,12 @@ Page({
...
@@ -86,12 +87,12 @@ Page({
...
entity
,
...
entity
,
};
};
statisticsFetch
({
statisticsFetch
({
url
:
'/dcxy/reportInfo/queryReportList'
,
url
:
'/dcxy/reportInfo/
boss/
queryReportList'
,
data
:
reqBody
,
data
:
reqBody
,
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
console
.
log
(
res
);
console
.
log
(
res
);
const
{
customerCount
,
dayVos
,
activeCount
}
=
res
.
data
;
const
{
customerCount
,
dayVos
,
activeCount
,
dayAcs
}
=
res
.
data
;
let
dayList
=
new
Array
(
31
)
let
dayList
=
new
Array
(
31
)
.
fill
({
.
fill
({
count
:
0
,
count
:
0
,
...
@@ -103,12 +104,43 @@ Page({
...
@@ -103,12 +104,43 @@ Page({
for
(
let
index
=
0
;
index
<
oList
.
length
;
index
++
)
{
for
(
let
index
=
0
;
index
<
oList
.
length
;
index
++
)
{
const
element
=
oList
[
index
];
const
element
=
oList
[
index
];
let
daysIndex
=
Number
(
element
.
days
.
slice
(
-
2
));
let
daysIndex
=
Number
(
element
.
days
.
slice
(
-
2
));
if
(
dayList
[
daysIndex
-
1
].
count
)
{
dayList
[
daysIndex
-
1
]
=
{
dayList
[
daysIndex
-
1
]
=
{
...
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
,
count
:
element
.
count
,
};
};
}
}
}
}
}
let
registerCount
=
dayVos
.
reduce
(
let
registerCount
=
dayVos
.
reduce
(
(
total
,
current
)
=>
(
total
+=
current
.
count
),
(
total
,
current
)
=>
(
total
+=
current
.
count
),
0
,
0
,
...
@@ -116,6 +148,7 @@ Page({
...
@@ -116,6 +148,7 @@ Page({
console
.
log
(
'dayList:'
,
dayList
);
console
.
log
(
'dayList:'
,
dayList
);
this
.
setData
!
({
this
.
setData
!
({
growthList
:
dayList
,
growthList
:
dayList
,
activateList
:
activateList
,
registerCount
:
registerCount
,
registerCount
:
registerCount
,
customerCount
:
customerCount
?
customerCount
:
0
,
customerCount
:
customerCount
?
customerCount
:
0
,
activeCount
:
activeCount
?
activeCount
:
0
,
activeCount
:
activeCount
?
activeCount
:
0
,
...
...
miniprogram/pages/userGrowth/userGrowth.wxml
View file @
00d1515c
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
<view class="userGrowth-title-text">用户活跃</view>
<view class="userGrowth-title-text">用户活跃</view>
</view>
</view>
<view class="userGrowth-canvas">
<view class="userGrowth-canvas">
<user-activity-chart dataList="{{
growth
List}}" month="{{month}}" />
<user-activity-chart dataList="{{
activate
List}}" month="{{month}}" />
</view>
</view>
</view>
</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