import axios from 'axios'; import global from '../Global.js' // 基础方法进行封装 function getApiBasic(url, postdata) { return axios.post(url, postdata).then(function (data) { let json = data.data; return json }, function (response) { console.info(response); }) } // 调用的api改写成方法 export function worldDetail(postdata) { let url = headapi + 'worldDetail'; return getApiBasic(url, postdata); } // 测试用接口 export function editbasicinfo(postdata) { let url = headapi + 'editbasicinfo'; return getApiBasic(url, postdata); } export function modPwd(postdata) { let url = headapi + 'modPwd'; return getApiBasic(url, postdata); } export function getLoftInfo(postdata) { let url = headapi + 'getLoftInfo'; return getApiBasic(url, postdata); } export function wifiSingle(postdata) { let url = headapi + 'wifiSingle'; return getApiBasic(url, postdata); } export function Scan(postdata) { let url = headapi + 'Scan'; return getApiBasic(url, postdata); } export function Watching(postdata) { // let url = headapi + 'Watching'; // return getApiBasic(url,postdata); let item = []; let t = 0; for (var i = 0; i < 9; i++) { t = i + 1; item.push({ 'time': "@date", 'checkRs': "Signal设备03@integer(301,600)检测完成,206会议室安全", }) } let res = { Rs: item, Code: 0, Memo: '登陆成功' }; return res; } // 真实接口 // 用户登录 export function SignIn(postdata) { let url = headapi + 'v1/Auth/SignIn'; return getApiBasic(url, postdata); } // 获取验证图片 export function GenVerifyPic(postdata) { let url = headapi + 'v1/Auth/GenVerifyPic'; return getApiBasic(url, postdata); } // 用户退出 export function SignOut(postdata) { let url = headapi + 'v1/Auth/SignOut'; return getApiBasic(url, postdata); } // Region // 添加区域 export function RegionAdd(postdata) { let url = headapi + 'v1/Region/Add'; return getApiBasic(url, postdata); } // 区域详情 export function RegionDetail(postdata) { let url = headapi + 'v1/Region/Detail'; return getApiBasic(url, postdata); } // 区域列表 export function RegionList(postdata) { let url = headapi + 'v1/Region/List'; return getApiBasic(url, postdata); } // Detector // 添加检测设备 export function DetectorAdd(postdata) { let url = headapi + 'v1/Detector/Add'; return getApiBasic(url, postdata); } // 添加检测设备 export function DetectorEdit(postdata) { let url = headapi + 'v1/Detector/Edit'; return getApiBasic(url, postdata); } // 检测设备详情 export function DetectorDetail(postdata) { let url = headapi + 'v1/Detector/Detail'; return getApiBasic(url, postdata); } // 检测设备列表 export function DetectorList(postdata) { let url = headapi + 'v1/Detector/List'; return getApiBasic(url, postdata); } // 检测设备列表 export function Region06G(postdata) { let url = headapi + 'v1/Index/Region06G'; return getApiBasic(url, postdata); } // 区域wifi信道信息 export function WifiChannel(postdata) { let url = headapi + 'v1/Index/WifiChannel'; return getApiBasic(url, postdata); } // 区域监控平面 export function MonitorArea(postdata) { let url = headapi + 'v1/Index/MonitorArea'; return getApiBasic(url, postdata); } // 实时监控详情 export function NetDevMonitor(postdata) { let url = headapi + 'v1/Index/NetDevMonitor'; return getApiBasic(url, postdata); } // 探测设备工作监控 export function WirelessMonitor(postdata) { let url = headapi + 'v1/Index/WirelessMonitor'; return getApiBasic(url, postdata); } // 区域安全状态和无线设备列表 export function DevList(postdata) { let url = headapi + 'v1/Index/DevList'; return getApiBasic(url, postdata); } // 开始无线扫描 export function WirelessStart(postdata) { let url = headapi + 'v1/DetectorControl/WirelessStart'; return getApiBasic(url, postdata); } // 无线扫描状态 export function WirelessStatus(postdata) { let url = headapi + 'v1/DetectorControl/WirelessStatus'; return getApiBasic(url, postdata); } // 扫描策略列表 export function ScanStrategyList(postdata) { let url = headapi + 'v1/ScanStrategy/List'; return getApiBasic(url, postdata); }