// 定义服务器端域名
var javaApi = '/api/swagger/';
// var  mineName = '麦垛山煤矿';
// var  mineName = '枣泉煤矿';
var mineName = 'E信管理';

var ossImgName = '宁东运营部';

// 测试路径
// var URLjava = 'http://colliery.nxjiewei.com'+javaApi;
// var urlphp = 'http://colliery.nxjiewei.com/';
// 工单上传图片和文件地址
var ceshiUrl = 'http://47.105.143.227:8083/';//测试地址java

// 设备物资，固定电缆
// var urlJavaOld = 'http://nxjiewei.com/colliery-system/api/page/v1/eqByNameList.html'
// var URLjava = 'http://apptest.jieweizhineng.com'+javaApi;

// 枣泉煤矿
var zaoquanUrlphp = 'http://zaoquan.nxjiewei.com:8011/';
var zaoquanURLjava = 'http://zaoquan.nxjiewei.com:8011'+javaApi;
var zaoquanUrlImgUrl = 'http://ningdongyunying.nxjiewei.com';
var zaoquanUrlRouter = {
    bannerApi: zaoquanUrlphp + 'api/scrollImg/list',//banner
    nwesApi: zaoquanUrlphp + 'api/article/list',//新闻
    NoticeApi: zaoquanUrlphp + 'api/notice/list',//公告
    ImgApi: zaoquanUrlphp + 'api/homeNav/list',//图片导航
    DistrictteamApi: zaoquanUrlphp + 'api/home/links',//区队
    userInfoApi: zaoquanUrlphp + 'api/user/info',//个人信息
    findMessageApi: zaoquanURLjava + 'api/dynamic/v1/findMessage/',//消息列表   二维码 、 巡检记录
    getPageAndRecordDynamic: zaoquanURLjava + "api/dynamic/v1/getPageAndRecordDynamic",//二维码和记录合并
    getPageDynamicApi: zaoquanURLjava + 'api/dynamic/v1/getPageDynamic',//获取二维码列表
    getRecordDynamicApi: zaoquanURLjava + 'api/dynamic/v1/getRecordDynamic',//获取巡检列表
    addPageDynamicApi: zaoquanURLjava + 'api/dynamic/v1/addPageDynamic',//已读二维码
    addRecordDynamicApi: zaoquanURLjava + 'api/dynamic/v1/addRecordDynamic',//已读巡检记录
    getPageRecordInstaneClosedLoop: zaoquanURLjava + 'api/record/v1/getPageRecordInstaneClosedLoop',// 查询二维码巡检的闭环列表
    getPageRecordInstanCreateBy: zaoquanURLjava + 'api/record/v1/getPageRecordInstanCreateBy',// 我的记录列表
    regionApi: zaoquanUrlphp + 'api/monitor/video/region',//监控列表权限
    // cameraApi:urlphp+'api/monitor/video/camera',//监控子项
    selectRootRequest: zaoquanURLjava + 'api/resource/v1/selectRootRequest',//视频区域列表
    selectResourceList: zaoquanURLjava + 'api/resource/v1/selectResourceList',//视频播放列表
    selectResourcePreviewURLs: zaoquanURLjava + 'api/resource/v1/selectResourcePreviewURLs',//视频播放URl
    findMessageCount: zaoquanURLjava + 'api/dynamic/v1/findMessageCount/',
    seachQrcode: zaoquanURLjava + 'api/page/v1/getPageList',//查询二维码
    getDeviceValueTypeCode: ceshiUrl + 'api/device/v1/getDeviceValueTypeCode/',//查询传感器的数值信息
    getData: ceshiUrl + 'api/data/v1/getData',//实时数据查询
    getDeviceInfo: zaoquanUrlphp + 'api/safety/search',//查询传感器信息
    searchData: ceshiUrl + 'api/data/v1/searchData',//查询传感器实时数据详情
    securityJurisdiction: zaoquanUrlphp + 'api/detection/show',//安全监测权限
    getSafetyTotal: zaoquanUrlphp + 'api/safety/total',//704 安全监测
    getSafetyList: zaoquanUrlphp + 'api/safety/220704',//安全监测 列表
    getPersonalInfo: zaoquanUrlphp + 'api/personnel/people/now',//704人员定位
    getPersonalMap: zaoquanUrlphp + 'api/personnel/people/220704',//704人员定位详情
    getSafetyStatusList: zaoquanUrlphp + 'api/safety/220704/list',//704安全数据详情
    //工单
    getGroupList: zaoquanUrlphp + "api/section/getGroupList",//获取部门列表
    getPersonalList: zaoquanUrlphp + 'api/user/list',//获取部门人员
    getList: zaoquanUrlphp + 'api/section/getlist',//部门列表接口
    getAlllist: zaoquanUrlphp + 'api/section/getalllist',//部门列表接口1
    searchPersonal: zaoquanUrlphp + 'api/user/search',//搜索人员
    wordOrderList: zaoquanUrlphp + 'api/worksheet/classify/list',//工单分类
    applyList: zaoquanUrlphp + 'api/worksheet/design/list',//可申请工单列表
    getApplyList: zaoquanUrlphp + 'api/worksheet/apply/list',// 自己审请的工单列表
    getApplyD: zaoquanUrlphp + 'api/worksheet/design/',//获取可申请工单详情
    submitApply: zaoquanUrlphp + 'api/worksheet/apply',//提交工单信息
    submitApplyDe: zaoquanUrlphp + 'api/worksheet/apply/',//提交工单详情
    getExamine: zaoquanUrlphp + 'api/worksheet/check/list',//待审核工单
    getExamineDe: zaoquanUrlphp + 'api/worksheet/check/', //待审核工单详情
    getAlreadyDe: zaoquanUrlphp + 'api/worksheet/checked/', //待审核工单详情
    submitAdopt: zaoquanUrlphp + 'api/worksheet/check/',//通过审核
    getAlreadyExamine: zaoquanUrlphp + 'api/worksheet/checked/list',//已审核
    getAll_list: zaoquanUrlphp + 'api/worksheet/design/all_list',//所有工单设计列表
    fill_order: zaoquanUrlphp + 'api/worksheet/fill_order/', //工单信息补充
    up_images: zaoquanUrlphp + 'api/worksheet/design/up_images', // 图片上传
    //消息
    getNewsList: zaoquanUrlphp + 'api/message/list',//消息列表
    getRead: zaoquanUrlphp + 'api/message/read',//已读消息
    getNewsNum: zaoquanUrlphp + 'api/message/unread_num',//消息总数
    thumbs: zaoquanUrlphp + 'api/user/like/post',//点赞or取消点赞
    comment: zaoquanUrlphp + 'api/user/comment/post',//提交留言
    delComment: zaoquanUrlphp + 'api/user/comment/del',//删除留言
    simulationTotal: zaoquanUrlphp + 'api/safety/simulation/total',//模拟量统计
    sluicetTotal: zaoquanUrlphp + 'api/safety/sluice/total',//开关量统计
    safetyDetaile: zaoquanUrlphp + 'api/safety/info/total',//安全数据详情
    downWellTotal: zaoquanUrlphp + 'api/personnel/month/total',//一周下井趋势
    currentPersonalNum: zaoquanUrlphp + 'api/personnel/now',//一周下井趋势当前人数
    getBanNowDayTotal: zaoquanURLjava + 'api/pdcban/v1/getBanNowDayTotal',//今日产量
    getBanDayList: zaoquanURLjava + '/api/pdcban/v1/getBanDayList',//一周的产量
    getMonthSumByYear: zaoquanURLjava + 'api/pdcban/v1/getMonthSumByYear',//一年的产量
    getBulletin: zaoquanUrlphp + 'api/dispatch/bulletin',//生产数据公告
    getSchedule: zaoquanUrlphp + 'api/dispatch/schedule',//调度统计
    getAlarmData: zaoquanUrlphp + 'api/safety/alarm',//报警分类
    getGasData: zaoquanUrlphp + 'api/safety/methane',//瓦斯异常情况
    getChangMessageList: zaoquanURLjava + 'api/dynamic/v1/changMessageList/',//二维码和记录置为已读
    getChangMessageDepartmentIdList: zaoquanURLjava + 'api/dynamic/v1/changMessageDepartmentIdList', // 二维码已读
    chartsJurisdiction: zaoquanUrlphp + 'api/dispatch/show',//图表权限
    personalLocation: zaoquanUrlphp + 'api/personnel/show',//人员定位权限
    getPersonnalList: zaoquanUrlphp + 'api/personnel/region/total',//人员定位列表
    getPersonnalDistributionList: zaoquanUrlphp + 'api/personnel/mine/total',//每个矿井人数统计
    getPersonnalDe: zaoquanUrlphp + 'api/personnel/mine/people',//人员详情
    searchPeople: zaoquanUrlphp + 'api/personnel/people/search',//查询人员定位
    peopleInfo: zaoquanUrlphp + 'api/personnel/people/info',//个人详情
    getDayHourTotal: zaoquanURLjava + 'api/pdcban/v1/getDayHourTotal',//皮带称产量
    getPeopleNow: zaoquanUrlphp + 'api/personnel/people/now',//当前下井人数
    getOfficeTotal: zaoquanUrlphp + 'api/personnel/office/total',//井下人员（部门分布）
    getBasicTotal: zaoquanUrlphp + 'api/personnel/basic/total',//基层区队
    getWorkingTotal: zaoquanUrlphp + 'api/personnel/working/total',//工作面人数统计
    getDepartToday: zaoquanUrlphp + 'api/personnel/depart/today',//各部门人数统计
    getFacilityStatus: zaoquanUrlphp + 'api/personnel/facility/status',//人员定位系统设备运行状态
    getTimeout: zaoquanUrlphp + 'api/personnel/timeout/total',//人员超时统计
    getHelptotal: zaoquanUrlphp + 'api/personnel/help/total',//人员求救统计
    getPersonnelTimeoutDetails: zaoquanUrlphp + 'api/personnel/timeout/info',//人员超时统计详情
    getPersonnelHelpDetails: zaoquanUrlphp + 'api/personnel/help/info',//人员求救统计详情
    getPersonnelFacilityDetails: zaoquanUrlphp + 'api/personnel/facility/info',//人员求救统计详情
    getPersonnelWorkingDetails: zaoquanUrlphp + 'api/personnel/working/info',//工作面人员详情
    getPersonneldepartDetails: zaoquanUrlphp + 'api/personnel/depart/people',//井下部门分布列表
    getPersonneltodayDetails: zaoquanUrlphp + 'api/personnel/depart/people/today',//井下部门分布列表
    getBanDayThree: zaoquanURLjava + 'api/pdcban/v1/getBanDayThree',//一周的产量列表
    getBanNowDayAllTotal: zaoquanURLjava + 'api/pdcban/v1/getBanNowDayAllTotal',//今日产量
    getEfficacyCut: zaoquanUrlphp + 'api/dispatch/efficacy/cut',//割煤刀数
    efficacyShow: zaoquanUrlphp + 'api/efficacy/show',//效能管控
    getEfficacyInfo: zaoquanUrlphp + 'api/dispatch/efficacy/cut/info',//割煤刀数工作面列表
    getFanStatus: zaoquanUrlphp + 'api/blower/status/now',//风机状态
    getFanData: zaoquanUrlphp + 'api/blower/chart/hour',//风量趋势
    getFanDatas: zaoquanUrlphp + 'api/blower/param/now',// 风量数据
    getGdWsclDataNewList: zaoquanURLjava + 'api/gdwscldata/v1/getGdWsclDataNewList',//矿井水处理
    // getSelectWebSocketRequest:URLjava+'api/websocket/v1/selectWebSocketRequest',//采煤机
    getSelectWebSocketRequest: zaoquanUrlphp + '220704.php',//704 数据
    working220704: zaoquanUrlphp + 'api/working220704/show',//704权限
    getQrcodeDe: zaoquanURLjava + 'api/page/v1/detailPage',//二维码详情
    addPageUser: zaoquanURLjava + 'api/pageuser/v1/addPageUser',//添加浏览记录
    getPageUserByPageId: zaoquanURLjava + 'api/pageuser/v1/getPageUserByPageId/',//获取浏览记录
    getPageRecordInstanceList: zaoquanURLjava + 'api/record/v1/getPageRecordInstanceList',//记录列表
    selectRecordByGetPageId: zaoquanURLjava + 'api/page/v1/selectRecordByGetPageId/',// 查询记录模版名称
    getInspection: zaoquanURLjava + 'api/record/v1/getInspection',//记录模版内容
    addRecordInstance: zaoquanURLjava + 'api/record/v1/addRecordInstance',//添加记录
    getRecordInstanceDetailList: zaoquanURLjava + 'api/record/v1/getRecordInstanceDetailList',//记录详情
    addRecordUser: zaoquanURLjava + 'api/recodeuser/v1/addRecordUser',//添加记录浏览人数
    getRecordUserById: zaoquanURLjava + 'api/recodeuser/v1/getRecordUserById/',//获取记录浏览人数
    getSearchPageRecordInstance: zaoquanURLjava + 'api/record/v1/searchPageRecordInstance/',//二维码统计标示
    selectPageStatusPercet: zaoquanURLjava + 'api/record/v1/selectPageStatusPercet',//查询状态的比例
    selectPageRecodePercet: zaoquanURLjava + 'api/record/v1/selectPageRecodePercet/',//查询记录项的比例
    getPageRecordInstanceListRadio: zaoquanURLjava + 'api/record/v1/getPageRecordInstanceListRadio',//记录项统计 单选
    getRecordInstanceDetailListMobileExcel: zaoquanURLjava + 'api/record/v1/getRecordInstanceDetailListMobileExcel',//记录导出
    getInvoice: zaoquanUrlphp + 'api/workbench/invoice/info',//发票
    getMymonth: zaoquanUrlphp + 'api/notice/my_list/month',//值班月份-个人
    getDutyMylist: zaoquanUrlphp + 'api/notice/my_list/list',//个人值班
    getAllmonth: zaoquanUrlphp + 'api/notice/all_list/month',//值班月份-所有人
    getDutyAlllist: zaoquanUrlphp + 'api/notice/all_list/list',//所有人值班
    getPassword: zaoquanUrlphp + 'api/workbench/salary/password',//工资权限验证
    getWagesDe: zaoquanUrlphp + 'api/workbench/salary/my_info',//工资详情
    getWagesChart: zaoquanUrlphp + 'api/workbench/salary/chart',//工资图表
    getAccessToken: 'https://open.ys7.com/api/lapp/token/get',//获取萤石视频的token
    getVideoList: 'https://open.ys7.com/api/lapp/device/camera/list',//获取萤石视频List
    getVideoUrl: 'https://open.ys7.com/api/lapp/live/address/get',//获取萤石视频Url
    // 胶轮车
    rubberTyredCarList: zaoquanUrlphp + 'api/car/list', // 胶轮车列表
    rubberTyredcarDetails: zaoquanUrlphp + 'api/car/tra', // 车辆轨迹
    signalLampMsg: zaoquanUrlphp + 'api/car/signal',
    transparentShow: zaoquanUrlphp+'/api/transport/show' // 交通车权限
}

