Commit 7d835dbd by 姜雷

修改参数

parent 189926b3
import { statisticsFetch } from '../../../api/fetch';
import { formatPrice } from '../../../utils/util';
// pages/components/EquipmentOperationDetails/EquipmentOperationDetails.js
Component({
......@@ -113,7 +114,10 @@ Component({
const { list } = res.data;
this.setData({
pageNum: 1,
dataList: list,
dataList: list.map(item => ({
...item,
consumeAmount: formatPrice(item.consumeAmount),
})),
});
})
.catch(err => {
......@@ -131,7 +135,10 @@ Component({
})
.then(res => {
wx.hideLoading();
const { list } = res.data;
const list = res.data.list.map(item => ({
...item,
consumeAmount: formatPrice(item.consumeAmount),
}));
if (list && list.length) {
this.setData!({
dataList: [...this.data.dataList, ...list],
......
......@@ -82,13 +82,14 @@ Component({
if (this.data.deviceLocation) {
entity.deviceLocation = this.data.deviceLocation;
}
console.log('areaId: ', this.data.areaId);
return deviceFetch({
url: '/device/warning/paging',
method: 'POST',
data: {
warnLevel: 1,
operator: true,
areaId: this.data.areaId,
campusId: this.data.areaId,
pageNum: this.data.pageNum,
pageSize: this.data.pageSize,
...entity,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment