20 lines
578 B
JavaScript
20 lines
578 B
JavaScript
|
|
import { httppost1, httppost2, httpget } from "../utils/request";
|
||
|
|
import { message } from 'antd';
|
||
|
|
import apiurl from './apiurl';
|
||
|
|
|
||
|
|
|
||
|
|
//监测预警的列表数据
|
||
|
|
export async function page(params = {}) {
|
||
|
|
const myParams = {
|
||
|
|
countycode:localStorage.getItem('ADCD6') + '000000',
|
||
|
|
...params
|
||
|
|
}
|
||
|
|
|
||
|
|
const { data, code, msg } = await httppost2(apiurl.deviceState.page,myParams) || {};
|
||
|
|
|
||
|
|
if (code !== 200) {
|
||
|
|
message.error(msg || '请求失败');
|
||
|
|
return { list: [], totalRow: 0 };
|
||
|
|
}
|
||
|
|
return { list: data.records, totalRow: data.total };
|
||
|
|
}
|