// 宁东运营部 // http://ningdongyunying.nxjiewei.com/
// var URLjava = 'http://192.168.0.104:8084/'
var URLjava = 'http://ningdongyunying.nxjiewei.com/' + javaApi;
var urlphp = 'http://ningdongyunying.nxjiewei.com/';
var urlImgUrl = 'http://ningdongyunying.nxjiewei.com';
// 宁东运营部
var UrlRouter = {
    loginApi: urlphp + 'api/oauth/token',//登录
    vcodeApi: urlphp + 'api/sms/vcode',//发送验证吗
    setApi: urlphp + 'api/user/mobile/set',//绑定手机号
    uploadFile: URLjava + 'api/common/v1/uploadFile',//上传
    repasswordApi: urlphp + 'api/user/repassword',//修改密码
    bannerApi: urlphp + 'api/scrollImg/list',//banner
    nwesApi: urlphp + 'api/article/list',//新闻
    NoticeApi: urlphp + 'api/notice/list',//公告
    ImgApi: urlphp + 'api/homeNav/list',//图片导航
    DistrictteamApi: urlphp + 'api/home/links',//区队
    userInfoApi: urlphp + 'api/user/info',//个人信息
    findMessageApi: URLjava + 'api/dynamic/v1/findMessage/',//消息列表   二维码 、 巡检记录
    getPageAndRecordDynamic: URLjava + "api/dynamic/v1/getPageAndRecordDynamic",//二维码和记录合并
    getPageDynamicApi: URLjava + 'api/dynamic/v1/getPageDynamic',//获取二维码列表
    getRecordDynamicApi: URLjava + 'api/dynamic/v1/getRecordDynamic',//获取巡检列表
    addPageDynamicApi: URLjava + 'api/dynamic/v1/addPageDynamic',//已读二维码
    addRecordDynamicApi: URLjava + 'api/dynamic/v1/addRecordDynamic',//已读巡检记录
    getPageRecordInstaneClosedLoop: URLjava + 'api/record/v1/getPageRecordInstaneClosedLoop',// 查询二维码巡检的闭环列表
    getPageRecordInstanCreateBy: URLjava + 'api/record/v1/getPageRecordInstanCreateBy',// 我的记录列表
    regionApi: urlphp + 'api/monitor/video/region',//监控列表权限
    // cameraApi:urlphp+'api/monitor/video/camera',//监控子项
    selectRootRequest: URLjava + 'api/resource/v1/selectRootRequest',//视频区域列表
    selectResourceList: URLjava + 'api/resource/v1/selectResourceList',//视频播放列表
    selectResourcePreviewURLs: URLjava + 'api/resource/v1/selectResourcePreviewURLs',//视频播放URl
    findMessageCount: URLjava + 'api/dynamic/v1/findMessageCount/',
    seachQrcode: URLjava + 'api/page/v1/getPageList',//查询二维码
    getDeviceValueTypeCode: ceshiUrl + 'api/device/v1/getDeviceValueTypeCode/',//查询传感器的数值信息
    getData: ceshiUrl + 'api/data/v1/getData',//实时数据查询
    getDeviceInfo: urlphp + 'api/safety/search',//查询传感器信息
    searchData: ceshiUrl + 'api/data/v1/searchData',//查询传感器实时数据详情
    securityJurisdiction: urlphp + 'api/detection/show',//安全监测权限
    getSafetyTotal: urlphp + 'api/safety/total',//704 安全监测
    getSafetyList: urlphp + 'api/safety/220704',//安全监测 列表
    getPersonalInfo: urlphp + 'api/personnel/people/now',//704人员定位
    getPersonalMap: urlphp + 'api/personnel/people/220704',//704人员定位详情
    getSafetyStatusList: urlphp + 'api/safety/220704/list',//704安全数据详情
    //工单
    getGroupList: urlphp + "api/section/getGroupList",//获取部门列表
    getPersonalList: urlphp + 'api/user/list',//获取部门人员
    getList: urlphp + 'api/section/getlist',//部门列表接口
    getAlllist: urlphp + 'api/section/getalllist',//部门列表接口1
    searchPersonal: urlphp + 'api/user/search',//搜索人员
    wordOrderList: urlphp + 'api/worksheet/classify/list',//工单分类
    applyList: urlphp + 'api/worksheet/design/list',//可申请工单列表
    getApplyList: urlphp + 'api/worksheet/apply/list',// 自己审请的工单列表
    getApplyD: urlphp + 'api/worksheet/design/',//获取可申请工单详情
    submitApply: urlphp + 'api/worksheet/apply',//提交工单信息
    submitApplyDe: urlphp + 'api/worksheet/apply/',//提交工单详情
    getExamine: urlphp + 'api/worksheet/check/list',//待审核工单
    getExamineDe: urlphp + 'api/worksheet/check/', //待审核工单详情
    getAlreadyDe: urlphp + 'api/worksheet/checked/', //待审核工单详情
    submitAdopt: urlphp + 'api/worksheet/check/',//通过审核
    getAlreadyExamine: urlphp + 'api/worksheet/checked/list',//已审核
    getAll_list: urlphp + 'api/worksheet/design/all_list',//所有工单设计列表
    fill_order: urlphp + 'api/worksheet/fill_order/', //工单信息补充
    up_images: urlphp + 'api/worksheet/design/up_images', // 图片上传
    //消息
    getNewsList: urlphp + 'api/message/list',//消息列表
    getRead: urlphp + 'api/message/read',//已读消息
    getNewsNum: urlphp + 'api/message/unread_num',//消息总数
    thumbs: urlphp + 'api/user/like/post',//点赞or取消点赞
    comment: urlphp + 'api/user/comment/post',//提交留言
    delComment: urlphp + 'api/user/comment/del',//删除留言
    simulationTotal: urlphp + 'api/safety/simulation/total',//模拟量统计
    sluicetTotal: urlphp + 'api/safety/sluice/total',//开关量统计
    safetyDetaile: urlphp + 'api/safety/info/total',//安全数据详情
    downWellTotal: urlphp + 'api/personnel/month/total',//一周下井趋势
    currentPersonalNum: urlphp + 'api/personnel/now',//一周下井趋势当前人数
    getBanNowDayTotal: URLjava + 'api/pdcban/v1/getBanNowDayTotal',//今日产量
    getBanDayList: URLjava + '/api/pdcban/v1/getBanDayList',//一周的产量
    getMonthSumByYear: URLjava + 'api/pdcban/v1/getMonthSumByYear',//一年的产量
    getBulletin: urlphp + 'api/dispatch/bulletin',//生产数据公告
    getSchedule: urlphp + 'api/dispatch/schedule',//调度统计
    getAlarmData: urlphp + 'api/safety/alarm',//报警分类
    getGasData: urlphp + 'api/safety/methane',//瓦斯异常情况
    getChangMessageList: URLjava + 'api/dynamic/v1/changMessageList/',//二维码和记录置为已读
    getChangMessageDepartmentIdList: URLjava + 'api/dynamic/v1/changMessageDepartmentIdList', // 二维码已读
    chartsJurisdiction: urlphp + 'api/dispatch/show',//图表权限
    personalLocation: urlphp + 'api/personnel/show',//人员定位权限
    getPersonnalList: urlphp + 'api/personnel/region/total',//人员定位列表
    getPersonnalDistributionList: urlphp + 'api/personnel/mine/total',//每个矿井人数统计
    getPersonnalDe: urlphp + 'api/personnel/mine/people',//人员详情
    searchPeople: urlphp + 'api/personnel/people/search',//查询人员定位
    peopleInfo: urlphp + 'api/personnel/people/info',//个人详情
    getDayHourTotal: URLjava + 'api/pdcban/v1/getDayHourTotal',//皮带称产量
    getPeopleNow: urlphp + 'api/personnel/people/now',//当前下井人数
    getOfficeTotal: urlphp + 'api/personnel/office/total',//井下人员（部门分布）
    getBasicTotal: urlphp + 'api/personnel/basic/total',//基层区队
    getWorkingTotal: urlphp + 'api/personnel/working/total',//工作面人数统计
    getDepartToday: urlphp + 'api/personnel/depart/today',//各部门人数统计
    getFacilityStatus: urlphp + 'api/personnel/facility/status',//人员定位系统设备运行状态
    getTimeout: urlphp + 'api/personnel/timeout/total',//人员超时统计
    getHelptotal: urlphp + 'api/personnel/help/total',//人员求救统计
    getPersonnelTimeoutDetails: urlphp + 'api/personnel/timeout/info',//人员超时统计详情
    getPersonnelHelpDetails: urlphp + 'api/personnel/help/info',//人员求救统计详情
    getPersonnelFacilityDetails: urlphp + 'api/personnel/facility/info',//人员求救统计详情
    getPersonnelWorkingDetails: urlphp + 'api/personnel/working/info',//工作面人员详情
    getPersonneldepartDetails: urlphp + 'api/personnel/depart/people',//井下部门分布列表
    getPersonneltodayDetails: urlphp + 'api/personnel/depart/people/today',//井下部门分布列表
    getBanDayThree: URLjava + 'api/pdcban/v1/getBanDayThree',//一周的产量列表
    getBanNowDayAllTotal: URLjava + 'api/pdcban/v1/getBanNowDayAllTotal',//今日产量
    getEfficacyCut: urlphp + 'api/dispatch/efficacy/cut',//割煤刀数
    efficacyShow: urlphp + 'api/efficacy/show',//效能管控
    getEfficacyInfo: urlphp + 'api/dispatch/efficacy/cut/info',//割煤刀数工作面列表
    getFanStatus: urlphp + 'api/blower/status/now',//风机状态
    getFanData: urlphp + 'api/blower/chart/hour',//风量趋势
    getFanDatas: urlphp + 'api/blower/param/now',// 风量数据
    getGdWsclDataNewList: URLjava + 'api/gdwscldata/v1/getGdWsclDataNewList',//矿井水处理
    // getSelectWebSocketRequest:URLjava+'api/websocket/v1/selectWebSocketRequest',//采煤机
    getSelectWebSocketRequest: urlphp + '220704.php',//704 数据
    working220704: urlphp + 'api/working220704/show',//704权限
    getQrcodeDe: URLjava + 'api/page/v1/detailPage',//二维码详情
    addPageUser: URLjava + 'api/pageuser/v1/addPageUser',//添加浏览记录
    getPageUserByPageId: URLjava + 'api/pageuser/v1/getPageUserByPageId/',//获取浏览记录
    getPageRecordInstanceList: URLjava + 'api/record/v1/getPageRecordInstanceList',//记录列表
    selectRecordByGetPageId: URLjava + 'api/page/v1/selectRecordByGetPageId/',// 查询记录模版名称
    getInspection: URLjava + 'api/record/v1/getInspection',//记录模版内容
    addRecordInstance: URLjava + 'api/record/v1/addRecordInstance',//添加记录
    getRecordInstanceDetailList: URLjava + 'api/record/v1/getRecordInstanceDetailList',//记录详情
    addRecordUser: URLjava + 'api/recodeuser/v1/addRecordUser',//添加记录浏览人数
    getRecordUserById: URLjava + 'api/recodeuser/v1/getRecordUserById/',//获取记录浏览人数
    getSearchPageRecordInstance: URLjava + 'api/record/v1/searchPageRecordInstance/',//二维码统计标示
    selectPageStatusPercet: URLjava + 'api/record/v1/selectPageStatusPercet',//查询状态的比例
    selectPageRecodePercet: URLjava + 'api/record/v1/selectPageRecodePercet/',//查询记录项的比例
    getPageRecordInstanceListRadio: URLjava + 'api/record/v1/getPageRecordInstanceListRadio',//记录项统计 单选
    getRecordInstanceDetailListMobileExcel: URLjava + 'api/record/v1/getRecordInstanceDetailListMobileExcel',//记录导出
    getInvoice: urlphp + 'api/workbench/invoice/info',//发票
    getMymonth: urlphp + 'api/notice/my_list/month',//值班月份-个人
    getDutyMylist: urlphp + 'api/notice/my_list/list',//个人值班
    getAllmonth: urlphp + 'api/notice/all_list/month',//值班月份-所有人
    getDutyAlllist: urlphp + 'api/notice/all_list/list',//所有人值班
    getPassword: urlphp + 'api/workbench/salary/password',//工资权限验证
    getWagesDe: urlphp + 'api/workbench/salary/my_info',//工资详情
    getWagesChart: urlphp + 'api/workbench/salary/chart',//工资图表
    getAccessToken: 'https://open.ys7.com/api/lapp/token/get',//获取萤石视频的token
    getVideoList: 'https://open.ys7.com/api/lapp/device/camera/list',//获取萤石视频List
    getVideoUrl: 'https://open.ys7.com/api/lapp/live/address/get',//获取萤石视频Url
    // 胶轮车
    rubberTyredCarList: zaoquanUrlphp + 'api/car/list', // 胶轮车列表
    rubberTyredcarDetails: zaoquanUrlphp + 'api/car/tra', // 车辆轨迹
    signalLampMsg: zaoquanUrlphp + 'api/car/signal',
    getWorkbenchList: urlphp + 'api/workbench/index', // 工作台
    getPagebyNOAndName: URLjava + 'api/page/v1/getPagebyNOAndName'
};

