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
59f05187
Commit
59f05187
authored
Jan 14, 2020
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加测试数据
parent
4c152cfa
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
equipment.js
miniprogram/pages/equipment/equipment.js
+3
-3
equipment.ts
miniprogram/pages/equipment/equipment.ts
+2
-1
No files found.
miniprogram/pages/equipment/equipment.js
View file @
59f05187
...
...
@@ -25,7 +25,7 @@ Page({
wx
.
hideLoading
();
console
.
log
(
res
);
var
_a
=
res
.
data
,
areaDeviceAmount
=
_a
.
areaDeviceAmount
,
statusAmount
=
_a
.
statusAmount
,
totalAmount
=
_a
.
totalAmount
;
var
total
=
totalAmount
.
reduce
(
function
(
count
,
item
)
{
return
count
+
item
.
value
;
},
0
)
;
var
total
=
12
;
_this
.
setData
({
areaDeviceAmount
:
areaDeviceAmount
,
statusAmount
:
statusAmount
,
...
...
@@ -54,4 +54,4 @@ Page({
});
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXF1aXBtZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZXF1aXBtZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEseUNBQThDO0FBRzlDLElBQUksQ0FBQztJQUlILElBQUksRUFBRTtRQUNKLE1BQU0sRUFBRSx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iAgZGF0YToge1xuICAgIGNvbG9yczogWycjNjg5NWZlJywgJyNmZTY4NjgnLCAnIzZlZTE4ZicsICcjZmVhZTY4J10sXG4gICAgYXJlYURldmljZUFtb3VudDogW10sXG4gICAgc3RhdHVzQW1vdW50OiBbXSxcbiAgICB0b3RhbEFtb3VudDogW10sXG4gICAgdG90YWw6IDAsXG4gIH0sXG5cbiAgLyoqXG4gICAqIOeUn+WRveWRqOacn+WHveaVsC0t55uR5ZCs6aG16Z2i5Yqg6L29XG4gICAqL1xuICBvbkxvYWQob3B0aW9ucykge1xuICAgIGNvbnNvbGUubG9nKCdpbiBvbkxvYWQnKTtcbiAgICB0aGlzLmZldGNoTGlzdCgpO1xuICB9LFxuXG4gIGZldGNoTGlzdCgpIHtcbiAgICB3eC5zaG93TG9hZGluZyh7XG4gICAgICB0aXRsZTogJ+WKoOi9veS4rScsXG4gICAgfSk7XG4gICAgZGV2aWNlRmV0Y2goe1xuICAgICAgdXJsOiAnL2RldmljZS9yZXBvcnQvbWFpblBhZ2UnLFxuICAgIH0pXG4gICAgICAudGhlbihyZXMgPT4ge1xuICAgICAgICB3eC5oaWRlTG9hZGluZygpO1xuICAgICAgICBjb25zb2xlLmxvZyhyZXMpO1xuICAgICAgICBjb25zdCB7IGFyZWFEZXZpY2VBbW91bnQsIHN0YXR1c0Ftb3VudCwgdG90YWxBbW91bnQgfSA9IHJlcy5kYXRhO1xuICAgICAgICBsZXQgdG90YWwgPSB0b3RhbEFtb3VudC5yZWR1Y2UoKGNvdW50LCBpdGVtKSA9PiBjb3VudCArIGl0ZW0udmFsdWUsIDApO1xuICAgICAgICB0aGlzLnNldERhdGEhKHtcbiAgICAgICAgICBhcmVhRGV2aWNlQW1vdW50LFxuICAgICAgICAgIHN0YXR1c0Ftb3VudCxcbiAgICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgICB0b3RhbCxcbiAgICAgICAgfSk7XG4gICAgICB9KVxuICAgICAgLmNhdGNoKGVyciA9PiB7XG4gICAgICAgIGNvbnNvbGUubG9nKGVycik7XG4gICAgICAgIHd4LmhpZGVMb2FkaW5nKCk7XG4gICAgICAgIHd4LnNob3dUb2FzdCh7XG4gICAgICAgICAgdGl0bGU6IGVyci5tc2cgfHwgZXJyLnRvU3RyaW5nKCksXG4gICAgICAgICAgaWNvbjogJ25vbmUnLFxuICAgICAgICAgIGR1cmF0aW9uOiA0MDAwLFxuICAgICAgICB9KTtcbiAgICAgIH0pO1xuICB9LFxuICBnb1JlcG9ydFBhZ2UoZSkge1xuICAgIGNvbnN0IHsgaW5kZXggfSA9IGUuY3VycmVudFRhcmdldC5kYXRhc2V0O1xuICAgIGNvbnN0IGl0ZW0gPSB0aGlzLmRhdGEuYXJlYURldmljZUFtb3VudFtpbmRleF07XG4gICAgd3gubmF2aWdhdGVUbyh7XG4gICAgICB1cmw6IGAvcGFnZXMvZXF1aXBtZW50UmVwb3J0L2VxdWlwbWVudFJlcG9ydD9hcmVhSWQ9JHtpdGVtLmFyZWFJZH0mYXJlYU5hbWU9JHtpdGVtLmFyZWFOYW1lfWAsXG4gICAgICBzdWNjZXNzOiBmdW5jdGlvbihyZXMpIHtcbiAgICAgICAgLy8g6YCa6L+HZXZlbnRDaGFubmVs5ZCR6KKr5omT5byA6aG16Z2i5Lyg6YCB5pWw5o2uXG4gICAgICAgIHJlcy5ldmVudENoYW5uZWwuZW1pdCgnYWNjZXB0RGF0YUZyb21PcGVuZXJQYWdlJywgeyBkYXRhOiBpdGVtIH0pO1xuICAgICAgfSxcbiAgICB9KTtcbiAgfSxcbn0pO1xuIl19
\ No newline at end of file
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXF1aXBtZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZXF1aXBtZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEseUNBQThDO0FBRzlDLElBQUksQ0FBQztJQUlILElBQUksRUFBRTtRQU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guc2hvd1RvYXN0KHtcbiAgICAgICAgICB0aXRsZTogZXJyLm1zZyB8fCBlcnIudG9TdHJpbmcoKSxcbiAgICAgICAgICBpY29uOiAnbm9uZScsXG4gICAgICAgICAgZHVyYXRpb246IDQwMDAsXG4gICAgICAgIH0pO1xuICAgICAgfSk7XG4gIH0sXG4gIGdvUmVwb3J0UGFnZShlKSB7XG4gICAgY29uc3QgeyBpbmRleCB9ID0gZS5jdXJyZW50VGFyZ2V0LmRhdGFzZXQ7XG4gICAgY29uc3QgaXRlbSA9IHRoaXMuZGF0YS5hcmVhRGV2aWNlQW1vdW50W2luZGV4XTtcbiAgICB3eC5uYXZpZ2F0ZVRvKHtcbiAgICAgIHVybDogYC9wYWdlcy9lcXVpcG1lbnRSZXBvcnQvZXF1aXBtZW50UmVwb3J0P2FyZWFJZD0ke2l0ZW0uYXJlYUlkfSZhcmVhTmFtZT0ke2l0ZW0uYXJlYU5hbWV9YCxcbiAgICAgIHN1Y2Nlc3M6IGZ1bmN0aW9uKHJlcykge1xuICAgICAgICAvLyDpgJrov4dldmVudENoYW5uZWzlkJHooqvmiZPlvIDpobXpnaLkvKDpgIHmlbDmja5cbiAgICAgICAgcmVzLmV2ZW50Q2hhbm5lbC5lbWl0KCdhY2NlcHREYXRhRnJvbU9wZW5lclBhZ2UnLCB7IGRhdGE6IGl0ZW0gfSk7XG4gICAgICB9LFxuICAgIH0pO1xuICB9LFxufSk7XG4iXX0=
\ No newline at end of file
miniprogram/pages/equipment/equipment.ts
View file @
59f05187
...
...
@@ -32,7 +32,8 @@ Page({
wx
.
hideLoading
();
console
.
log
(
res
);
const
{
areaDeviceAmount
,
statusAmount
,
totalAmount
}
=
res
.
data
;
let
total
=
totalAmount
.
reduce
((
count
,
item
)
=>
count
+
item
.
value
,
0
);
// let total = totalAmount.reduce((count, item) => count + item.value, 0);
let
total
=
12
;
this
.
setData
!
({
areaDeviceAmount
,
statusAmount
,
...
...
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