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
87faceaf
Commit
87faceaf
authored
Jan 14, 2020
by
姜雷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into test
parents
c6a6bd3c
7e07636c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
11 deletions
+15
-11
constants.js
miniprogram/config/constants.js
+3
-2
constants.ts
miniprogram/config/constants.ts
+1
-0
equipment.js
miniprogram/pages/equipment/equipment.js
+5
-3
equipment.ts
miniprogram/pages/equipment/equipment.ts
+6
-6
No files found.
miniprogram/config/constants.js
View file @
87faceaf
...
@@ -22,7 +22,8 @@ exports.masterUrl = {
...
@@ -22,7 +22,8 @@ exports.masterUrl = {
CUSTOMER_SERVER_URL
:
'https://dcxy-customer-manage.dcrym.com'
,
CUSTOMER_SERVER_URL
:
'https://dcxy-customer-manage.dcrym.com'
,
BASE_SERVER_URL
:
'https://dcxy-base-manage.dcrym.com'
,
BASE_SERVER_URL
:
'https://dcxy-base-manage.dcrym.com'
,
OPERATOR_SERVER_URL
:
'https://op-man-serv.dcrym.com'
,
OPERATOR_SERVER_URL
:
'https://op-man-serv.dcrym.com'
,
DEVICE_SERVEL_URL
:
'https://device-management-api.dcrym.com'
,
};
};
exports
.
successCode
=
1000
;
exports
.
successCode
=
1000
;
exports
.
logoutode
=
-
2
;
exports
.
logoutode
=
-
2
;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY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C1tYW4tc2Vydi5kY3J5bS5jb20nLFxuICBERVZJQ0VfU0VSVkVMX1VSTDogJ2h0dHBzOi8vZGV2aWNlLW1hbmFnZW1lbnQtYXBpLmRjcnltLmNvbScsXG59O1xuXG5leHBvcnQgY29uc3Qgc3VjY2Vzc0NvZGUgPSAxMDAwO1xuZXhwb3J0IGNvbnN0IGxvZ291dG9kZSA9IC0yO1xuIl19
\ No newline at end of file
\ No newline at end of file
miniprogram/config/constants.ts
View file @
87faceaf
...
@@ -20,6 +20,7 @@ export const masterUrl = {
...
@@ -20,6 +20,7 @@ export const masterUrl = {
CUSTOMER_SERVER_URL
:
'https://dcxy-customer-manage.dcrym.com'
,
CUSTOMER_SERVER_URL
:
'https://dcxy-customer-manage.dcrym.com'
,
BASE_SERVER_URL
:
'https://dcxy-base-manage.dcrym.com'
,
BASE_SERVER_URL
:
'https://dcxy-base-manage.dcrym.com'
,
OPERATOR_SERVER_URL
:
'https://op-man-serv.dcrym.com'
,
OPERATOR_SERVER_URL
:
'https://op-man-serv.dcrym.com'
,
DEVICE_SERVEL_URL
:
'https://device-management-api.dcrym.com'
,
};
};
export
const
successCode
=
1000
;
export
const
successCode
=
1000
;
...
...
miniprogram/pages/equipment/equipment.js
View file @
87faceaf
...
@@ -25,17 +25,19 @@ Page({
...
@@ -25,17 +25,19 @@ Page({
wx
.
hideLoading
();
wx
.
hideLoading
();
console
.
log
(
res
);
console
.
log
(
res
);
var
_a
=
res
.
data
,
areaDeviceAmount
=
_a
.
areaDeviceAmount
,
statusAmount
=
_a
.
statusAmount
,
totalAmount
=
_a
.
totalAmount
;
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
({
_this
.
setData
({
areaDeviceAmount
:
areaDeviceAmount
,
areaDeviceAmount
:
areaDeviceAmount
,
statusAmount
:
statusAmount
,
statusAmount
:
statusAmount
,
totalAmount
:
totalAmount
,
totalAmount
:
totalAmount
,
total
:
total
,
});
});
})
})
.
catch
(
function
(
err
)
{
.
catch
(
function
(
err
)
{
console
.
log
(
err
);
console
.
log
(
err
);
wx
.
hideLoading
();
wx
.
hideLoading
();
wx
.
showToast
({
wx
.
showToast
({
title
:
err
.
msg
||
JSON
.
stringify
(
err
)
||
'网络错误'
,
title
:
err
.
msg
||
err
.
errMsg
||
'网络错误'
,
icon
:
'none'
,
icon
:
'none'
,
duration
:
4000
,
duration
:
4000
,
});
});
...
@@ -52,4 +54,4 @@ Page({
...
@@ -52,4 +54,4 @@ Page({
});
});
},
},
});
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXF1aXBtZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZXF1aXBtZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEseUNBQThDO0FBRzlDLElBQUksQ0FBQztJQUlILElBQUksRUFBRTtRQUNKLE1BQU0sRUFBRSxDQUFDLFNBQVMsRUFBRSxTQUFTLEVBQUUsU0FBUyxFQUFFLFNBQVMsQ0FBQztRQUNwRCxnQkFBZ0IsRUFBRSxFQUFFO1FBQ3BCLFlBQVksRUFBRSxFQUFFO1FBQ2hCLFdBQVcsRUFBRSxFQUFFO1FBQ2YsS0FBSyxFQUFFLENBQUM7S0FDVDtJQUtELE1BQU07UUFDSixPQUFPLENBQUMsR0FBRyxDQUFDLFdBQVcsQ0FBQyxDQUFDO1FBQ3pCLElBQUksQ0FBQyxTQUFTLEVBQUUsQ0FBQztJQUNuQixDQUFDO0lBRUQsU0FBUztRQUFULGlCQStCQztRQTlCQyxFQUFFLENBQUMsV0FBVyxDQUFDO1lBQ2IsS0FBSyxFQUFFLEtBQUs7U0FDYixDQUFDLENBQUM7UUFDSCxtQkFBVyxDQUFDO1lBQ1Y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pY2UvcmVwb3J0L21haW5QYWdlJyxcbiAgICB9KVxuICAgICAgLnRoZW4ocmVzID0+IHtcbiAgICAgICAgd3guaGlkZUxvYWRpbmcoKTtcbiAgICAgICAgY29uc29sZS5sb2cocmVzKTtcbiAgICAgICAgY29uc3QgeyBhcmVhRGV2aWNlQW1vdW50LCBzdGF0dXNBbW91bnQsIHRvdGFsQW1vdW50IH0gPSByZXMuZGF0YTtcbiAgICAgICAgbGV0IHRvdGFsID0gdG90YWxBbW91bnQucmVkdWNlKFxuICAgICAgICAgIChjb3VudDogTnVtYmVyLCBpdGVtKSA9PiBjb3VudCArIGl0ZW0udmFsdWUsXG4gICAgICAgICAgMCxcbiAgICAgICAgKTtcbiAgICAgICAgdGhpcy5zZXREYXRhISh7XG4gICAgICAgICAgYXJlYURldmljZUFtb3VudCxcbiAgICAgICAgICBzdGF0dXNBbW91bnQsXG4gICAgICAgICAgdG90YWxBbW91bnQsXG4gICAgICAgICAgdG90YWwsXG4gICAgICAgIH0pO1xuICAgICAgfSlcbiAgICAgIC5jYXRjaChlcnIgPT4ge1xuICAgICAgICBjb25zb2xlLmxvZyhlcnIpO1xuICAgICAgICB3eC5oaWRlTG9hZGluZygpO1xuICAgICAgICB3eC5zaG93VG9hc3Qoe1xuICAgICAgICAgIHRpdGxlOiBlcnIubXNnIHx8IGVyci5lcnJNc2cgfHwgJ+e9kee7nOmUmeivrycsXG4gICAgICAgICAgaWNvbjogJ25vbmUnLFxuICAgICAgICAgIGR1cmF0aW9uOiA0MDAwLFxuICAgICAgICB9KTtcbiAgICAgIH0pO1xuICB9LFxuICBnb1JlcG9ydFBhZ2UoZSkge1xuICAgIGNvbnN0IHsgaW5kZXggfSA9IGUuY3VycmVudFRhcmdldC5kYXRhc2V0O1xuICAgIGNvbnN0IGl0ZW0gPSB0aGlzLmRhdGEuYXJlYURldmljZUFtb3VudFtpbmRleF07XG4gICAgd3gubmF2aWdhdGVUbyh7XG4gICAgICB1cmw6IGAvcGFnZXMvZXF1aXBtZW50UmVwb3J0L2VxdWlwbWVudFJlcG9ydD9hcmVhSWQ9JHtpdGVtLmFyZWFJZH0mYXJlYU5hbWU9JHtpdGVtLmFyZWFOYW1lfWAsXG4gICAgICBzdWNjZXNzOiBmdW5jdGlvbihyZXMpIHtcbiAgICAgICAgLy8g6YCa6L+HZXZlbnRDaGFubmVs5ZCR6KKr5omT5byA6aG16Z2i5Lyg6YCB5pWw5o2uXG4gICAgICAgIHJlcy5ldmVudENoYW5uZWwuZW1pdCgnYWNjZXB0RGF0YUZyb21PcGVuZXJQYWdlJywgeyBkYXRhOiBpdGVtIH0pO1xuICAgICAgfSxcbiAgICB9KTtcbiAgfSxcbn0pO1xuIl19
\ No newline at end of file
\ No newline at end of file
miniprogram/pages/equipment/equipment.ts
View file @
87faceaf
...
@@ -32,22 +32,22 @@ Page({
...
@@ -32,22 +32,22 @@ Page({
wx
.
hideLoading
();
wx
.
hideLoading
();
console
.
log
(
res
);
console
.
log
(
res
);
const
{
areaDeviceAmount
,
statusAmount
,
totalAmount
}
=
res
.
data
;
const
{
areaDeviceAmount
,
statusAmount
,
totalAmount
}
=
res
.
data
;
//
let total = totalAmount.reduce(
let
total
=
totalAmount
.
reduce
(
//
(count: Number, item) => count + item.value,
(
count
:
Number
,
item
)
=>
count
+
item
.
value
,
//
0,
0
,
//
);
);
this
.
setData
!
({
this
.
setData
!
({
areaDeviceAmount
,
areaDeviceAmount
,
statusAmount
,
statusAmount
,
totalAmount
,
totalAmount
,
//
total,
total
,
});
});
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
console
.
log
(
err
);
console
.
log
(
err
);
wx
.
hideLoading
();
wx
.
hideLoading
();
wx
.
showToast
({
wx
.
showToast
({
title
:
err
.
msg
||
JSON
.
stringify
(
err
)
||
'网络错误'
,
title
:
err
.
msg
||
err
.
errMsg
||
'网络错误'
,
icon
:
'none'
,
icon
:
'none'
,
duration
:
4000
,
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