// 金凤
var jinfengUrlphp = 'http://jinfeng.nxjiewei.com:8011/';
var jinfengURLjava = 'http://jinfeng.nxjiewei.com:8011'+javaApi;
// 金凤
var jinfengUrlRouter = {
    bannerApi: jinfengUrlphp + 'api/scrollImg/list',//banner
    nwesApi: jinfengUrlphp + 'api/article/list',//新闻
    NoticeApi: jinfengUrlphp + 'api/notice/list',//公告
    ImgApi: jinfengUrlphp + 'api/homeNav/list',//图片导航
    DistrictteamApi: jinfengUrlphp + 'api/home/links',//区队
    userInfoApi: jinfengUrlphp + 'api/user/info',//个人信息
    findMessageApi: jinfengURLjava + 'api/dynamic/v1/findMessage/',//消息列表   二维码 、 巡检记录
    getPageAndRecordDynamic: jinfengURLjava + "api/dynamic/v1/getPageAndRecordDynamic",//二维码和记录合并
    getPageDynamicApi: jinfengURLjava + 'api/dynamic/v1/getPageDynamic',//获取二维码列表
    getRecordDynamicApi: jinfengURLjava + 'api/dynamic/v1/getRecordDynamic',//获取巡检列表
    addPageDynamicApi: jinfengURLjava + 'api/dynamic/v1/addPageDynamic',//已读二维码
    addRecordDynamicApi: jinfengURLjava + 'api/dynamic/v1/addRecordDynamic',//已读巡检记录
    getPageRecordInstaneClosedLoop: jinfengURLjava + 'api/record/v1/getPageRecordInstaneClosedLoop',// 查询二维码巡检的闭环列表
    getPageRecordInstanCreateBy: jinfengURLjava + 'api/record/v1/getPageRecordInstanCreateBy',// 我的记录列表
    regionApi: jinfengUrlphp + 'api/monitor/video/region',//监控列表权限
    // cameraApi:urlphp+'api/monitor/video/camera',//监控子项
    selectRootRequest: jinfengURLjava + 'api/resource/v1/selectRootRequest',//视频区域列表
    selectResourceList: jinfengURLjava + 'api/resource/v1/selectResourceList',//视频播放列表
    selectResourcePreviewURLs: jinfengURLjava + 'api/resource/v1/selectResourcePreviewURLs',//视频播放URl
    findMessageCount: jinfengURLjava + 'api/dynamic/v1/findMessageCount/',
    seachQrcode: jinfengURLjava + 'api/page/v1/getPageList',//查询二维码
    getDeviceValueTypeCode: ceshiUrl + 'api/device/v1/getDeviceValueTypeCode/',//查询传感器的数值信息
    getData: ceshiUrl + 'api/data/v1/getData',//实时数据查询
    getDeviceInfo: jinfengUrlphp + 'api/safety/search',//查询传感器信息
    searchData: ceshiUrl + 'api/data/v1/searchData',//查询传感器实时数据详情
    securityJurisdiction: jinfengUrlphp + 'api/detection/show',//安全监测权限
    getSafetyTotal: jinfengUrlphp + 'api/safety/total',//704 安全监测
    getSafetyList: jinfengUrlphp + 'api/safety/220704',//安全监测 列表
    getPersonalInfo: jinfengUrlphp + 'api/personnel/people/now',//704人员定位
    getPersonalMap: jinfengUrlphp + 'api/personnel/people/220704',//704人员定位详情
    getSafetyStatusList: jinfengUrlphp + 'api/safety/220704/list',//704安全数据详情
    //工单
    getGroupList: jinfengUrlphp + "api/section/getGroupList",//获取部门列表
    getPersonalList: jinfengUrlphp + 'api/user/list',//获取部门人员
    getList: jinfengUrlphp + 'api/section/getlist',//部门列表接口
    getAlllist: jinfengUrlphp + 'api/section/getalllist',//部门列表接口1
    searchPersonal: jinfengUrlphp + 'api/user/search',//搜索人员
    wordOrderList: jinfengUrlphp + 'api/worksheet/classify/list',//工单分类
    applyList: jinfengUrlphp + 'api/worksheet/design/list',//可申请工单列表
    getApplyList: jinfengUrlphp + 'api/worksheet/apply/list',// 自己审请的工单列表
    getApplyD: jinfengUrlphp + 'api/worksheet/design/',//获取可申请工单详情
    submitApply: jinfengUrlphp + 'api/worksheet/apply',//提交工单信息
    submitApplyDe: jinfengUrlphp + 'api/worksheet/apply/',//提交工单详情
    getExamine: jinfengUrlphp + 'api/worksheet/check/list',//待审核工单
    getExamineDe: jinfengUrlphp + 'api/worksheet/check/', //待审核工单详情
    getAlreadyDe: jinfengUrlphp + 'api/worksheet/checked/', //待审核工单详情
    submitAdopt: jinfengUrlphp + 'api/worksheet/check/',//通过审核
    getAlreadyExamine: jinfengUrlphp + 'api/worksheet/checked/list',//已审核
    getAll_list: jinfengUrlphp + 'api/worksheet/design/all_list',//所有工单设计列表
    fill_order: jinfengUrlphp + 'api/worksheet/fill_order/', //工单信息补充
    up_images: jinfengUrlphp + 'api/worksheet/design/up_images', // 图片上传
    //消息
    getNewsList: jinfengUrlphp + 'api/message/list',//消息列表
    getRead: jinfengUrlphp + 'api/message/read',//已读消息
    getNewsNum: jinfengUrlphp + 'api/message/unread_num',//消息总数
    thumbs: jinfengUrlphp + 'api/user/like/post',//点赞or取消点赞
    comment: jinfengUrlphp + 'api/user/comment/post',//提交留言
    delComment: jinfengUrlphp + 'api/user/comment/del',//删除留言
    simulationTotal: jinfengUrlphp + 'api/safety/simulation/total',//模拟量统计
    sluicetTotal: jinfengUrlphp + 'api/safety/sluice/total',//开关量统计
    safetyDetaile: jinfengUrlphp + 'api/safety/info/total',//安全数据详情
    downWellTotal: jinfengUrlphp + 'api/personnel/month/total',//一周下井趋势
    currentPersonalNum: jinfengUrlphp + 'api/personnel/now',//一周下井趋势当前人数
    getBanNowDayTotal: jinfengUrlphp + 'api/pdcban/v1/getBanNowDayTotal',//今日产量
    getBanDayList: jinfengUrlphp + '/api/pdcban/v1/getBanDayList',//一周的产量
    getMonthSumByYear: jinfengURLjava + 'api/pdcban/v1/getMonthSumByYear',//一年的产量
    getBulletin: jinfengUrlphp + 'api/dispatch/bulletin',//生产数据公告
    getSchedule: jinfengUrlphp + 'api/dispatch/schedule',//调度统计
    getAlarmData: jinfengUrlphp + 'api/safety/alarm',//报警分类
    getGasData: jinfengUrlphp + 'api/safety/methane',//瓦斯异常情况
    getChangMessageList: jinfengURLjava + 'api/dynamic/v1/changMessageList/',//二维码和记录置为已读
    getChangMessageDepartmentIdList: jinfengURLjava + 'api/dynamic/v1/changMessageDepartmentIdList', // 二维码已读
    chartsJurisdiction: jinfengUrlphp + 'api/dispatch/show',//图表权限
    personalLocation: jinfengUrlphp + 'api/personnel/show',//人员定位权限
    getPersonnalList: jinfengUrlphp + 'api/personnel/region/total',//人员定位列表
    getPersonnalDistributionList: jinfengUrlphp + 'api/personnel/mine/total',//每个矿井人数统计
    getPersonnalDe: jinfengUrlphp + 'api/personnel/mine/people',//人员详情
    searchPeople: jinfengUrlphp + 'api/personnel/people/search',//查询人员定位
    peopleInfo: jinfengUrlphp + 'api/personnel/people/info',//个人详情
    getDayHourTotal: jinfengURLjava + 'api/pdcban/v1/getDayHourTotal',//皮带称产量
    getPeopleNow: jinfengUrlphp + 'api/personnel/people/now',//当前下井人数
    getOfficeTotal: jinfengUrlphp + 'api/personnel/office/total',//井下人员（部门分布）
    getBasicTotal: jinfengUrlphp + 'api/personnel/basic/total',//基层区队
    getWorkingTotal: jinfengUrlphp + 'api/personnel/working/total',//工作面人数统计
    getDepartToday: jinfengUrlphp + 'api/personnel/depart/today',//各部门人数统计
    getFacilityStatus: jinfengUrlphp + 'api/personnel/facility/status',//人员定位系统设备运行状态
    getTimeout: jinfengUrlphp + 'api/personnel/timeout/total',//人员超时统计
    getHelptotal: jinfengUrlphp + 'api/personnel/help/total',//人员求救统计
    getPersonnelTimeoutDetails: jinfengUrlphp + 'api/personnel/timeout/info',//人员超时统计详情
    getPersonnelHelpDetails: jinfengUrlphp + 'api/personnel/help/info',//人员求救统计详情
    getPersonnelFacilityDetails: jinfengUrlphp + 'api/personnel/facility/info',//人员求救统计详情
    getPersonnelWorkingDetails: jinfengUrlphp + 'api/personnel/working/info',//工作面人员详情
    getPersonneldepartDetails: jinfengUrlphp + 'api/personnel/depart/people',//井下部门分布列表
    getPersonneltodayDetails: jinfengUrlphp + 'api/personnel/depart/people/today',//井下部门分布列表
    getBanDayThree: jinfengURLjava + 'api/pdcban/v1/getBanDayThree',//一周的产量列表
    getBanNowDayAllTotal: jinfengURLjava + 'api/pdcban/v1/getBanNowDayAllTotal',//今日产量
    getEfficacyCut: jinfengUrlphp + 'api/dispatch/efficacy/cut',//割煤刀数
    efficacyShow: jinfengUrlphp + 'api/efficacy/show',//效能管控
    getEfficacyInfo: jinfengUrlphp + 'api/dispatch/efficacy/cut/info',//割煤刀数工作面列表
    getFanStatus: jinfengUrlphp + 'api/blower/status/now',//风机状态
    getFanData: jinfengUrlphp + 'api/blower/chart/hour',//风量趋势
    getFanDatas: jinfengUrlphp + 'api/blower/param/now',// 风量数据
    getGdWsclDataNewList: jinfengURLjava + 'api/gdwscldata/v1/getGdWsclDataNewList',//矿井水处理
    // getSelectWebSocketRequest:URLjava+'api/websocket/v1/selectWebSocketRequest',//采煤机
    getSelectWebSocketRequest: jinfengUrlphp + '220704.php',//704 数据
    working220704: jinfengUrlphp + 'api/working220704/show',//704权限
    getQrcodeDe: jinfengURLjava + 'api/page/v1/detailPage',//二维码详情
    addPageUser: jinfengURLjava + 'api/pageuser/v1/addPageUser',//添加浏览记录
    getPageUserByPageId: jinfengURLjava + 'api/pageuser/v1/getPageUserByPageId/',//获取浏览记录
    getPageRecordInstanceList: jinfengURLjava + 'api/record/v1/getPageRecordInstanceList',//记录列表
    selectRecordByGetPageId: jinfengURLjava + 'api/page/v1/selectRecordByGetPageId/',// 查询记录模版名称
    getInspection: jinfengURLjava + 'api/record/v1/getInspection',//记录模版内容
    addRecordInstance: jinfengURLjava + 'api/record/v1/addRecordInstance',//添加记录
    getRecordInstanceDetailList: jinfengURLjava + 'api/record/v1/getRecordInstanceDetailList',//记录详情
    addRecordUser: jinfengURLjava + 'api/recodeuser/v1/addRecordUser',//添加记录浏览人数
    getRecordUserById: jinfengURLjava + 'api/recodeuser/v1/getRecordUserById/',//获取记录浏览人数
    getSearchPageRecordInstance: jinfengURLjava + 'api/record/v1/searchPageRecordInstance/',//二维码统计标示
    selectPageStatusPercet: jinfengURLjava + 'api/record/v1/selectPageStatusPercet',//查询状态的比例
    selectPageRecodePercet: jinfengURLjava + 'api/record/v1/selectPageRecodePercet/',//查询记录项的比例
    getPageRecordInstanceListRadio: jinfengURLjava + 'api/record/v1/getPageRecordInstanceListRadio',//记录项统计 单选
    getRecordInstanceDetailListMobileExcel: jinfengURLjava + 'api/record/v1/getRecordInstanceDetailListMobileExcel',//记录导出
    getInvoice: jinfengUrlphp + 'api/workbench/invoice/info',//发票
    getMymonth: jinfengUrlphp + 'api/notice/my_list/month',//值班月份-个人
    getDutyMylist: jinfengUrlphp + 'api/notice/my_list/list',//个人值班
    getAllmonth: jinfengUrlphp + 'api/notice/all_list/month',//值班月份-所有人
    getDutyAlllist: jinfengUrlphp + 'api/notice/all_list/list',//所有人值班
    getPassword: jinfengUrlphp + 'api/workbench/salary/password',//工资权限验证
    getWagesDe: jinfengUrlphp + 'api/workbench/salary/my_info',//工资详情
    getWagesChart: jinfengUrlphp + 'api/workbench/salary/chart',//工资图表
    getAccessToken: 'https://open.ys7.com/api/lapp/token/get',//获取萤石视频的token
    getVideoList: 'https://open.ys7.com/api/lapp/device/camera/list',//获取萤石视频List
    getVideoUrl: 'https://open.ys7.com/api/lapp/live/address/get',//获取萤石视频Url
    // 胶轮车
    rubberTyredCarList: jinfengUrlphp + 'api/car/list', // 胶轮车列表
    rubberTyredcarDetails: jinfengUrlphp + 'api/car/tra', // 车辆轨迹
    signalLampMsg: jinfengUrlphp + 'api/car/signal',
    // 设备监控
    realList: jinfengUrlphp+ 'api/belt/real',
    // 下井记录（个人）
    getMonthlist: jinfengUrlphp + 'api/personnel/downwell/monthlist/once', // 下井月份列表接口
    getMonthOnce: jinfengUrlphp + 'api/personnel/downwell/month/once',  // 需下井次数 和已下井次数 以及完成度
    getMonthInfo: jinfengUrlphp + 'api/personnel/downwell/month/info', // 当月下井详细信息列表
    getOnceInfo:  jinfengUrlphp + 'api/personnel/downwell/once/info' // 当次信息的详细信息
}

