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
078998d0
Commit
078998d0
authored
Jan 14, 2020
by
姜雷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into test
parents
ef30c063
654147b0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
equipment.js
miniprogram/pages/equipment/equipment.js
+3
-5
equipment.ts
miniprogram/pages/equipment/equipment.ts
+6
-3
No files found.
miniprogram/pages/equipment/equipment.js
View file @
078998d0
...
...
@@ -25,19 +25,17 @@ 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
);
_this
.
setData
({
areaDeviceAmount
:
areaDeviceAmount
,
statusAmount
:
statusAmount
,
totalAmount
:
totalAmount
,
total
:
total
,
});
})
.
catch
(
function
(
err
)
{
console
.
log
(
err
);
wx
.
hideLoading
();
wx
.
showToast
({
title
:
err
.
msg
||
err
||
'网络错误'
,
title
:
err
.
msg
||
err
.
message
||
'网络错误'
,
icon
:
'none'
,
duration
:
4000
,
});
...
...
@@ -54,4 +52,4 @@ Page({
});
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXF1aXBtZW50LmpzIiwic291c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3RhdHVzQW1vdW50LFxuICAgICAgICAgIHRvdGFsQW1vdW50LFxuICAgICAgICAgIHRvdGFsLFxuICAgICAgICB9KTtcbiAgICAgIH0pXG4gICAgICAuY2F0Y2goZXJyID0+IHtcbiAgICAgICAgY29uc29sZS5sb2coZXJyKTtcbiAgICAgICAgd3guaGlkZUxvYWRpbmcoKTtcbiAgICAgICAgd3guc2hvd1RvYXN0KHtcbiAgICAgICAgICB0aXRsZTogZXJyLm1zZyB8fCBlcnIgfHwgJ+e9kee7nOmUmeivrycsXG4gICAgICAgICAgaWNvbjogJ25vbmUnLFxuICAgICAgICAgIGR1cmF0aW9uOiA0MDAwLFxuICAgICAgICB9KTtcbiAgICAgIH0pO1xuICB9LFxuICBnb1JlcG9ydFBhZ2UoZSkge1xuICAgIGNvbnN0IHsgaW5kZXggfSA9IGUuY3VycmVudFRhcmdldC5kYXRhc2V0O1xuICAgIGNvbnN0IGl0ZW0gPSB0aGlzLmRhdGEuYXJlYURldmljZUFtb3VudFtpbmRleF07XG4gICAgd3gubmF2aWdhdGVUbyh7XG4gICAgICB1cmw6IGAvcGFnZXMvZXF1aXBtZW50UmVwb3J0L2VxdWlwbWVudFJlcG9ydD9hcmVhSWQ9JHtpdGVtLmFyZWFJZH0mYXJlYU5hbWU9JHtpdGVtLmFyZWFOYW1lfWAsXG4gICAgICBzdWNjZXNzOiBmdW5jdGlvbihyZXMpIHtcbiAgICAgICAgLy8g6YCa6L+HZXZlbnRDaGFubmVs5ZCR6KKr5omT5byA6aG16Z2i5Lyg6YCB5pWw5o2uXG4gICAgICAgIHJlcy5ldmVudENoYW5uZWwuZW1pdCgnYWNjZXB0RGF0YUZyb21PcGVuZXJQYWdlJywgeyBkYXRhOiBpdGVtIH0pO1xuICAgICAgfSxcbiAgICB9KTtcbiAgfSxcbn0pO1xuIl19
\ No newline at end of file
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXF1aXBtZW50LmpzIiwic291cmNlUm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KGVyciA9PiB7XG4gICAgICAgIGNvbnNvbGUubG9nKGVycik7XG4gICAgICAgIHd4LmhpZGVMb2FkaW5nKCk7XG4gICAgICAgIHd4LnNob3dUb2FzdCh7XG4gICAgICAgICAgdGl0bGU6IGVyci5tc2cgfHwgZXJyLm1lc3NhZ2UgfHwgJ+e9kee7nOmUmeivrycsXG4gICAgICAgICAgaWNvbjogJ25vbmUnLFxuICAgICAgICAgIGR1cmF0aW9uOiA0MDAwLFxuICAgICAgICB9KTtcbiAgICAgIH0pO1xuICB9LFxuICBnb1JlcG9ydFBhZ2UoZSkge1xuICAgIGNvbnN0IHsgaW5kZXggfSA9IGUuY3VycmVudFRhcmdldC5kYXRhc2V0O1xuICAgIGNvbnN0IGl0ZW0gPSB0aGlzLmRhdGEuYXJlYURldmljZUFtb3VudFtpbmRleF07XG4gICAgd3gubmF2aWdhdGVUbyh7XG4gICAgICB1cmw6IGAvcGFnZXMvZXF1aXBtZW50UmVwb3J0L2VxdWlwbWVudFJlcG9ydD9hcmVhSWQ9JHtpdGVtLmFyZWFJZH0mYXJlYU5hbWU9JHtpdGVtLmFyZWFOYW1lfWAsXG4gICAgICBzdWNjZXNzOiBmdW5jdGlvbihyZXMpIHtcbiAgICAgICAgLy8g6YCa6L+HZXZlbnRDaGFubmVs5ZCR6KKr5omT5byA6aG16Z2i5Lyg6YCB5pWw5o2uXG4gICAgICAgIHJlcy5ldmVudENoYW5uZWwuZW1pdCgnYWNjZXB0RGF0YUZyb21PcGVuZXJQYWdlJywgeyBkYXRhOiBpdGVtIH0pO1xuICAgICAgfSxcbiAgICB9KTtcbiAgfSxcbn0pO1xuIl19
\ No newline at end of file
miniprogram/pages/equipment/equipment.ts
View file @
078998d0
...
...
@@ -32,19 +32,22 @@ 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: Number, item) => count + item.value,
// 0,
// );
this
.
setData
!
({
areaDeviceAmount
,
statusAmount
,
totalAmount
,
total
,
//
total,
});
})
.
catch
(
err
=>
{
console
.
log
(
err
);
wx
.
hideLoading
();
wx
.
showToast
({
title
:
err
.
msg
||
err
||
'网络错误'
,
title
:
err
.
msg
||
err
.
message
||
'网络错误'
,
icon
:
'none'
,
duration
:
4000
,
});
...
...
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