| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- 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);
- }
|