var mySwiper;//插件
var loadingId = "";
/**
 * 加载动画
 *
 */
(function (window, undefined) {
    "use strict";
    var auiToast = function () {
        // this.create();
    };
    var isShow = false;
    auiToast.prototype = {
        create: function (params, callback) {
            var self = this;
            var toastHtml = '';
            switch (params.type) {
                case "success":
                    var iconHtml = '<i class="aui-iconfont aui-icon-correct"></i>';
                    break;
                case "fail":
                    var iconHtml = '<i class="aui-iconfont aui-icon-close"></i>';
                    break;
                case "custom":
                    var iconHtml = params.html;
                    break;
                case "loading":
                    var iconHtml = '<div class="aui-toast-loading"></div>';
                    break;
            }

            var titleHtml = params.title ? '<div class="aui-toast-content">' + params.title + '</div>' : '';
            toastHtml = `<div class="api-toast">
              <div class="aui-toast">${iconHtml + titleHtml}</div>
            </div>`
            if (document.querySelector(".aui-toast")) return;
            document.body.insertAdjacentHTML('beforeend', toastHtml);
            var duration = params.duration ? params.duration : "2000";
            self.show();
            if (params.type == 'loading') {
                if (callback) {
                    callback({
                        status: "success"
                    });
                };
            } else {
                setTimeout(function () {
                    self.hide();
                }, duration)
            }
        },
        show: function () {
            var self = this;
            document.querySelector(".aui-toast").style.display = "block";
            document.querySelector(".aui-toast").style.marginTop = "-" + Math.round(document.querySelector(".aui-toast").offsetHeight / 2) + "px";
            if (document.querySelector(".aui-toast")) return;
        },
        hide: function () {
            var self = this;
            if (document.querySelector(".aui-toast")) {
                document.querySelector(".api-toast").remove()
            }
        },
        remove: function () {
            if (document.querySelector(".aui-dialog")) document.querySelector(".aui-dialog").parentNode.removeChild(document.querySelector(".aui-dialog"));
            if (document.querySelector(".aui-mask")) {
                document.querySelector(".aui-mask").classList.remove("aui-mask-out");
            }
            return true;
        },
        success: function (params, callback) {
            var self = this;
            params.type = "success";
            return self.create(params, callback);
        },
        fail: function (params, callback) {
            var self = this;
            params.type = "fail";
            return self.create(params, callback);
        },
        custom: function (params, callback) {
            var self = this;
            params.type = "custom";
            return self.create(params, callback);
        },
        loading: function (params, callback) {
            var self = this;
            params.type = "loading";
            return self.create(params, callback);
        }
    };
    window.auiToast = auiToast;
})(window);
(function (window, undefined) {
    "use strict";
    var apiToast = function () {
        // this.create();
    };
    var isShow = false;
    apiToast.prototype = {
        create: function (params, callback) {
            var self = this;
            var toastHtml = '';
            switch (params.type) {
                case "success":
                    var iconHtml = '<i class="aui-iconfont aui-icon-correct"></i>';
                    break;
                case "fail":
                    var iconHtml = '<i class="aui-iconfont aui-icon-close"></i>';
                    break;
                case "custom":
                    var iconHtml = params.html;
                    break;
                case "loading":
                    var iconHtml = '<div class="api-toast-loading"></div>';
                    break;
            }

            var titleHtml = params.title ? '<div class="api-toast-content">' + params.title + '</div>' : '';
            toastHtml = `<div class="api-toast">${iconHtml + titleHtml}</div>`
            if (document.querySelector(".api-toast")) return;
            document.body.insertAdjacentHTML('beforeend', toastHtml);
            var duration = params.duration ? params.duration : "2000";
            self.show();
            if (params.type == 'loading') {
                if (callback) {
                    callback({
                        status: "success"
                    });
                };
            } else {
                setTimeout(function () {
                    self.hide();
                }, duration)
            }
        },
        show: function () {
            var self = this;
            document.querySelector(".api-toast").style.display = "block";
            document.querySelector(".api-toast").style.marginTop = "-" + Math.round(document.querySelector(".api-toast").offsetHeight / 2) + "px";
            if (document.querySelector(".api-toast")) return;
        },
        hide: function () {
            var self = this;
            if (document.querySelector(".api-toast")) {
                document.querySelector(".api-toast").parentNode.removeChild(document.querySelector(".api-toast"));
            }
        },
        remove: function () {
            if (document.querySelector(".api-dialog")) document.querySelector(".api-dialog").parentNode.removeChild(document.querySelector(".api-dialog"));
            if (document.querySelector(".api-mask")) {
                document.querySelector(".api-mask").classList.remove("api-mask-out");
            }
            return true;
        },
        success: function (params, callback) {
            var self = this;
            params.type = "success";
            return self.create(params, callback);
        },
        fail: function (params, callback) {
            var self = this;
            params.type = "fail";
            return self.create(params, callback);
        },
        custom: function (params, callback) {
            var self = this;
            params.type = "custom";
            return self.create(params, callback);
        },
        loading: function (params, callback) {
            var self = this;
            params.type = "loading";
            return self.create(params, callback);
        }
    };
    window.apiToast = apiToast;
})(window);
/**
 *
 */
