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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
12 deletions
+71
-12
userGrowth.js
miniprogram/pages/userGrowth/userGrowth.js
+30
-5
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 @
00d1515c
...
...
@@ -22,6 +22,7 @@ Page({
areaName
:
''
,
areaList
:
[],
growthList
:
[],
activateList
:
[],
registerCount
:
0
,
customerCount
:
0
,
activeCount
:
0
,
...
...
@@ -84,12 +85,12 @@ Page({
var
reqBody
=
__assign
({
year
:
year
,
month
:
month
,
isAdmin
:
this
.
data
.
isAdmin
},
entity
);
fetch_1
.
statisticsFetch
({
url
:
'/dcxy/reportInfo/queryReportList'
,
url
:
'/dcxy/reportInfo/
boss/
queryReportList'
,
data
:
reqBody
,
})
.
then
(
function
(
res
)
{
console
.
log
(
res
);
var
_a
=
res
.
data
,
customerCount
=
_a
.
customerCount
,
dayVos
=
_a
.
dayVos
,
activeCount
=
_a
.
activeCount
;
var
_a
=
res
.
data
,
customerCount
=
_a
.
customerCount
,
dayVos
=
_a
.
dayVos
,
activeCount
=
_a
.
activeCount
,
dayAcs
=
_a
.
dayAcs
;
var
dayList
=
new
Array
(
31
)
.
fill
({
count
:
0
,
...
...
@@ -100,13 +101,37 @@ Page({
for
(
var
index
=
0
;
index
<
oList
.
length
;
index
++
)
{
var
element
=
oList
[
index
];
var
daysIndex
=
Number
(
element
.
days
.
slice
(
-
2
));
dayList
[
daysIndex
-
1
]
=
__assign
({},
dayList
[
daysIndex
-
1
],
{
count
:
element
.
count
});
if
(
dayList
[
daysIndex
-
1
].
count
)
{
dayList
[
daysIndex
-
1
]
=
__assign
({},
dayList
[
daysIndex
-
1
],
{
count
:
dayList
[
daysIndex
-
1
].
count
+
element
.
count
});
}
else
{
dayList
[
daysIndex
-
1
]
=
__assign
({},
dayList
[
daysIndex
-
1
],
{
count
:
element
.
count
});
}
}
}
var
activateList
=
new
Array
(
31
)
.
fill
({
count
:
0
,
})
.
map
(
function
(
v
,
idx
)
{
return
(
__assign
({},
v
,
{
days
:
idx
+
1
}));
});
if
(
dayAcs
&&
dayAcs
.
length
)
{
var
oList
=
dayAcs
;
for
(
var
index
=
0
;
index
<
oList
.
length
;
index
++
)
{
var
element
=
oList
[
index
];
var
daysIndex
=
Number
(
element
.
days
.
slice
(
-
2
));
if
(
activateList
[
daysIndex
-
1
].
count
)
{
activateList
[
daysIndex
-
1
]
=
__assign
({},
activateList
[
daysIndex
-
1
],
{
count
:
activateList
[
daysIndex
-
1
].
count
+
element
.
count
});
}
else
{
activateList
[
daysIndex
-
1
]
=
__assign
({},
activateList
[
daysIndex
-
1
],
{
count
:
element
.
count
});
}
}
}
var
registerCount
=
dayVos
.
reduce
(
function
(
total
,
current
)
{
return
(
total
+=
current
.
count
);
},
0
);
console
.
log
(
'dayList:'
,
dayList
);
_this
.
setData
({
growthList
:
dayList
,
activateList
:
activateList
,
registerCount
:
registerCount
,
customerCount
:
customerCount
?
customerCount
:
0
,
activeCount
:
activeCount
?
activeCount
:
0
,
...
...
@@ -141,4 +166,4 @@ Page({
});
},
});
//# sourceMappingURL=data:application/json;base64,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uICAgICAgICAgICAgICBjb3VudDogZWxlbWVudC5jb3VudCxcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGxldCByZWdpc3RlckNvdW50ID0gZGF5Vm9zLnJlZHVjZShcbiAgICAgICAgICAodG90YWwsIGN1cnJlbnQpID0+ICh0b3RhbCArPSBjdXJyZW50LmNvdW50KSxcbiAgICAgICAgICAwLFxuICAgICAgICApO1xuICAgICAgICBjb25zb2xlLmxvZygnZGF5TGlzdDonLCBkYXlMaXN0KTtcbiAgICAgICAgdGhpcy5zZXREYXRhISh7XG4gICAgICAgICAgZ3Jvd3RoTGlzdDogZGF5TGlzdCxcbiAgICAgICAgICByZWdpc3RlckNvdW50OiByZWdpc3RlckNvdW50LFxuICAgICAgICAgIGN1c3RvbWVyQ291bnQ6IGN1c3RvbWVyQ291bnQgPyBjdXN0b21lckNvdW50IDogMCxcbiAgICAgICAgICBhY3RpdmVDb3VudDogYWN0aXZlQ291bnQgPyBhY3RpdmVDb3VudCA6IDAsXG4gICAgICAgIH0pO1xuICAgICAgfSlcbiAgICAgIC5jYXRjaChlcnIgPT4ge1xuICAgICAgICBjb25zb2xlLmxvZyhlcnIpO1xuICAgICAgfSk7XG4gIH0sXG4gIGFyZWFDaGFuZ2VIYW5kbGUodmFsKSB7XG4gICAgY29uc29sZS5sb2coJ2FyZWFDaGFuZ2VIYW5kbGUnLCB2YWwpO1xuICAgIGNvbnN0IHsgaWQsIG5hbWUgfSA9IHZhbDtcbiAgICB0aGlzLnNldERhdGEhKFxuICAgICAge1xuICAgICAgICBhcmVhSWQ6IGlkLFxuICAgICAgICBhcmVhTmFtZTogbmFtZSxcbiAgICAgIH0sXG4gICAgICAoKSA9PiB7XG4gICAgICAgIGlmIChpZCkge1xuICAgICAgICAgIHRoaXMuZmV0Y2hMaXN0KHsgYXJlYUlkOiBpZCB9KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB0aGlzLmZldGNoTGlzdC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AgICAgICBkYXlMaXN0W2RheXNJbmRleCAtIDFdID0ge1xuICAgICAgICAgICAgICAgIC4uLmRheUxpc3RbZGF5c0luZGV4IC0gMV0sXG4gICAgICAgICAgICAgICAgY291bnQ6IGRheUxpc3RbZGF5c0luZGV4IC0gMV0uY291bnQgKyBlbGVtZW50LmNvdW50LFxuICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgZGF5TGlzdFtkYXlzSW5kZXggLSAxXSA9IHtcbiAgICAgICAgICAgICAgICAuLi5kYXlMaXN0W2RheXNJbmRleCAtIDFdLFxuICAgICAgICAgICAgICAgIGNvdW50OiBlbGVtZW50LmNvdW50LFxuICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBsZXQgYWN0aXZhdGVMaXN0ID0gbmV3IEFycmF5KDMxKVxuICAgICAgICAgIC5maWxsKHtcbiAgICAgICAgICAgIGNvdW50OiAwLFxuICAgICAgICAgIH0pXG4gICAgICAgICAgLm1hcCgodiwgaWR4KSA9PiAoeyAuLi52LCBkYXlzOiBpZHggKyAxIH0pKTtcbiAgICAgICAgaWYgKGRheUFjcyAmJiBkYXlBY3MubGVuZ3RoKSB7XG4gICAgICAgICAgbGV0IG9MaXN0ID0gZGF5QWNzO1xuICAgICAgICAgIGZvciAobGV0IGluZGV4ID0gMDsgaW5kZXggPCBvTGlzdC5sZW5ndGg7IGluZGV4KyspIHtcbiAgICAgICAgICAgIGNvbnN0IGVsZW1lbnQgPSBvTGlzdFtpbmRleF07XG4gICAgICAgICAgICBsZXQgZGF5c0luZGV4ID0gTnVtYmVyKGVsZW1lbnQuZGF5cy5zbGljZSgtMikpO1xuICAgICAgICAgICAgaWYgKGFjdGl2YXRlTGlzdFtkYXlzSW5kZXggLSAxXS5jb3VudCkge1xuICAgICAgICAgICAgICBhY3RpdmF0ZUxpc3RbZGF5c0luZGV4IC0gMV0gPSB7XG4gICAgICAgICAgICAgICAgLi4uYWN0aXZhdGVMaXN0W2RheXNJbmRleCAtIDFdLFxuICAgICAgICAgICAgICAgIGNvdW50OiBhY3RpdmF0ZUxpc3RbZGF5c0luZGV4IC0gMV0uY291bnQgKyBlbGVtZW50LmNvdW50LFxuICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgYWN0aXZhdGVMaXN0W2RheXNJbmRleCAtIDFdID0ge1xuICAgICAgICAgICAgICAgIC4uLmFjdGl2YXRlTGlzdFtkYXlzSW5kZXggLSAxXSxcbiAgICAgICAgICAgICAgICBjb3VudDogZWxlbWVudC5jb3VudCxcbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBsZXQgcmVnaXN0ZXJDb3VudCA9IGRheVZvcy5yZWR1Y2UoXG4gICAgICAgICAgKHRvdGFsLCBjdXJyZW50KSA9PiAodG90YWwgKz0gY3VycmVudC5jb3VudCksXG4gICAgICAgICAgMCxcbiAgICAgICAgKTtcbiAgICAgICAgY29uc29sZS5sb2coJ2RheUxpc3Q6JywgZGF5TGlzdCk7XG4gICAgICAgIHRoaXMuc2V0RGF0YSEoe1xuICAgICAgICAgIGdyb3d0aExpc3Q6IGRheUxpc3QsXG4gICAgICAgICAgYWN0aXZhdGVMaXN0OiBhY3RpdmF0ZUxpc3QsXG4gICAgICAgICAgcmVnaXN0ZXJDb3VudDogcmVnaXN0ZXJDb3VudCxcbiAgICAgICAgICBjdXN0b21lckNvdW50OiBjdXN0b21lckNvdW50ID8gY3VzdG9tZXJDb3VudCA6IDAsXG4gICAgICAgICAgYWN0aXZlQ291bnQ6IGFjdGl2ZUNvdW50ID8gYWN0aXZlQ291bnQgOiAwLFxuICAgICAgICB9KTtcbiAgICAgIH0pXG4gICAgICAuY2F0Y2goZXJyID0+IHtcbiAgICAgICAgY29uc29sZS5sb2coZXJyKTtcbiAgICAgIH0pO1xuICB9LFxuICBhcmVhQ2hhbmdlSGFuZGxlKHZhbCkge1xuICAgIGNvbnNvbGUubG9nKCdhcmVhQ2hhbmdlSGFuZGxlJywgdmFsKTtcbiAgICBjb25zdCB7IGlkLCBuYW1lIH0gPSB2YWw7XG4gICAgdGhpcy5zZXREYXRhIShcbiAgICAgIHtcbiAgICAgICAgYXJlYUlkOiBpZCxcbiAgICAgICAgYXJlYU5hbWU6IG5hbWUsXG4gICAgICB9LFxuICAgICAgKCkgPT4ge1xuICAgICAgICBpZiAoaWQpIHtcbiAgICAgICAgICB0aGlzLmZldGNoTGlzdCh7IGFyZWFJZDogaWQgfSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdGhpcy5mZXRjaExpc3QoKTtcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICApO1xuICB9LFxuICBtb250aENoYW5nZUhhbmRsZSh2YWwpIHtcbiAgICBjb25zb2xlLmxvZygnbW9udGhDaGFuZ2VIYW5kbGUnLCB2YWwpO1xuICAgIGNvbnN0IHsgdmFsdWUgfSA9IHZhbC5kZXRhaWw7XG4gICAgdGhpcy5mZXRjaExpc3QoeyBtb250aFN0cmluZzogdmFsdWUgfSk7XG4gICAgdGhpcy5zZXREYXRhISh7XG4gICAgICBtb250aDogdmFsdWUsXG4gICAgfSk7XG4gIH0sXG59KTtcbiJdfQ==
\ No newline at end of file
miniprogram/pages/userGrowth/userGrowth.ts
View file @
00d1515c
...
...
@@ -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 @
00d1515c
...
...
@@ -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