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
ebbf177e
Commit
ebbf177e
authored
Nov 27, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改部分数据问题
parent
46ac34af
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
35 additions
and
20 deletions
+35
-20
PayTypeChart.js
miniprogram/pages/components/PayTypeChart/PayTypeChart.js
+0
-0
PayTypeChart.ts
miniprogram/pages/components/PayTypeChart/PayTypeChart.ts
+16
-13
homeAndReport.js
miniprogram/pages/homeAndReport/homeAndReport.js
+3
-3
homeAndReport.ts
miniprogram/pages/homeAndReport/homeAndReport.ts
+1
-1
userGrowth.js
miniprogram/pages/userGrowth/userGrowth.js
+0
-0
userGrowth.ts
miniprogram/pages/userGrowth/userGrowth.ts
+6
-0
userGrowth.wxml
miniprogram/pages/userGrowth/userGrowth.wxml
+1
-1
util.js
miniprogram/utils/util.js
+5
-2
util.ts
miniprogram/utils/util.ts
+3
-0
No files found.
miniprogram/pages/components/PayTypeChart/PayTypeChart.js
View file @
ebbf177e
This diff is collapsed.
Click to expand it.
miniprogram/pages/components/PayTypeChart/PayTypeChart.ts
View file @
ebbf177e
...
...
@@ -41,7 +41,8 @@ function initChart(canvas, width, height, F2) {
});
paytypeChart
.
coord
(
'polar'
,
{
transposed
:
true
,
innerRadius
:
0.7
,
innerRadius
:
0.5
,
radius
:
0.9
,
});
paytypeChart
.
legend
({
position
:
'right'
,
...
...
@@ -51,9 +52,7 @@ function initChart(canvas, width, height, F2) {
paytypeChart
.
interval
()
.
position
(
'a*count'
)
.
color
(
'key'
,
val
=>
{
return
colorMap
[
val
];
})
.
color
(
'key'
,
[
'#EB7E59'
,
'#13C2C2'
,
'#FACC14'
,
'#1890FF'
])
.
adjust
(
'stack'
);
paytypeChart
.
axis
(
false
);
paytypeChart
.
render
();
...
...
@@ -70,16 +69,20 @@ Component({
paytypeChart
.
legend
({
position
:
'right'
,
marker
:
'square'
,
custom
:
true
,
items
:
newVal
.
map
(
item
=>
({
name
:
item
.
name
,
value
:
' '
+
formatPrice
(
item
.
count
),
marker
:
{
symbol
:
'square'
,
fill
:
colorMap
[
item
.
key
],
radius
:
4
,
itemFormatter
:
val
=>
{
let
item
=
newVal
.
find
(
item
=>
item
.
key
===
val
);
return
item
?
item
.
name
+
' '
+
formatPrice
(
item
.
count
)
:
''
;
},
})),
// custom: true,
// items: newVal.map(item => ({
// name: item.name,
// value: ' ' + formatPrice(item.count),
// marker: {
// symbol: 'square',
// fill: colorMap[item.key],
// radius: 4,
// },
// })),
});
paytypeChart
&&
paytypeChart
.
changeData
(
newVal
);
},
...
...
miniprogram/pages/homeAndReport/homeAndReport.js
View file @
ebbf177e
...
...
@@ -13,7 +13,7 @@ Page({
pagePath
:
'/pages/report/report'
,
iconPath
:
'/images/tab_baobiao_nor@2x.png'
,
selectedIconPath
:
'/images/tab_baobiao_pre@2x.png'
,
text
:
'
报表分析
'
,
text
:
'
运营管理
'
,
},
],
},
...
...
@@ -25,4 +25,4 @@ Page({
});
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9tZUFuZFJlcG9ydC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImhvbWVBbmRSZXBvcnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLElBQUksQ0FBQztJQUNILElBQUksRUFBRTtRQUNKLFFBQVEsRUFBRSxDQUF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2hUYWIoeyB1cmw6IHBhdGggfSk7XG4gICAgdGhpcy5zZXREYXRhKHtcbiAgICAgIHNlbGVjdGVkOiBpbmRleCxcbiAgICB9KTtcbiAgfSxcbn0pO1xuIl19
\ No newline at end of file
miniprogram/pages/homeAndReport/homeAndReport.ts
View file @
ebbf177e
...
...
@@ -12,7 +12,7 @@ Page({
pagePath
:
'/pages/report/report'
,
iconPath
:
'/images/tab_baobiao_nor@2x.png'
,
selectedIconPath
:
'/images/tab_baobiao_pre@2x.png'
,
text
:
'
报表分析
'
,
text
:
'
运营管理
'
,
},
],
},
...
...
miniprogram/pages/userGrowth/userGrowth.js
View file @
ebbf177e
This diff is collapsed.
Click to expand it.
miniprogram/pages/userGrowth/userGrowth.ts
View file @
ebbf177e
...
...
@@ -18,6 +18,7 @@ Page({
areaName
:
''
,
areaList
:
[],
growthList
:
[],
registerCount
:
0
,
customerCount
:
0
,
activeCount
:
0
,
isAdmin
:
0
,
...
...
@@ -108,9 +109,14 @@ Page({
};
}
}
let
registerCount
=
dayVos
.
reduce
(
(
total
,
current
)
=>
(
total
+=
current
.
count
),
0
,
);
console
.
log
(
'dayList:'
,
dayList
);
this
.
setData
!
({
growthList
:
dayList
,
registerCount
:
registerCount
,
customerCount
:
customerCount
?
customerCount
:
0
,
activeCount
:
activeCount
?
activeCount
:
0
,
});
...
...
miniprogram/pages/userGrowth/userGrowth.wxml
View file @
ebbf177e
...
...
@@ -3,7 +3,7 @@
<view class="userGrowth-topBox">
<view class="userGrowth-titleItem">
<view class="userGrowth-titleName">注册人数</view>
<view class="userGrowth-titleValue">
123412
</view>
<view class="userGrowth-titleValue">
{{registerCount}}
</view>
</view>
<view class="userGrowth-titleItem">
<view class="userGrowth-titleName">活跃人数</view>
...
...
miniprogram/utils/util.js
View file @
ebbf177e
...
...
@@ -25,6 +25,9 @@ var joinComma = function (num) {
var
result
=
[],
counter
=
0
;
for
(
var
index
=
num
.
length
-
1
;
index
>=
0
;
index
--
)
{
counter
++
;
if
(
index
==
0
&&
isNaN
(
Number
(
num
[
index
]))
&&
result
[
0
]
===
','
)
{
result
.
shift
();
}
var
element
=
num
[
index
];
result
.
unshift
(
element
);
if
(
!
(
counter
%
3
)
&&
index
!=
0
)
{
...
...
@@ -40,4 +43,4 @@ exports.delay = (function () {
timer
=
setTimeout
(
callback
,
ms
);
};
})();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInV0aWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxvQkFBMkIsSUFBVTtJQUNuQyxJQUFNLElBQUksR0FBRyxJQUFJLENBQUMsV0FBVyxFQUFFLENBQUM7SUFDaEMsSUFBTSxLQUFLLEdBQUcsSUFBSSxDQUFDLFFBQVEsRUFBRSxHQUFHLENBQUMsQ0FBQztJQUNsQyxJQUFNLEdBQUcsR0FBRyxJQUFJLENBQUMsT0FBTyxFQUFFLENBQUM7SUFDM0IsSUFBTSxJQUFJLEdBQUcsSUFBSSxDQUFDLFFBQVEsRUFBRSxDQUFDO0lBQzdCLElBQU0sTUFBTSxHQUFHLElBQUksQ0FBQyxVQUFVLEVBQUUsQ0FBQztJQUNqQyxJQUFNLE1BQU0sR0FBRyxJQUFJLENBQUMsVUFBVSxFQUFFLENBQUM7SUFFakMsTUFBTSxDQUFDLENBQ0wsQ0FBQyxJQUFJLEVBQUUsS0FBSyxFQUFFLEdBQUcsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxZQUFZLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDO1FBQzlDLEdBQUc7UUFDSCxDQUFDLElBQUksRUFBRSxNQUFNLEVBQUUsTUFBTSxDQUFDLENBQUMsR0FBRyxDQUFDLFlBQVksQ0FBQyxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FDbkQsQ0FBQztBQUNKLENBQUM7QUFiRCxnQ0Fh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biAgKTtcbn1cblxuY29uc3QgZm9ybWF0TnVtYmVyID0gKG46IG51bWJlcikgPT4ge1xuICBjb25zdCBzdHIgPSBuLnRvU3RyaW5nKCk7XG4gIHJldHVybiBzdHJbMV0gPyBzdHIgOiAnMCcgKyBzdHI7XG59O1xuXG5leHBvcnQgY29uc3QgZm9ybWF0UHJpY2UgPSAobjogbnVtYmVyKSA9PiB7XG4gIGNvbnN0IHN0ciA9IG4udG9GaXhlZCgyKTtcbiAgbGV0IHN0ckFyciA9IHN0ci5zcGxpdCgnLicpO1xuICByZXR1cm4gam9pbkNvbW1hKHN0ckFyclswXSkgKyAnLicgKyBzdHJBcnJbMV07XG59O1xuXG5jb25zdCBqb2luQ29tbWEgPSAobnVtOiBzdHJpbmcpID0+IHtcbiAgdmFyIHJlc3VsdCA9IFtdLFxuICAgIGNvdW50ZXIgPSAwO1xuICBmb3IgKGxldCBpbmRleCA9IG51bS5sZW5ndGggLSAxOyBpbmRleCA+PSAwOyBpbmRleC0tKSB7XG4gICAgY291bnRlcisrO1xuICAgIGNvbnN0IGVsZW1lbnQgPSBudW1baW5kZXhdO1xuICAgIHJlc3VsdC51bnNoaWZ0KGVsZW1lbnQpO1xuICAgIGlmICghKGNvdW50ZXIgJSAzKSAmJiBpbmRleCAhPSAwKSB7XG4gICAgICByZXN1bHQudW5zaGlmdCgnLCcpO1xuICAgIH1cbiAgfVxuICByZXR1cm4gcmVzdWx0LmpvaW4oJycpO1xufTtcbmV4cG9ydCBjb25zdCBkZWxheSA9IChmdW5jdGlvbigpIHtcbiAgbGV0IHRpbWVyID0gMDtcbiAgcmV0dXJuIGZ1bmN0aW9uKGNhbGxiYWNrOiAoKSA9PiB2b2lkLCBtczogbnVtYmVyKSB7XG4gICAgY2xlYXJUaW1lb3V0KHRpbWVyKTtcbiAgICB0aW1lciA9IHNldFRpbWVvdXQoY2FsbGJhY2ssIG1zKTtcbiAgfTtcbn0pKCk7XG4iXX0=
\ No newline at end of file
//# sourceMappingURL=data:application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2lkLCBtczogbnVtYmVyKSB7XG4gICAgY2xlYXJUaW1lb3V0KHRpbWVyKTtcbiAgICB0aW1lciA9IHNldFRpbWVvdXQoY2FsbGJhY2ssIG1zKTtcbiAgfTtcbn0pKCk7XG4iXX0=
\ No newline at end of file
miniprogram/utils/util.ts
View file @
ebbf177e
...
...
@@ -29,6 +29,9 @@ const joinComma = (num: string) => {
counter
=
0
;
for
(
let
index
=
num
.
length
-
1
;
index
>=
0
;
index
--
)
{
counter
++
;
if
(
index
==
0
&&
isNaN
(
Number
(
num
[
index
]))
&&
result
[
0
]
===
','
)
{
result
.
shift
();
}
const
element
=
num
[
index
];
result
.
unshift
(
element
);
if
(
!
(
counter
%
3
)
&&
index
!=
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