/**
 * ajax 封装
 */
(function (window) {
    /**
     ** 不带加载效果
     **  Promise 形式的ajax
    **/
    var h = {};
    h.requestData = (url, method, values) => {
        return new Promise((resolve, reject) => {
            var info = $api.getStorage('data'),
                token = JSON.parse(info).data.access_token || "";
            var headers = {
                "Authorization": "Bearer " + token
            };
            var tAjax = {
                url,
                method,
                headers,
                dataType: 'json',
                data: {
                    values
                },
                timeout: 30
            };
            api.ajax(tAjax, function (ret, err) {
                if (ret) {
                    resolve(ret)
                } else {
                    reject(err)
                }
            });
        })
    };
    /**
     ** 带加载效果
     **  Promise 形式的ajax
    **/
    h.requestDataLoging = (url, method, values) => {
        var toast = new auiToast();
        toast.loading({
            title: "加载中",
            duration: 2000
        });
        return new Promise((resolve, reject) => {
            var info = $api.getStorage('data'),
                token = JSON.parse(info).data.access_token || "";
            var headers = {
                "Authorization": "Bearer " + token
            };
            var tAjax = {
                url,
                method,
                headers,
                dataType: 'json',
                data: {
                    values
                },
                timeout: 30
            };
            api.ajax(tAjax, function (ret, err) {
                if (ret) {
                    resolve(ret)
                } else {
                    reject(err)
                }
                toast.hide()
            });
        })
    };
    /**
     ** 带加载效果 (apicloud showProgress)
     **  Promise 形式的 ajax
    **/
    h.requestShowProgress = (url, method, values) => {
        api.showProgress({
            title: '加载中...',
            text: '',
            modal: true
        });
        return new Promise((resolve, reject) => {
            var info = $api.getStorage('data'),
                token = JSON.parse(info).data.access_token || "";
            var headers = {
                "Authorization": "Bearer " + token
            };
            var tAjax = {
                url,
                method,
                headers,
                dataType: 'json',
                data: {
                    values
                },
                timeout: 30
            };
            api.ajax(tAjax, function (ret, err) {
                if (ret) {
                    resolve(ret)
                } else {
                    reject(err)
                }
                api.hideProgress()
            });
        })
    };
    /**
     ** 带加载效果
     **  Promise 形式的 文件上传ajax
    **/
    h.fileUploadRequest = (url, method, files) => {
        api.showProgress({
            title: '上传中...',
            text: '',
            modal: true
        });
        return new Promise((resolve, reject) => {
            var info = $api.getStorage('data'),
                token = JSON.parse(info).data.access_token || "";
            var headers = {
                "Authorization": "Bearer " + token
            };
            var tAjax = {
                url,
                method,
                headers,
                data: {
                    files
                }
            };
            api.ajax(tAjax, function (ret, err) {
                if (ret) {
                    resolve(ret)
                } else {
                    reject(err)
                }
                api.hideProgress()
            });
        })
    };
    /**
     ** 带加载效果的ajax
    **/
    h.requestData = (url, method, values) => {
        return new Promise((resolve, reject) => {
            var info = $api.getStorage('data'),
                token = JSON.parse(info).data.access_token || "";
            var headers = {
                "Authorization": "Bearer " + token
            };
            var tAjax = {
                url,
                method,
                headers,
                dataType: 'json',
                data: {
                    values
                },
                timeout: 30
            };
            api.ajax(tAjax, function (ret, err) {
                if (ret) {
                    resolve(ret)
                } else {
                    reject(err)
                }
            });
        })
    };
    h.fnReuestData = function (pPartUrl, pHeaders, pMethod, pData, pCallback) {
        toast.loading({
            title: "加载中",
            duration: 2000
        });
        var tHeaders = pHeaders ? pHeaders : '';
        var tAjax = {
            url: pPartUrl,
            method: pMethod,
            headers: tHeaders,
            dataType: 'json',
            data: {
                values: pData
            },
            timeout: 30
        };
        api.ajax(tAjax, function (ret, err) {
            if ('function' === typeof pCallback) {
                pCallback(ret, err)
            }
        });
    };
    /**
    *不带低白加载效果
    **/
    h.fnReuestDataNoW = function (pPartUrl, pHeaders, pMethod, pData, pCallback) {
        apiToast.loading({
            title: "加载中",
            duration: 2000
        });
        var tHeaders = pHeaders ? pHeaders : '';
        var tAjax = {
            url: pPartUrl,
            method: pMethod,
            headers: tHeaders,
            dataType: 'json',
            data: {
                values: pData
            },
            timeout: 30
        };
        api.ajax(tAjax, function (ret, err) {
            if ('function' === typeof pCallback) {
                pCallback(ret, err)
            }
        });
    };
    /**
     ** 不带加载效果的ajax
    **/
    h.fnReuestDataNologing = function (pPartUrl, pHeaders, pMethod, pData, pCallback) {
        var tHeaders = pHeaders ? pHeaders : '';
        var tAjax = {
            url: pPartUrl,
            method: pMethod,
            headers: tHeaders,
            dataType: 'json',
            data: {
                values: pData
            },
            timeout: 30
        };
        api.ajax(tAjax, function (ret, err) {
            if ('function' === typeof pCallback) {
                pCallback(ret, err)
            }
        });
    };
    /**
     ** 加载效果的ajax
     ** 传JSON数据格式
    **/
    h.fnReuestDataJSON = function (pPartUrl, pHeaders, pMethod, pData, pCallback) {
        toast.loading({
            title: "加载中",
            duration: 2000
        });
        var tHeaders = pHeaders ? pHeaders : '';
        var tAjax = {
            url: pPartUrl,
            method: pMethod,
            contentType: 'application/json',
            headers: tHeaders,
            dataType: 'json',
            data: {
                values: pData
            },
            timeout: 30
        };
        api.ajax(tAjax, function (ret, err) {
            if ('function' === typeof pCallback) {
                pCallback(ret, err)
            }
        });
    };
    /**
     ** 不带加载效果的ajax
     ** 传JSON数据格式
    **/
    window.$http = h;
}(window));
/**
 * 常用方法
 */
(function (window) {
    var e = {};
    /**
     * 封装消息发送时间
     */
    e.sendEvent = function (name, extra) {
        api.sendEvent({
            name: name,
            extra: extra
        });
    };
    /**
     * 消息监听事件
     */
    e.addEventListener = function (name, callback) {
        api.addEventListener({
            name: name
        }, function (ret, err) {
            callback(ret)
        });
    };
    /**
     *  滑动底部监听事件
     */
    e.scrollBottomListener = function (callback, threshold) {
        api.addEventListener({
            name: 'scrolltobottom',
            extra: {
                threshold: threshold || 0
            }
        }, function (ret, err) {
            callback(ret)
        });
    };
    /**
     * frame
     *
     */
    e.openFrame = function (name, headers, footer, pageParam, otherParam) {
        var headerH = headers ? $api.dom(headers).offsetHeight : 0;
        var footetH = footer ? $api.dom(footer).offsetHeight : 0;
        api.openFrame({
            name: name,
            url: name + '.html',
            bounces: true,
            scrollEnabled: false,
            hScrollBarEnabled: false,
            progress: {
                type: 'page'
            },
            animation: {
                type: 'fade'
            },
            rect: {
                x: 0,
                y: headerH,
                w: 'auto',
                h: 'auto'
            },
            pageParam: api.pageParam || {}
        });
    };
    /**
    *禁止页面弹动
    *
    **/
    e.openFrameBounces = function (name, headers, footer, pageParam, otherParam) {
        var headerH = headers ? $api.dom(headers).offsetHeight : 0;
        var footetH = footer ? $api.dom(footer).offsetHeight : 0;
        api.openFrame({
            name: name,
            url: name + '.html',
            bounces: false,
            scrollEnabled: false,
            hScrollBarEnabled: false,
            progress: {
                type: 'page'
            },
            animation: {
                type: 'fade'
            },
            rect: {
                x: 0,
                y: headerH,
                w: 'auto',
                h: 'auto'
            },
            pageParam: api.pageParam || {}
        });
    };
    /**
    *打开弹出框
    *
    **/
    e.openPopup = function (w, h, name, pageParam) {
        api.openFrame({
            name: name,
            url: name + '.html',
            bgColor: 'rgba(0,0,0,.6)',
            bounces: false,
            rect: {
                x: 0,
                y: 0,
                w: w,
                h: h
            },
            animation: {
                type: 'fade'
            },
            pageParam: pageParam
        });
    }
    /**
     * Win
     *
     */
    e.openWin = function (winName, winUrl, pageParam, otherParam) {
        var param = {
            name: winName,
            url: winUrl + '.html',
            scrollEnabled: false,
            hScrollBarEnabled: false,
            pageParam: pageParam,
            animation: {
                type: 'fade',
                duration: 450
            }
        }
        Object.assign(param, otherParam || {});
        api.openWin(param)
    }
    /**
    ** openTabLayout
    **/
    e.openTabLayout = function (name, url, title, value) {
        var param = {
            name: name,
            url: url + '.html',
            bgColor: 'rgba(0,159,232,1)',
            title: title,
            bounces: false,
            navigationBar: {
                height: '51',
                background: '#009fe8',
                color: '#fff',
                shadow: 'transparent'
            },
            pageParam: value
        }
        api.openTabLayout(param);
    }
    e.openTabLayoutTransition = function (name, url, title, value) {
        var param = {
            name: name,
            url: url + '.html',
            bgColor: 'rgba(0,159,232,1)',
            title: title,
            bounces: false,
            navigationBar: {
                height: '51',
                background: '#009fe8',
                color: '#fff',
                shadow: 'transparent'
            },
            animation: {
                type: 'fade',
                duration: 450
            },
            pageParam: value
        }
        api.openTabLayout(param);
    }
    /**
    ** 提示框无网络
    **/
    e.tips = function (el, text) {
        var str = `<div id="tips">
                   <p>
                     <i></i>
                     ${text}
                   </p>
                 </div>`;
        $api.append($api.dom(el), str);
    }
    e.removeTips = function (el) {
        $api.remove($api.byId(el));
    }
    /***
     没有内容提示页面
     el = body
     Image显示图片路径
    ***/
    e.NotContent = function (el, elID, Image) {
        var html = `<div class="noText" id="${elID}">
                     <img src="${Image}" alt="">
                   </div>`;
        $api.append($api.dom(el), html);
    }
    /**
    *删除NotContent
    **/
    e.deletNotContent = function (elID) {
        $api.remove($api.byId(elID));
    }
    /**
    * 计算canvas 锚点 w,h,x,y
    * Y轴,H度，W度都可用
    *
    **/
    e.yhW = function (yhW) {
        return (yhW / (667 * 2)) * (document.body.clientHeight * 2)
    }
    window.$event = e;
}(window));
/**
 * 工具类
 *  */
(function (window) {
    var d = {};
    /**
     * append
     * doT模版的封装
     * root DOM名称如ID 或class
     * doT template 名称
     * data ajax返回数据
     */
    d.append = function (root, template, data) {
        var evalText = doT.compile($api.html($api.dom(template)))
        if (typeof root == 'string') {
            $api.append($api.dom(root), evalText(data))
        } else {
            $api.append(root, evalText(data))
        }
    };
    /**
      * html
      * doT模版的封装
      * root DOM名称如ID 或class
      * doT template 名称
      * data ajax返回数据
      */
    d.html = function (root, template, data) {
        var evalText = doT.compile($api.html($api.dom(template)))
        if (typeof root == 'string') {
            $api.html($api.dom(root), evalText(data))
        } else {
            $api.html(root, evalText(data))
        }
    };
    /**
   * after
   * doT模版的封装
   * root DOM名称如ID 或class
   * doT template 名称
   * data ajax返回数据
   */
    d.after = function (root, template, data) {
        var evalText = doT.compile($api.html($api.dom(template)))
        if (typeof root == 'string') {
            $api.after($api.dom(root), evalText(data))
        } else {
            $api.after(root, evalText(data))
        }
    };
    /**
     ** 缓存路径 cache:协议对应的真实目录
    **/
    d.CACHE_DIR = function (url) {
        return api.cacheDir + '/' + url + '/' + api.frameName + '.json';
    }
    /**
     ** 缓存路径 box://协议对应的真实目录
    **/
    d.BOX_DIR = function () {
        return api.cacheDir + '/' + url + '/' + api.frameName + '.json';
    }
    /**
     **把数据也入文件做数据缓存处理
    **/
    d.writeFile = function (url, data) {
        api.writeFile({
            path: url,
            data: JSON.stringify(data)
        })
    };
    /**
    **读取文件中缓存的数据
    **/
    d.readFile = function (url, callback) {
        api.readFile({
            path: url
        }, function (ret, err) {
            callback(ret, err)
        });
    };
    /**轮播**/
    d.swiper = function (el, loops, type) {
        mySwiper = new Swiper(el, {
            pagination: {
                el: '.swiper-pagination',
                type: type,
            },
            loop: false,
            observer: true,
            observeSlideChildren: true,
            speed: 600,
            autoplay: {
                delay: 3000,
                disableOnInteraction: false,
            },
            on: {
                slideChangeTransitionEnd: function (e) {
                    api.setFrameAttr({ bounces: true })
                },
                sliderMove: function (event) {
                    api.setFrameAttr({ bounces: false })
                },
                touchEnd: function (event) {
                    api.setFrameAttr({ bounces: true })
                }
            },
        });
    }
    /**
    ** Loading
    ** frameName frame名字
    ** mask 遮罩层 样式
    **/
    d.UILoading = function (frameName, mask) {
        var UILoading = api.require('UILoading');
        UILoading.flower({
            center: {
                x: api.winWidth / 2.0,
                y: api.winHeight / 2.0
            },
            size: 30,
            fixed: true,
            mask: mask == "" ? 'rgba(255,255,255,0' : mask,
            fixedOn: frameName
        }, function (ret) {
            loadingId = ret.id
        });
    };
    /**
    ** Loading
    ** 关闭Loading
    **
    **/
    d.CloseUILoading = function () {
        var uiloading = api.require('UILoading');
        uiloading.closeFlower({
            id: loadingId
        });
    };
    window.$apis = d
}(window));
/**
 * 面板
 *
 */
(function (window, undefined) {
    "use strict";
    var auiCollapse = function (params) {
        this.init(params);
    };
    auiCollapse.prototype = {
        init: function (params, callback) {
            var collapseHeader = document.querySelectorAll(".aui-collapse-header");
            if (collapseHeader.length) {
                for (var i = 0; i < collapseHeader.length; i++) {
                    (function (e) {
                        collapseHeader[e].onclick = function () {
                            if (collapseHeader[e].nextSibling.nextElementSibling.className.indexOf("aui-collapse-content") > -1) {
                                if (collapseHeader[e].nextSibling.nextElementSibling.className.indexOf("aui-show") > -1) {
                                    collapseHeader[e].nextSibling.nextElementSibling.classList.remove("aui-show");
                                    collapseHeader[e].classList.remove("aui-active");
                                } else {
                                    if (params.autoHide) {
                                        if (document.querySelector(".aui-collapse-header.aui-active")) {
                                            document.querySelector(".aui-collapse-header.aui-active").classList.remove("aui-active");
                                        }
                                        if (document.querySelector(".aui-collapse-content.aui-show")) {
                                            document.querySelector(".aui-collapse-content.aui-show").classList.remove("aui-show");
                                        }
                                    }

                                    collapseHeader[e].nextSibling.nextElementSibling.classList.toggle("aui-show");
                                    collapseHeader[e].classList.toggle("aui-active");
                                }
                            }
                        }
                    })(i)
                }
            }
        }
    };
    window.auiCollapse = auiCollapse;
})(window);

/**
*获取当前时间年月日
*
**/
function getYearMonthDate() {
    var now = new Date();
    var year = now.getFullYear(); //获取年份
    var month = now.getMonth(); //获取月份
    var date = now.getDate(); //获取日期
    var hour = now.getHours(); //获取小时
    var minute = now.getMinutes(); //获取分钟
    month = month + 1;
    month = month < 10 ? '0' + month : month
    date = date < 10 ? '0' + date : date
    var time = year + "-" + month + "-" + date
    return time;
}
/**
*获取当前时间YYYY-MM-dd hh:mm
*
**/
function getYearMonthDateTime() {
    var now = new Date();
    var year = now.getFullYear(); //获取年份
    var month = now.getMonth(); //获取月份
    var date = now.getDate(); //获取日期
    var hour = now.getHours(); //获取小时
    var minute = now.getMinutes(); //获取分钟
    month = month + 1;
    month = month < 10 ? '0' + month : month
    date = date < 10 ? '0' + date : date
    hour = hour < 10 ? '0' + hour : hour
    minute = minute < 10 ? '0' + minute : minute
    var time = year + "-" + month + "-" + date + " " + hour + ":" + minute
    return time;
}
/**
*获取当前时间
*
**/
function getNowFormatDate() {
    var now = new Date();
    var year = now.getFullYear(); //获取年份
    var month = now.getMonth(); //获取月份
    var date = now.getDate(); //获取日期
    var day = now.getDay(); //获取星期
    var hour = now.getHours(); //获取小时
    var minute = now.getMinutes(); //获取分钟
    var seconds = now.getSeconds() < 10 ? '0' + now.getSeconds() : now.getSeconds(); //获取秒
    month = month + 1;
    var arr_week = new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六");
    var week = arr_week[day];
    var time = year + "年" + month + "月" + date + "日 " + week + " " + hour + ":" + minute + ":" + seconds;
    return time;
}
// 把时间戳转为日期或者时间
function formatDateTime(inputTime) {
    let date = new Date(inputTime);
    let y = date.getFullYear();
    let m = date.getMonth() + 1;
    m = m < 10 ? ('0' + m) : m;
    let d = date.getDate();
    d = d < 10 ? ('0' + d) : d;
    let h = date.getHours();
    h = h < 10 ? ('0' + h) : h;
    let minute = date.getMinutes();
    let second = date.getSeconds();
    minute = minute < 10 ? ('0' + minute) : minute;
    second = second < 10 ? ('0' + second) : second;
    return y + '-' + m + '-' + d;
}
// 计算时间天数差
function datedifference(sDate2) {
    var date = new Date();
    var year = date.getFullYear() - 1
    var month = date.getMonth() + 1
    var d = date.getDate()
    var dateSpan,
        tempDate,
        iDays;
    sDate1 = Date.parse(year + "-" + month + "-" + d);
    dateSpan = sDate2 - sDate1;
    dateSpan = Math.abs(dateSpan);
    iDays = Math.floor(dateSpan / (24 * 3600 * 1000));
    return iDays
};
/**
*消除300ms延迟
***/
!function () { "use strict"; function t(e, o) { function i(t, e) { return function () { return t.apply(e, arguments) } } var r; if (o = o || {}, this.trackingClick = !1, this.trackingClickStart = 0, this.targetElement = null, this.touchStartX = 0, this.touchStartY = 0, this.lastTouchIdentifier = 0, this.touchBoundary = o.touchBoundary || 10, this.layer = e, this.tapDelay = o.tapDelay || 200, this.tapTimeout = o.tapTimeout || 700, !t.notNeeded(e)) { for (var a = ["onMouse", "onClick", "onTouchStart", "onTouchMove", "onTouchEnd", "onTouchCancel"], c = 0, s = a.length; c < s; c++)this[a[c]] = i(this[a[c]], this); n && (e.addEventListener("mouseover", this.onMouse, !0), e.addEventListener("mousedown", this.onMouse, !0), e.addEventListener("mouseup", this.onMouse, !0)), e.addEventListener("click", this.onClick, !0), e.addEventListener("touchstart", this.onTouchStart, !1), e.addEventListener("touchmove", this.onTouchMove, !1), e.addEventListener("touchend", this.onTouchEnd, !1), e.addEventListener("touchcancel", this.onTouchCancel, !1), Event.prototype.stopImmediatePropagation || (e.removeEventListener = function (t, n, o) { var i = Node.prototype.removeEventListener; "click" === t ? i.call(e, t, n.hijacked || n, o) : i.call(e, t, n, o) }, e.addEventListener = function (t, n, o) { var i = Node.prototype.addEventListener; "click" === t ? i.call(e, t, n.hijacked || (n.hijacked = function (t) { t.propagationStopped || n(t) }), o) : i.call(e, t, n, o) }), "function" == typeof e.onclick && (r = e.onclick, e.addEventListener("click", function (t) { r(t) }, !1), e.onclick = null) } } var e = navigator.userAgent.indexOf("Windows Phone") >= 0, n = navigator.userAgent.indexOf("Android") > 0 && !e, o = /iP(ad|hone|od)/.test(navigator.userAgent) && !e, i = o && /OS 4_\d(_\d)?/.test(navigator.userAgent), r = o && /OS [6-7]_\d/.test(navigator.userAgent), a = navigator.userAgent.indexOf("BB10") > 0; t.prototype.needsClick = function (t) { switch (t.nodeName.toLowerCase()) { case "button": case "select": case "textarea": if (t.disabled) return !0; break; case "input": if (o && "file" === t.type || t.disabled) return !0; break; case "label": case "iframe": case "video": return !0 }return /\bneedsclick\b/.test(t.className) }, t.prototype.needsFocus = function (t) { switch (t.nodeName.toLowerCase()) { case "textarea": return !0; case "select": return !n; case "input": switch (t.type) { case "button": case "checkbox": case "file": case "image": case "radio": case "submit": return !1 }return !t.disabled && !t.readOnly; default: return /\bneedsfocus\b/.test(t.className) } }, t.prototype.sendClick = function (t, e) { var n, o; document.activeElement && document.activeElement !== t && document.activeElement.blur(), o = e.changedTouches[0], (n = document.createEvent("MouseEvents")).initMouseEvent(this.determineEventType(t), !0, !0, window, 1, o.screenX, o.screenY, o.clientX, o.clientY, !1, !1, !1, !1, 0, null), n.forwardedTouchEvent = !0, t.dispatchEvent(n) }, t.prototype.determineEventType = function (t) { return n && "select" === t.tagName.toLowerCase() ? "mousedown" : "click" }, t.prototype.focus = function (t) { var e; o && t.setSelectionRange && 0 !== t.type.indexOf("date") && "time" !== t.type && "month" !== t.type ? (e = t.value.length, t.setSelectionRange(e, e)) : t.focus() }, t.prototype.updateScrollParent = function (t) { var e, n; if (!(e = t.fastClickScrollParent) || !e.contains(t)) { n = t; do { if (n.scrollHeight > n.offsetHeight) { e = n, t.fastClickScrollParent = n; break } n = n.parentElement } while (n) } e && (e.fastClickLastScrollTop = e.scrollTop) }, t.prototype.getTargetElementFromEventTarget = function (t) { return t.nodeType === Node.TEXT_NODE ? t.parentNode : t }, t.prototype.onTouchStart = function (t) { var e, n, r; if (t.targetTouches.length > 1) return !0; if (e = this.getTargetElementFromEventTarget(t.target), n = t.targetTouches[0], o) { if ((r = window.getSelection()).rangeCount && !r.isCollapsed) return !0; if (!i) { if (n.identifier && n.identifier === this.lastTouchIdentifier) return t.preventDefault(), !1; this.lastTouchIdentifier = n.identifier, this.updateScrollParent(e) } } return this.trackingClick = !0, this.trackingClickStart = t.timeStamp, this.targetElement = e, this.touchStartX = n.pageX, this.touchStartY = n.pageY, t.timeStamp - this.lastClickTime < this.tapDelay && t.preventDefault(), !0 }, t.prototype.touchHasMoved = function (t) { var e = t.changedTouches[0], n = this.touchBoundary; return Math.abs(e.pageX - this.touchStartX) > n || Math.abs(e.pageY - this.touchStartY) > n }, t.prototype.onTouchMove = function (t) { return !this.trackingClick || ((this.targetElement !== this.getTargetElementFromEventTarget(t.target) || this.touchHasMoved(t)) && (this.trackingClick = !1, this.targetElement = null), !0) }, t.prototype.findControl = function (t) { return void 0 !== t.control ? t.control : t.htmlFor ? document.getElementById(t.htmlFor) : t.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea") }, t.prototype.onTouchEnd = function (t) { var e, a, c, s, u, l = this.targetElement; if (!this.trackingClick) return !0; if (t.timeStamp - this.lastClickTime < this.tapDelay) return this.cancelNextClick = !0, !0; if (t.timeStamp - this.trackingClickStart > this.tapTimeout) return !0; if (this.cancelNextClick = !1, this.lastClickTime = t.timeStamp, a = this.trackingClickStart, this.trackingClick = !1, this.trackingClickStart = 0, r && (u = t.changedTouches[0], (l = document.elementFromPoint(u.pageX - window.pageXOffset, u.pageY - window.pageYOffset) || l).fastClickScrollParent = this.targetElement.fastClickScrollParent), "label" === (c = l.tagName.toLowerCase())) { if (e = this.findControl(l)) { if (this.focus(l), n) return !1; l = e } } else if (this.needsFocus(l)) return t.timeStamp - a > 100 || o && window.top !== window && "input" === c ? (this.targetElement = null, !1) : (this.focus(l), this.sendClick(l, t), o && "select" === c || (this.targetElement = null, t.preventDefault()), !1); return !(!o || i || !(s = l.fastClickScrollParent) || s.fastClickLastScrollTop === s.scrollTop) || (this.needsClick(l) || (t.preventDefault(), this.sendClick(l, t)), !1) }, t.prototype.onTouchCancel = function () { this.trackingClick = !1, this.targetElement = null }, t.prototype.onMouse = function (t) { return !this.targetElement || (!!t.forwardedTouchEvent || (!t.cancelable || (!(!this.needsClick(this.targetElement) || this.cancelNextClick) || (t.stopImmediatePropagation ? t.stopImmediatePropagation() : t.propagationStopped = !0, t.stopPropagation(), t.preventDefault(), !1)))) }, t.prototype.onClick = function (t) { var e; return this.trackingClick ? (this.targetElement = null, this.trackingClick = !1, !0) : "submit" === t.target.type && 0 === t.detail || ((e = this.onMouse(t)) || (this.targetElement = null), e) }, t.prototype.destroy = function () { var t = this.layer; n && (t.removeEventListener("mouseover", this.onMouse, !0), t.removeEventListener("mousedown", this.onMouse, !0), t.removeEventListener("mouseup", this.onMouse, !0)), t.removeEventListener("click", this.onClick, !0), t.removeEventListener("touchstart", this.onTouchStart, !1), t.removeEventListener("touchmove", this.onTouchMove, !1), t.removeEventListener("touchend", this.onTouchEnd, !1), t.removeEventListener("touchcancel", this.onTouchCancel, !1) }, t.notNeeded = function (t) { var e, o, i; if (void 0 === window.ontouchstart) return !0; if (o = +(/Chrome\/([0-9]+)/.exec(navigator.userAgent) || [, 0])[1]) { if (!n) return !0; if (e = document.querySelector("meta[name=viewport]")) { if (-1 !== e.content.indexOf("user-scalable=no")) return !0; if (o > 31 && document.documentElement.scrollWidth <= window.outerWidth) return !0 } } if (a && (i = navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/))[1] >= 10 && i[2] >= 3 && (e = document.querySelector("meta[name=viewport]"))) { if (-1 !== e.content.indexOf("user-scalable=no")) return !0; if (document.documentElement.scrollWidth <= window.outerWidth) return !0 } return "none" === t.style.msTouchAction || "manipulation" === t.style.touchAction || (!!(+(/Firefox\/([0-9]+)/.exec(navigator.userAgent) || [, 0])[1] >= 27 && (e = document.querySelector("meta[name=viewport]")) && (-1 !== e.content.indexOf("user-scalable=no") || document.documentElement.scrollWidth <= window.outerWidth)) || "none" === t.style.touchAction || "manipulation" === t.style.touchAction) }, t.attach = function (e, n) { return new t(e, n) }, "function" == typeof define && "object" == typeof define.amd && define.amd ? define(function () { return t }) : "undefined" != typeof module && module.exports ? (module.exports = t.attach, module.exports.FastClick = t) : window.FastClick = t }();


/**
 * fastclick 消除点击时间
 */
if ('addEventListener' in document) {
    document.addEventListener('DOMContentLoaded', function () {
        FastClick.attach(document.body);
    }, false)
};

// 数组删除元素
Array.prototype.remove = function (val) {
    var index = this.indexOf(val);
    if (index > -1) {
        this.splice(index, 1);
    }
};
