config.js 72 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426
  1. // 定义服务器端域名
  2. var javaApi = '/api/swagger/';
  3. // var mineName = '麦垛山煤矿';
  4. // var mineName = '枣泉煤矿';
  5. var mineName = 'E信管理';
  6. var ossImgName = '宁东运营部';
  7. // 测试路径
  8. // var URLjava = 'http://colliery.nxjiewei.com'+javaApi;
  9. // var urlphp = 'http://colliery.nxjiewei.com/';
  10. // 工单上传图片和文件地址
  11. var ceshiUrl = 'http://47.105.143.227:8083/';//测试地址java
  12. // 设备物资,固定电缆
  13. // var urlJavaOld = 'http://nxjiewei.com/colliery-system/api/page/v1/eqByNameList.html'
  14. // var URLjava = 'http://apptest.jieweizhineng.com'+javaApi;
  15. // 枣泉煤矿
  16. var zaoquanUrlphp = 'http://zaoquan.nxjiewei.com:8011/';
  17. var zaoquanURLjava = 'http://zaoquan.nxjiewei.com:8011'+javaApi;
  18. var zaoquanUrlImgUrl = 'http://ningdongyunying.nxjiewei.com';
  19. var zaoquanUrlRouter = {
  20. bannerApi: zaoquanUrlphp + 'api/scrollImg/list',//banner
  21. nwesApi: zaoquanUrlphp + 'api/article/list',//新闻
  22. NoticeApi: zaoquanUrlphp + 'api/notice/list',//公告
  23. ImgApi: zaoquanUrlphp + 'api/homeNav/list',//图片导航
  24. DistrictteamApi: zaoquanUrlphp + 'api/home/links',//区队
  25. userInfoApi: zaoquanUrlphp + 'api/user/info',//个人信息
  26. findMessageApi: zaoquanURLjava + 'api/dynamic/v1/findMessage/',//消息列表 二维码 、 巡检记录
  27. getPageAndRecordDynamic: zaoquanURLjava + "api/dynamic/v1/getPageAndRecordDynamic",//二维码和记录合并
  28. getPageDynamicApi: zaoquanURLjava + 'api/dynamic/v1/getPageDynamic',//获取二维码列表
  29. getRecordDynamicApi: zaoquanURLjava + 'api/dynamic/v1/getRecordDynamic',//获取巡检列表
  30. addPageDynamicApi: zaoquanURLjava + 'api/dynamic/v1/addPageDynamic',//已读二维码
  31. addRecordDynamicApi: zaoquanURLjava + 'api/dynamic/v1/addRecordDynamic',//已读巡检记录
  32. getPageRecordInstaneClosedLoop: zaoquanURLjava + 'api/record/v1/getPageRecordInstaneClosedLoop',// 查询二维码巡检的闭环列表
  33. getPageRecordInstanCreateBy: zaoquanURLjava + 'api/record/v1/getPageRecordInstanCreateBy',// 我的记录列表
  34. regionApi: zaoquanUrlphp + 'api/monitor/video/region',//监控列表权限
  35. // cameraApi:urlphp+'api/monitor/video/camera',//监控子项
  36. selectRootRequest: zaoquanURLjava + 'api/resource/v1/selectRootRequest',//视频区域列表
  37. selectResourceList: zaoquanURLjava + 'api/resource/v1/selectResourceList',//视频播放列表
  38. selectResourcePreviewURLs: zaoquanURLjava + 'api/resource/v1/selectResourcePreviewURLs',//视频播放URl
  39. findMessageCount: zaoquanURLjava + 'api/dynamic/v1/findMessageCount/',
  40. seachQrcode: zaoquanURLjava + 'api/page/v1/getPageList',//查询二维码
  41. getDeviceValueTypeCode: ceshiUrl + 'api/device/v1/getDeviceValueTypeCode/',//查询传感器的数值信息
  42. getData: ceshiUrl + 'api/data/v1/getData',//实时数据查询
  43. getDeviceInfo: zaoquanUrlphp + 'api/safety/search',//查询传感器信息
  44. searchData: ceshiUrl + 'api/data/v1/searchData',//查询传感器实时数据详情
  45. securityJurisdiction: zaoquanUrlphp + 'api/detection/show',//安全监测权限
  46. getSafetyTotal: zaoquanUrlphp + 'api/safety/total',//704 安全监测
  47. getSafetyList: zaoquanUrlphp + 'api/safety/220704',//安全监测 列表
  48. getPersonalInfo: zaoquanUrlphp + 'api/personnel/people/now',//704人员定位
  49. getPersonalMap: zaoquanUrlphp + 'api/personnel/people/220704',//704人员定位详情
  50. getSafetyStatusList: zaoquanUrlphp + 'api/safety/220704/list',//704安全数据详情
  51. //工单
  52. getGroupList: zaoquanUrlphp + "api/section/getGroupList",//获取部门列表
  53. getPersonalList: zaoquanUrlphp + 'api/user/list',//获取部门人员
  54. getList: zaoquanUrlphp + 'api/section/getlist',//部门列表接口
  55. getAlllist: zaoquanUrlphp + 'api/section/getalllist',//部门列表接口1
  56. searchPersonal: zaoquanUrlphp + 'api/user/search',//搜索人员
  57. wordOrderList: zaoquanUrlphp + 'api/worksheet/classify/list',//工单分类
  58. applyList: zaoquanUrlphp + 'api/worksheet/design/list',//可申请工单列表
  59. getApplyList: zaoquanUrlphp + 'api/worksheet/apply/list',// 自己审请的工单列表
  60. getApplyD: zaoquanUrlphp + 'api/worksheet/design/',//获取可申请工单详情
  61. submitApply: zaoquanUrlphp + 'api/worksheet/apply',//提交工单信息
  62. submitApplyDe: zaoquanUrlphp + 'api/worksheet/apply/',//提交工单详情
  63. getExamine: zaoquanUrlphp + 'api/worksheet/check/list',//待审核工单
  64. getExamineDe: zaoquanUrlphp + 'api/worksheet/check/', //待审核工单详情
  65. getAlreadyDe: zaoquanUrlphp + 'api/worksheet/checked/', //待审核工单详情
  66. submitAdopt: zaoquanUrlphp + 'api/worksheet/check/',//通过审核
  67. getAlreadyExamine: zaoquanUrlphp + 'api/worksheet/checked/list',//已审核
  68. getAll_list: zaoquanUrlphp + 'api/worksheet/design/all_list',//所有工单设计列表
  69. fill_order: zaoquanUrlphp + 'api/worksheet/fill_order/', //工单信息补充
  70. up_images: zaoquanUrlphp + 'api/worksheet/design/up_images', // 图片上传
  71. //消息
  72. getNewsList: zaoquanUrlphp + 'api/message/list',//消息列表
  73. getRead: zaoquanUrlphp + 'api/message/read',//已读消息
  74. getNewsNum: zaoquanUrlphp + 'api/message/unread_num',//消息总数
  75. thumbs: zaoquanUrlphp + 'api/user/like/post',//点赞or取消点赞
  76. comment: zaoquanUrlphp + 'api/user/comment/post',//提交留言
  77. delComment: zaoquanUrlphp + 'api/user/comment/del',//删除留言
  78. simulationTotal: zaoquanUrlphp + 'api/safety/simulation/total',//模拟量统计
  79. sluicetTotal: zaoquanUrlphp + 'api/safety/sluice/total',//开关量统计
  80. safetyDetaile: zaoquanUrlphp + 'api/safety/info/total',//安全数据详情
  81. downWellTotal: zaoquanUrlphp + 'api/personnel/month/total',//一周下井趋势
  82. currentPersonalNum: zaoquanUrlphp + 'api/personnel/now',//一周下井趋势当前人数
  83. getBanNowDayTotal: zaoquanURLjava + 'api/pdcban/v1/getBanNowDayTotal',//今日产量
  84. getBanDayList: zaoquanURLjava + '/api/pdcban/v1/getBanDayList',//一周的产量
  85. getMonthSumByYear: zaoquanURLjava + 'api/pdcban/v1/getMonthSumByYear',//一年的产量
  86. getBulletin: zaoquanUrlphp + 'api/dispatch/bulletin',//生产数据公告
  87. getSchedule: zaoquanUrlphp + 'api/dispatch/schedule',//调度统计
  88. getAlarmData: zaoquanUrlphp + 'api/safety/alarm',//报警分类
  89. getGasData: zaoquanUrlphp + 'api/safety/methane',//瓦斯异常情况
  90. getChangMessageList: zaoquanURLjava + 'api/dynamic/v1/changMessageList/',//二维码和记录置为已读
  91. getChangMessageDepartmentIdList: zaoquanURLjava + 'api/dynamic/v1/changMessageDepartmentIdList', // 二维码已读
  92. chartsJurisdiction: zaoquanUrlphp + 'api/dispatch/show',//图表权限
  93. personalLocation: zaoquanUrlphp + 'api/personnel/show',//人员定位权限
  94. getPersonnalList: zaoquanUrlphp + 'api/personnel/region/total',//人员定位列表
  95. getPersonnalDistributionList: zaoquanUrlphp + 'api/personnel/mine/total',//每个矿井人数统计
  96. getPersonnalDe: zaoquanUrlphp + 'api/personnel/mine/people',//人员详情
  97. searchPeople: zaoquanUrlphp + 'api/personnel/people/search',//查询人员定位
  98. peopleInfo: zaoquanUrlphp + 'api/personnel/people/info',//个人详情
  99. getDayHourTotal: zaoquanURLjava + 'api/pdcban/v1/getDayHourTotal',//皮带称产量
  100. getPeopleNow: zaoquanUrlphp + 'api/personnel/people/now',//当前下井人数
  101. getOfficeTotal: zaoquanUrlphp + 'api/personnel/office/total',//井下人员(部门分布)
  102. getBasicTotal: zaoquanUrlphp + 'api/personnel/basic/total',//基层区队
  103. getWorkingTotal: zaoquanUrlphp + 'api/personnel/working/total',//工作面人数统计
  104. getDepartToday: zaoquanUrlphp + 'api/personnel/depart/today',//各部门人数统计
  105. getFacilityStatus: zaoquanUrlphp + 'api/personnel/facility/status',//人员定位系统设备运行状态
  106. getTimeout: zaoquanUrlphp + 'api/personnel/timeout/total',//人员超时统计
  107. getHelptotal: zaoquanUrlphp + 'api/personnel/help/total',//人员求救统计
  108. getPersonnelTimeoutDetails: zaoquanUrlphp + 'api/personnel/timeout/info',//人员超时统计详情
  109. getPersonnelHelpDetails: zaoquanUrlphp + 'api/personnel/help/info',//人员求救统计详情
  110. getPersonnelFacilityDetails: zaoquanUrlphp + 'api/personnel/facility/info',//人员求救统计详情
  111. getPersonnelWorkingDetails: zaoquanUrlphp + 'api/personnel/working/info',//工作面人员详情
  112. getPersonneldepartDetails: zaoquanUrlphp + 'api/personnel/depart/people',//井下部门分布列表
  113. getPersonneltodayDetails: zaoquanUrlphp + 'api/personnel/depart/people/today',//井下部门分布列表
  114. getBanDayThree: zaoquanURLjava + 'api/pdcban/v1/getBanDayThree',//一周的产量列表
  115. getBanNowDayAllTotal: zaoquanURLjava + 'api/pdcban/v1/getBanNowDayAllTotal',//今日产量
  116. getEfficacyCut: zaoquanUrlphp + 'api/dispatch/efficacy/cut',//割煤刀数
  117. efficacyShow: zaoquanUrlphp + 'api/efficacy/show',//效能管控
  118. getEfficacyInfo: zaoquanUrlphp + 'api/dispatch/efficacy/cut/info',//割煤刀数工作面列表
  119. getFanStatus: zaoquanUrlphp + 'api/blower/status/now',//风机状态
  120. getFanData: zaoquanUrlphp + 'api/blower/chart/hour',//风量趋势
  121. getFanDatas: zaoquanUrlphp + 'api/blower/param/now',// 风量数据
  122. getGdWsclDataNewList: zaoquanURLjava + 'api/gdwscldata/v1/getGdWsclDataNewList',//矿井水处理
  123. // getSelectWebSocketRequest:URLjava+'api/websocket/v1/selectWebSocketRequest',//采煤机
  124. getSelectWebSocketRequest: zaoquanUrlphp + '220704.php',//704 数据
  125. working220704: zaoquanUrlphp + 'api/working220704/show',//704权限
  126. getQrcodeDe: zaoquanURLjava + 'api/page/v1/detailPage',//二维码详情
  127. addPageUser: zaoquanURLjava + 'api/pageuser/v1/addPageUser',//添加浏览记录
  128. getPageUserByPageId: zaoquanURLjava + 'api/pageuser/v1/getPageUserByPageId/',//获取浏览记录
  129. getPageRecordInstanceList: zaoquanURLjava + 'api/record/v1/getPageRecordInstanceList',//记录列表
  130. selectRecordByGetPageId: zaoquanURLjava + 'api/page/v1/selectRecordByGetPageId/',// 查询记录模版名称
  131. getInspection: zaoquanURLjava + 'api/record/v1/getInspection',//记录模版内容
  132. addRecordInstance: zaoquanURLjava + 'api/record/v1/addRecordInstance',//添加记录
  133. getRecordInstanceDetailList: zaoquanURLjava + 'api/record/v1/getRecordInstanceDetailList',//记录详情
  134. addRecordUser: zaoquanURLjava + 'api/recodeuser/v1/addRecordUser',//添加记录浏览人数
  135. getRecordUserById: zaoquanURLjava + 'api/recodeuser/v1/getRecordUserById/',//获取记录浏览人数
  136. getSearchPageRecordInstance: zaoquanURLjava + 'api/record/v1/searchPageRecordInstance/',//二维码统计标示
  137. selectPageStatusPercet: zaoquanURLjava + 'api/record/v1/selectPageStatusPercet',//查询状态的比例
  138. selectPageRecodePercet: zaoquanURLjava + 'api/record/v1/selectPageRecodePercet/',//查询记录项的比例
  139. getPageRecordInstanceListRadio: zaoquanURLjava + 'api/record/v1/getPageRecordInstanceListRadio',//记录项统计 单选
  140. getRecordInstanceDetailListMobileExcel: zaoquanURLjava + 'api/record/v1/getRecordInstanceDetailListMobileExcel',//记录导出
  141. getInvoice: zaoquanUrlphp + 'api/workbench/invoice/info',//发票
  142. getMymonth: zaoquanUrlphp + 'api/notice/my_list/month',//值班月份-个人
  143. getDutyMylist: zaoquanUrlphp + 'api/notice/my_list/list',//个人值班
  144. getAllmonth: zaoquanUrlphp + 'api/notice/all_list/month',//值班月份-所有人
  145. getDutyAlllist: zaoquanUrlphp + 'api/notice/all_list/list',//所有人值班
  146. getPassword: zaoquanUrlphp + 'api/workbench/salary/password',//工资权限验证
  147. getWagesDe: zaoquanUrlphp + 'api/workbench/salary/my_info',//工资详情
  148. getWagesChart: zaoquanUrlphp + 'api/workbench/salary/chart',//工资图表
  149. getAccessToken: 'https://open.ys7.com/api/lapp/token/get',//获取萤石视频的token
  150. getVideoList: 'https://open.ys7.com/api/lapp/device/camera/list',//获取萤石视频List
  151. getVideoUrl: 'https://open.ys7.com/api/lapp/live/address/get',//获取萤石视频Url
  152. // 胶轮车
  153. rubberTyredCarList: zaoquanUrlphp + 'api/car/list', // 胶轮车列表
  154. rubberTyredcarDetails: zaoquanUrlphp + 'api/car/tra', // 车辆轨迹
  155. signalLampMsg: zaoquanUrlphp + 'api/car/signal',
  156. transparentShow: zaoquanUrlphp+'/api/transport/show' // 交通车权限
  157. }
  158. // 宁东运营部 // http://ningdongyunying.nxjiewei.com/
  159. // var URLjava = 'http://192.168.0.104:8084/'
  160. var URLjava = 'http://ningdongyunying.nxjiewei.com/' + javaApi;
  161. var urlphp = 'http://ningdongyunying.nxjiewei.com/';
  162. var urlImgUrl = 'http://ningdongyunying.nxjiewei.com';
  163. // 宁东运营部
  164. var UrlRouter = {
  165. loginApi: urlphp + 'api/oauth/token',//登录
  166. vcodeApi: urlphp + 'api/sms/vcode',//发送验证吗
  167. setApi: urlphp + 'api/user/mobile/set',//绑定手机号
  168. uploadFile: URLjava + 'api/common/v1/uploadFile',//上传
  169. repasswordApi: urlphp + 'api/user/repassword',//修改密码
  170. bannerApi: urlphp + 'api/scrollImg/list',//banner
  171. nwesApi: urlphp + 'api/article/list',//新闻
  172. NoticeApi: urlphp + 'api/notice/list',//公告
  173. ImgApi: urlphp + 'api/homeNav/list',//图片导航
  174. DistrictteamApi: urlphp + 'api/home/links',//区队
  175. userInfoApi: urlphp + 'api/user/info',//个人信息
  176. findMessageApi: URLjava + 'api/dynamic/v1/findMessage/',//消息列表 二维码 、 巡检记录
  177. getPageAndRecordDynamic: URLjava + "api/dynamic/v1/getPageAndRecordDynamic",//二维码和记录合并
  178. getPageDynamicApi: URLjava + 'api/dynamic/v1/getPageDynamic',//获取二维码列表
  179. getRecordDynamicApi: URLjava + 'api/dynamic/v1/getRecordDynamic',//获取巡检列表
  180. addPageDynamicApi: URLjava + 'api/dynamic/v1/addPageDynamic',//已读二维码
  181. addRecordDynamicApi: URLjava + 'api/dynamic/v1/addRecordDynamic',//已读巡检记录
  182. getPageRecordInstaneClosedLoop: URLjava + 'api/record/v1/getPageRecordInstaneClosedLoop',// 查询二维码巡检的闭环列表
  183. getPageRecordInstanCreateBy: URLjava + 'api/record/v1/getPageRecordInstanCreateBy',// 我的记录列表
  184. regionApi: urlphp + 'api/monitor/video/region',//监控列表权限
  185. // cameraApi:urlphp+'api/monitor/video/camera',//监控子项
  186. selectRootRequest: URLjava + 'api/resource/v1/selectRootRequest',//视频区域列表
  187. selectResourceList: URLjava + 'api/resource/v1/selectResourceList',//视频播放列表
  188. selectResourcePreviewURLs: URLjava + 'api/resource/v1/selectResourcePreviewURLs',//视频播放URl
  189. findMessageCount: URLjava + 'api/dynamic/v1/findMessageCount/',
  190. seachQrcode: URLjava + 'api/page/v1/getPageList',//查询二维码
  191. getDeviceValueTypeCode: ceshiUrl + 'api/device/v1/getDeviceValueTypeCode/',//查询传感器的数值信息
  192. getData: ceshiUrl + 'api/data/v1/getData',//实时数据查询
  193. getDeviceInfo: urlphp + 'api/safety/search',//查询传感器信息
  194. searchData: ceshiUrl + 'api/data/v1/searchData',//查询传感器实时数据详情
  195. securityJurisdiction: urlphp + 'api/detection/show',//安全监测权限
  196. getSafetyTotal: urlphp + 'api/safety/total',//704 安全监测
  197. getSafetyList: urlphp + 'api/safety/220704',//安全监测 列表
  198. getPersonalInfo: urlphp + 'api/personnel/people/now',//704人员定位
  199. getPersonalMap: urlphp + 'api/personnel/people/220704',//704人员定位详情
  200. getSafetyStatusList: urlphp + 'api/safety/220704/list',//704安全数据详情
  201. //工单
  202. getGroupList: urlphp + "api/section/getGroupList",//获取部门列表
  203. getPersonalList: urlphp + 'api/user/list',//获取部门人员
  204. getList: urlphp + 'api/section/getlist',//部门列表接口
  205. getAlllist: urlphp + 'api/section/getalllist',//部门列表接口1
  206. searchPersonal: urlphp + 'api/user/search',//搜索人员
  207. wordOrderList: urlphp + 'api/worksheet/classify/list',//工单分类
  208. applyList: urlphp + 'api/worksheet/design/list',//可申请工单列表
  209. getApplyList: urlphp + 'api/worksheet/apply/list',// 自己审请的工单列表
  210. getApplyD: urlphp + 'api/worksheet/design/',//获取可申请工单详情
  211. submitApply: urlphp + 'api/worksheet/apply',//提交工单信息
  212. submitApplyDe: urlphp + 'api/worksheet/apply/',//提交工单详情
  213. getExamine: urlphp + 'api/worksheet/check/list',//待审核工单
  214. getExamineDe: urlphp + 'api/worksheet/check/', //待审核工单详情
  215. getAlreadyDe: urlphp + 'api/worksheet/checked/', //待审核工单详情
  216. submitAdopt: urlphp + 'api/worksheet/check/',//通过审核
  217. getAlreadyExamine: urlphp + 'api/worksheet/checked/list',//已审核
  218. getAll_list: urlphp + 'api/worksheet/design/all_list',//所有工单设计列表
  219. fill_order: urlphp + 'api/worksheet/fill_order/', //工单信息补充
  220. up_images: urlphp + 'api/worksheet/design/up_images', // 图片上传
  221. //消息
  222. getNewsList: urlphp + 'api/message/list',//消息列表
  223. getRead: urlphp + 'api/message/read',//已读消息
  224. getNewsNum: urlphp + 'api/message/unread_num',//消息总数
  225. thumbs: urlphp + 'api/user/like/post',//点赞or取消点赞
  226. comment: urlphp + 'api/user/comment/post',//提交留言
  227. delComment: urlphp + 'api/user/comment/del',//删除留言
  228. simulationTotal: urlphp + 'api/safety/simulation/total',//模拟量统计
  229. sluicetTotal: urlphp + 'api/safety/sluice/total',//开关量统计
  230. safetyDetaile: urlphp + 'api/safety/info/total',//安全数据详情
  231. downWellTotal: urlphp + 'api/personnel/month/total',//一周下井趋势
  232. currentPersonalNum: urlphp + 'api/personnel/now',//一周下井趋势当前人数
  233. getBanNowDayTotal: URLjava + 'api/pdcban/v1/getBanNowDayTotal',//今日产量
  234. getBanDayList: URLjava + '/api/pdcban/v1/getBanDayList',//一周的产量
  235. getMonthSumByYear: URLjava + 'api/pdcban/v1/getMonthSumByYear',//一年的产量
  236. getBulletin: urlphp + 'api/dispatch/bulletin',//生产数据公告
  237. getSchedule: urlphp + 'api/dispatch/schedule',//调度统计
  238. getAlarmData: urlphp + 'api/safety/alarm',//报警分类
  239. getGasData: urlphp + 'api/safety/methane',//瓦斯异常情况
  240. getChangMessageList: URLjava + 'api/dynamic/v1/changMessageList/',//二维码和记录置为已读
  241. getChangMessageDepartmentIdList: URLjava + 'api/dynamic/v1/changMessageDepartmentIdList', // 二维码已读
  242. chartsJurisdiction: urlphp + 'api/dispatch/show',//图表权限
  243. personalLocation: urlphp + 'api/personnel/show',//人员定位权限
  244. getPersonnalList: urlphp + 'api/personnel/region/total',//人员定位列表
  245. getPersonnalDistributionList: urlphp + 'api/personnel/mine/total',//每个矿井人数统计
  246. getPersonnalDe: urlphp + 'api/personnel/mine/people',//人员详情
  247. searchPeople: urlphp + 'api/personnel/people/search',//查询人员定位
  248. peopleInfo: urlphp + 'api/personnel/people/info',//个人详情
  249. getDayHourTotal: URLjava + 'api/pdcban/v1/getDayHourTotal',//皮带称产量
  250. getPeopleNow: urlphp + 'api/personnel/people/now',//当前下井人数
  251. getOfficeTotal: urlphp + 'api/personnel/office/total',//井下人员(部门分布)
  252. getBasicTotal: urlphp + 'api/personnel/basic/total',//基层区队
  253. getWorkingTotal: urlphp + 'api/personnel/working/total',//工作面人数统计
  254. getDepartToday: urlphp + 'api/personnel/depart/today',//各部门人数统计
  255. getFacilityStatus: urlphp + 'api/personnel/facility/status',//人员定位系统设备运行状态
  256. getTimeout: urlphp + 'api/personnel/timeout/total',//人员超时统计
  257. getHelptotal: urlphp + 'api/personnel/help/total',//人员求救统计
  258. getPersonnelTimeoutDetails: urlphp + 'api/personnel/timeout/info',//人员超时统计详情
  259. getPersonnelHelpDetails: urlphp + 'api/personnel/help/info',//人员求救统计详情
  260. getPersonnelFacilityDetails: urlphp + 'api/personnel/facility/info',//人员求救统计详情
  261. getPersonnelWorkingDetails: urlphp + 'api/personnel/working/info',//工作面人员详情
  262. getPersonneldepartDetails: urlphp + 'api/personnel/depart/people',//井下部门分布列表
  263. getPersonneltodayDetails: urlphp + 'api/personnel/depart/people/today',//井下部门分布列表
  264. getBanDayThree: URLjava + 'api/pdcban/v1/getBanDayThree',//一周的产量列表
  265. getBanNowDayAllTotal: URLjava + 'api/pdcban/v1/getBanNowDayAllTotal',//今日产量
  266. getEfficacyCut: urlphp + 'api/dispatch/efficacy/cut',//割煤刀数
  267. efficacyShow: urlphp + 'api/efficacy/show',//效能管控
  268. getEfficacyInfo: urlphp + 'api/dispatch/efficacy/cut/info',//割煤刀数工作面列表
  269. getFanStatus: urlphp + 'api/blower/status/now',//风机状态
  270. getFanData: urlphp + 'api/blower/chart/hour',//风量趋势
  271. getFanDatas: urlphp + 'api/blower/param/now',// 风量数据
  272. getGdWsclDataNewList: URLjava + 'api/gdwscldata/v1/getGdWsclDataNewList',//矿井水处理
  273. // getSelectWebSocketRequest:URLjava+'api/websocket/v1/selectWebSocketRequest',//采煤机
  274. getSelectWebSocketRequest: urlphp + '220704.php',//704 数据
  275. working220704: urlphp + 'api/working220704/show',//704权限
  276. getQrcodeDe: URLjava + 'api/page/v1/detailPage',//二维码详情
  277. addPageUser: URLjava + 'api/pageuser/v1/addPageUser',//添加浏览记录
  278. getPageUserByPageId: URLjava + 'api/pageuser/v1/getPageUserByPageId/',//获取浏览记录
  279. getPageRecordInstanceList: URLjava + 'api/record/v1/getPageRecordInstanceList',//记录列表
  280. selectRecordByGetPageId: URLjava + 'api/page/v1/selectRecordByGetPageId/',// 查询记录模版名称
  281. getInspection: URLjava + 'api/record/v1/getInspection',//记录模版内容
  282. addRecordInstance: URLjava + 'api/record/v1/addRecordInstance',//添加记录
  283. getRecordInstanceDetailList: URLjava + 'api/record/v1/getRecordInstanceDetailList',//记录详情
  284. addRecordUser: URLjava + 'api/recodeuser/v1/addRecordUser',//添加记录浏览人数
  285. getRecordUserById: URLjava + 'api/recodeuser/v1/getRecordUserById/',//获取记录浏览人数
  286. getSearchPageRecordInstance: URLjava + 'api/record/v1/searchPageRecordInstance/',//二维码统计标示
  287. selectPageStatusPercet: URLjava + 'api/record/v1/selectPageStatusPercet',//查询状态的比例
  288. selectPageRecodePercet: URLjava + 'api/record/v1/selectPageRecodePercet/',//查询记录项的比例
  289. getPageRecordInstanceListRadio: URLjava + 'api/record/v1/getPageRecordInstanceListRadio',//记录项统计 单选
  290. getRecordInstanceDetailListMobileExcel: URLjava + 'api/record/v1/getRecordInstanceDetailListMobileExcel',//记录导出
  291. getInvoice: urlphp + 'api/workbench/invoice/info',//发票
  292. getMymonth: urlphp + 'api/notice/my_list/month',//值班月份-个人
  293. getDutyMylist: urlphp + 'api/notice/my_list/list',//个人值班
  294. getAllmonth: urlphp + 'api/notice/all_list/month',//值班月份-所有人
  295. getDutyAlllist: urlphp + 'api/notice/all_list/list',//所有人值班
  296. getPassword: urlphp + 'api/workbench/salary/password',//工资权限验证
  297. getWagesDe: urlphp + 'api/workbench/salary/my_info',//工资详情
  298. getWagesChart: urlphp + 'api/workbench/salary/chart',//工资图表
  299. getAccessToken: 'https://open.ys7.com/api/lapp/token/get',//获取萤石视频的token
  300. getVideoList: 'https://open.ys7.com/api/lapp/device/camera/list',//获取萤石视频List
  301. getVideoUrl: 'https://open.ys7.com/api/lapp/live/address/get',//获取萤石视频Url
  302. // 胶轮车
  303. rubberTyredCarList: zaoquanUrlphp + 'api/car/list', // 胶轮车列表
  304. rubberTyredcarDetails: zaoquanUrlphp + 'api/car/tra', // 车辆轨迹
  305. signalLampMsg: zaoquanUrlphp + 'api/car/signal',
  306. getWorkbenchList: urlphp + 'api/workbench/index', // 工作台
  307. getPagebyNOAndName: URLjava + 'api/page/v1/getPagebyNOAndName'
  308. };
  309. // 金凤
  310. var jinfengUrlphp = 'http://jinfeng.nxjiewei.com:8011/';
  311. var jinfengURLjava = 'http://jinfeng.nxjiewei.com:8011'+javaApi;
  312. // 金凤
  313. var jinfengUrlRouter = {
  314. bannerApi: jinfengUrlphp + 'api/scrollImg/list',//banner
  315. nwesApi: jinfengUrlphp + 'api/article/list',//新闻
  316. NoticeApi: jinfengUrlphp + 'api/notice/list',//公告
  317. ImgApi: jinfengUrlphp + 'api/homeNav/list',//图片导航
  318. DistrictteamApi: jinfengUrlphp + 'api/home/links',//区队
  319. userInfoApi: jinfengUrlphp + 'api/user/info',//个人信息
  320. findMessageApi: jinfengURLjava + 'api/dynamic/v1/findMessage/',//消息列表 二维码 、 巡检记录
  321. getPageAndRecordDynamic: jinfengURLjava + "api/dynamic/v1/getPageAndRecordDynamic",//二维码和记录合并
  322. getPageDynamicApi: jinfengURLjava + 'api/dynamic/v1/getPageDynamic',//获取二维码列表
  323. getRecordDynamicApi: jinfengURLjava + 'api/dynamic/v1/getRecordDynamic',//获取巡检列表
  324. addPageDynamicApi: jinfengURLjava + 'api/dynamic/v1/addPageDynamic',//已读二维码
  325. addRecordDynamicApi: jinfengURLjava + 'api/dynamic/v1/addRecordDynamic',//已读巡检记录
  326. getPageRecordInstaneClosedLoop: jinfengURLjava + 'api/record/v1/getPageRecordInstaneClosedLoop',// 查询二维码巡检的闭环列表
  327. getPageRecordInstanCreateBy: jinfengURLjava + 'api/record/v1/getPageRecordInstanCreateBy',// 我的记录列表
  328. regionApi: jinfengUrlphp + 'api/monitor/video/region',//监控列表权限
  329. // cameraApi:urlphp+'api/monitor/video/camera',//监控子项
  330. selectRootRequest: jinfengURLjava + 'api/resource/v1/selectRootRequest',//视频区域列表
  331. selectResourceList: jinfengURLjava + 'api/resource/v1/selectResourceList',//视频播放列表
  332. selectResourcePreviewURLs: jinfengURLjava + 'api/resource/v1/selectResourcePreviewURLs',//视频播放URl
  333. findMessageCount: jinfengURLjava + 'api/dynamic/v1/findMessageCount/',
  334. seachQrcode: jinfengURLjava + 'api/page/v1/getPageList',//查询二维码
  335. getDeviceValueTypeCode: ceshiUrl + 'api/device/v1/getDeviceValueTypeCode/',//查询传感器的数值信息
  336. getData: ceshiUrl + 'api/data/v1/getData',//实时数据查询
  337. getDeviceInfo: jinfengUrlphp + 'api/safety/search',//查询传感器信息
  338. searchData: ceshiUrl + 'api/data/v1/searchData',//查询传感器实时数据详情
  339. securityJurisdiction: jinfengUrlphp + 'api/detection/show',//安全监测权限
  340. getSafetyTotal: jinfengUrlphp + 'api/safety/total',//704 安全监测
  341. getSafetyList: jinfengUrlphp + 'api/safety/220704',//安全监测 列表
  342. getPersonalInfo: jinfengUrlphp + 'api/personnel/people/now',//704人员定位
  343. getPersonalMap: jinfengUrlphp + 'api/personnel/people/220704',//704人员定位详情
  344. getSafetyStatusList: jinfengUrlphp + 'api/safety/220704/list',//704安全数据详情
  345. //工单
  346. getGroupList: jinfengUrlphp + "api/section/getGroupList",//获取部门列表
  347. getPersonalList: jinfengUrlphp + 'api/user/list',//获取部门人员
  348. getList: jinfengUrlphp + 'api/section/getlist',//部门列表接口
  349. getAlllist: jinfengUrlphp + 'api/section/getalllist',//部门列表接口1
  350. searchPersonal: jinfengUrlphp + 'api/user/search',//搜索人员
  351. wordOrderList: jinfengUrlphp + 'api/worksheet/classify/list',//工单分类
  352. applyList: jinfengUrlphp + 'api/worksheet/design/list',//可申请工单列表
  353. getApplyList: jinfengUrlphp + 'api/worksheet/apply/list',// 自己审请的工单列表
  354. getApplyD: jinfengUrlphp + 'api/worksheet/design/',//获取可申请工单详情
  355. submitApply: jinfengUrlphp + 'api/worksheet/apply',//提交工单信息
  356. submitApplyDe: jinfengUrlphp + 'api/worksheet/apply/',//提交工单详情
  357. getExamine: jinfengUrlphp + 'api/worksheet/check/list',//待审核工单
  358. getExamineDe: jinfengUrlphp + 'api/worksheet/check/', //待审核工单详情
  359. getAlreadyDe: jinfengUrlphp + 'api/worksheet/checked/', //待审核工单详情
  360. submitAdopt: jinfengUrlphp + 'api/worksheet/check/',//通过审核
  361. getAlreadyExamine: jinfengUrlphp + 'api/worksheet/checked/list',//已审核
  362. getAll_list: jinfengUrlphp + 'api/worksheet/design/all_list',//所有工单设计列表
  363. fill_order: jinfengUrlphp + 'api/worksheet/fill_order/', //工单信息补充
  364. up_images: jinfengUrlphp + 'api/worksheet/design/up_images', // 图片上传
  365. //消息
  366. getNewsList: jinfengUrlphp + 'api/message/list',//消息列表
  367. getRead: jinfengUrlphp + 'api/message/read',//已读消息
  368. getNewsNum: jinfengUrlphp + 'api/message/unread_num',//消息总数
  369. thumbs: jinfengUrlphp + 'api/user/like/post',//点赞or取消点赞
  370. comment: jinfengUrlphp + 'api/user/comment/post',//提交留言
  371. delComment: jinfengUrlphp + 'api/user/comment/del',//删除留言
  372. simulationTotal: jinfengUrlphp + 'api/safety/simulation/total',//模拟量统计
  373. sluicetTotal: jinfengUrlphp + 'api/safety/sluice/total',//开关量统计
  374. safetyDetaile: jinfengUrlphp + 'api/safety/info/total',//安全数据详情
  375. downWellTotal: jinfengUrlphp + 'api/personnel/month/total',//一周下井趋势
  376. currentPersonalNum: jinfengUrlphp + 'api/personnel/now',//一周下井趋势当前人数
  377. getBanNowDayTotal: jinfengUrlphp + 'api/pdcban/v1/getBanNowDayTotal',//今日产量
  378. getBanDayList: jinfengUrlphp + '/api/pdcban/v1/getBanDayList',//一周的产量
  379. getMonthSumByYear: jinfengURLjava + 'api/pdcban/v1/getMonthSumByYear',//一年的产量
  380. getBulletin: jinfengUrlphp + 'api/dispatch/bulletin',//生产数据公告
  381. getSchedule: jinfengUrlphp + 'api/dispatch/schedule',//调度统计
  382. getAlarmData: jinfengUrlphp + 'api/safety/alarm',//报警分类
  383. getGasData: jinfengUrlphp + 'api/safety/methane',//瓦斯异常情况
  384. getChangMessageList: jinfengURLjava + 'api/dynamic/v1/changMessageList/',//二维码和记录置为已读
  385. getChangMessageDepartmentIdList: jinfengURLjava + 'api/dynamic/v1/changMessageDepartmentIdList', // 二维码已读
  386. chartsJurisdiction: jinfengUrlphp + 'api/dispatch/show',//图表权限
  387. personalLocation: jinfengUrlphp + 'api/personnel/show',//人员定位权限
  388. getPersonnalList: jinfengUrlphp + 'api/personnel/region/total',//人员定位列表
  389. getPersonnalDistributionList: jinfengUrlphp + 'api/personnel/mine/total',//每个矿井人数统计
  390. getPersonnalDe: jinfengUrlphp + 'api/personnel/mine/people',//人员详情
  391. searchPeople: jinfengUrlphp + 'api/personnel/people/search',//查询人员定位
  392. peopleInfo: jinfengUrlphp + 'api/personnel/people/info',//个人详情
  393. getDayHourTotal: jinfengURLjava + 'api/pdcban/v1/getDayHourTotal',//皮带称产量
  394. getPeopleNow: jinfengUrlphp + 'api/personnel/people/now',//当前下井人数
  395. getOfficeTotal: jinfengUrlphp + 'api/personnel/office/total',//井下人员(部门分布)
  396. getBasicTotal: jinfengUrlphp + 'api/personnel/basic/total',//基层区队
  397. getWorkingTotal: jinfengUrlphp + 'api/personnel/working/total',//工作面人数统计
  398. getDepartToday: jinfengUrlphp + 'api/personnel/depart/today',//各部门人数统计
  399. getFacilityStatus: jinfengUrlphp + 'api/personnel/facility/status',//人员定位系统设备运行状态
  400. getTimeout: jinfengUrlphp + 'api/personnel/timeout/total',//人员超时统计
  401. getHelptotal: jinfengUrlphp + 'api/personnel/help/total',//人员求救统计
  402. getPersonnelTimeoutDetails: jinfengUrlphp + 'api/personnel/timeout/info',//人员超时统计详情
  403. getPersonnelHelpDetails: jinfengUrlphp + 'api/personnel/help/info',//人员求救统计详情
  404. getPersonnelFacilityDetails: jinfengUrlphp + 'api/personnel/facility/info',//人员求救统计详情
  405. getPersonnelWorkingDetails: jinfengUrlphp + 'api/personnel/working/info',//工作面人员详情
  406. getPersonneldepartDetails: jinfengUrlphp + 'api/personnel/depart/people',//井下部门分布列表
  407. getPersonneltodayDetails: jinfengUrlphp + 'api/personnel/depart/people/today',//井下部门分布列表
  408. getBanDayThree: jinfengURLjava + 'api/pdcban/v1/getBanDayThree',//一周的产量列表
  409. getBanNowDayAllTotal: jinfengURLjava + 'api/pdcban/v1/getBanNowDayAllTotal',//今日产量
  410. getEfficacyCut: jinfengUrlphp + 'api/dispatch/efficacy/cut',//割煤刀数
  411. efficacyShow: jinfengUrlphp + 'api/efficacy/show',//效能管控
  412. getEfficacyInfo: jinfengUrlphp + 'api/dispatch/efficacy/cut/info',//割煤刀数工作面列表
  413. getFanStatus: jinfengUrlphp + 'api/blower/status/now',//风机状态
  414. getFanData: jinfengUrlphp + 'api/blower/chart/hour',//风量趋势
  415. getFanDatas: jinfengUrlphp + 'api/blower/param/now',// 风量数据
  416. getGdWsclDataNewList: jinfengURLjava + 'api/gdwscldata/v1/getGdWsclDataNewList',//矿井水处理
  417. // getSelectWebSocketRequest:URLjava+'api/websocket/v1/selectWebSocketRequest',//采煤机
  418. getSelectWebSocketRequest: jinfengUrlphp + '220704.php',//704 数据
  419. working220704: jinfengUrlphp + 'api/working220704/show',//704权限
  420. getQrcodeDe: jinfengURLjava + 'api/page/v1/detailPage',//二维码详情
  421. addPageUser: jinfengURLjava + 'api/pageuser/v1/addPageUser',//添加浏览记录
  422. getPageUserByPageId: jinfengURLjava + 'api/pageuser/v1/getPageUserByPageId/',//获取浏览记录
  423. getPageRecordInstanceList: jinfengURLjava + 'api/record/v1/getPageRecordInstanceList',//记录列表
  424. selectRecordByGetPageId: jinfengURLjava + 'api/page/v1/selectRecordByGetPageId/',// 查询记录模版名称
  425. getInspection: jinfengURLjava + 'api/record/v1/getInspection',//记录模版内容
  426. addRecordInstance: jinfengURLjava + 'api/record/v1/addRecordInstance',//添加记录
  427. getRecordInstanceDetailList: jinfengURLjava + 'api/record/v1/getRecordInstanceDetailList',//记录详情
  428. addRecordUser: jinfengURLjava + 'api/recodeuser/v1/addRecordUser',//添加记录浏览人数
  429. getRecordUserById: jinfengURLjava + 'api/recodeuser/v1/getRecordUserById/',//获取记录浏览人数
  430. getSearchPageRecordInstance: jinfengURLjava + 'api/record/v1/searchPageRecordInstance/',//二维码统计标示
  431. selectPageStatusPercet: jinfengURLjava + 'api/record/v1/selectPageStatusPercet',//查询状态的比例
  432. selectPageRecodePercet: jinfengURLjava + 'api/record/v1/selectPageRecodePercet/',//查询记录项的比例
  433. getPageRecordInstanceListRadio: jinfengURLjava + 'api/record/v1/getPageRecordInstanceListRadio',//记录项统计 单选
  434. getRecordInstanceDetailListMobileExcel: jinfengURLjava + 'api/record/v1/getRecordInstanceDetailListMobileExcel',//记录导出
  435. getInvoice: jinfengUrlphp + 'api/workbench/invoice/info',//发票
  436. getMymonth: jinfengUrlphp + 'api/notice/my_list/month',//值班月份-个人
  437. getDutyMylist: jinfengUrlphp + 'api/notice/my_list/list',//个人值班
  438. getAllmonth: jinfengUrlphp + 'api/notice/all_list/month',//值班月份-所有人
  439. getDutyAlllist: jinfengUrlphp + 'api/notice/all_list/list',//所有人值班
  440. getPassword: jinfengUrlphp + 'api/workbench/salary/password',//工资权限验证
  441. getWagesDe: jinfengUrlphp + 'api/workbench/salary/my_info',//工资详情
  442. getWagesChart: jinfengUrlphp + 'api/workbench/salary/chart',//工资图表
  443. getAccessToken: 'https://open.ys7.com/api/lapp/token/get',//获取萤石视频的token
  444. getVideoList: 'https://open.ys7.com/api/lapp/device/camera/list',//获取萤石视频List
  445. getVideoUrl: 'https://open.ys7.com/api/lapp/live/address/get',//获取萤石视频Url
  446. // 胶轮车
  447. rubberTyredCarList: jinfengUrlphp + 'api/car/list', // 胶轮车列表
  448. rubberTyredcarDetails: jinfengUrlphp + 'api/car/tra', // 车辆轨迹
  449. signalLampMsg: jinfengUrlphp + 'api/car/signal',
  450. // 设备监控
  451. realList: jinfengUrlphp+ 'api/belt/real',
  452. // 下井记录(个人)
  453. getMonthlist: jinfengUrlphp + 'api/personnel/downwell/monthlist/once', // 下井月份列表接口
  454. getMonthOnce: jinfengUrlphp + 'api/personnel/downwell/month/once', // 需下井次数 和已下井次数 以及完成度
  455. getMonthInfo: jinfengUrlphp + 'api/personnel/downwell/month/info', // 当月下井详细信息列表
  456. getOnceInfo: jinfengUrlphp + 'api/personnel/downwell/once/info' // 当次信息的详细信息
  457. }
  458. var mySwiper;//插件
  459. var loadingId = "";
  460. /**
  461. * 加载动画
  462. *
  463. */
  464. (function (window, undefined) {
  465. "use strict";
  466. var auiToast = function () {
  467. // this.create();
  468. };
  469. var isShow = false;
  470. auiToast.prototype = {
  471. create: function (params, callback) {
  472. var self = this;
  473. var toastHtml = '';
  474. switch (params.type) {
  475. case "success":
  476. var iconHtml = '<i class="aui-iconfont aui-icon-correct"></i>';
  477. break;
  478. case "fail":
  479. var iconHtml = '<i class="aui-iconfont aui-icon-close"></i>';
  480. break;
  481. case "custom":
  482. var iconHtml = params.html;
  483. break;
  484. case "loading":
  485. var iconHtml = '<div class="aui-toast-loading"></div>';
  486. break;
  487. }
  488. var titleHtml = params.title ? '<div class="aui-toast-content">' + params.title + '</div>' : '';
  489. toastHtml = `<div class="api-toast">
  490. <div class="aui-toast">${iconHtml + titleHtml}</div>
  491. </div>`
  492. if (document.querySelector(".aui-toast")) return;
  493. document.body.insertAdjacentHTML('beforeend', toastHtml);
  494. var duration = params.duration ? params.duration : "2000";
  495. self.show();
  496. if (params.type == 'loading') {
  497. if (callback) {
  498. callback({
  499. status: "success"
  500. });
  501. };
  502. } else {
  503. setTimeout(function () {
  504. self.hide();
  505. }, duration)
  506. }
  507. },
  508. show: function () {
  509. var self = this;
  510. document.querySelector(".aui-toast").style.display = "block";
  511. document.querySelector(".aui-toast").style.marginTop = "-" + Math.round(document.querySelector(".aui-toast").offsetHeight / 2) + "px";
  512. if (document.querySelector(".aui-toast")) return;
  513. },
  514. hide: function () {
  515. var self = this;
  516. if (document.querySelector(".aui-toast")) {
  517. document.querySelector(".api-toast").remove()
  518. }
  519. },
  520. remove: function () {
  521. if (document.querySelector(".aui-dialog")) document.querySelector(".aui-dialog").parentNode.removeChild(document.querySelector(".aui-dialog"));
  522. if (document.querySelector(".aui-mask")) {
  523. document.querySelector(".aui-mask").classList.remove("aui-mask-out");
  524. }
  525. return true;
  526. },
  527. success: function (params, callback) {
  528. var self = this;
  529. params.type = "success";
  530. return self.create(params, callback);
  531. },
  532. fail: function (params, callback) {
  533. var self = this;
  534. params.type = "fail";
  535. return self.create(params, callback);
  536. },
  537. custom: function (params, callback) {
  538. var self = this;
  539. params.type = "custom";
  540. return self.create(params, callback);
  541. },
  542. loading: function (params, callback) {
  543. var self = this;
  544. params.type = "loading";
  545. return self.create(params, callback);
  546. }
  547. };
  548. window.auiToast = auiToast;
  549. })(window);
  550. (function (window, undefined) {
  551. "use strict";
  552. var apiToast = function () {
  553. // this.create();
  554. };
  555. var isShow = false;
  556. apiToast.prototype = {
  557. create: function (params, callback) {
  558. var self = this;
  559. var toastHtml = '';
  560. switch (params.type) {
  561. case "success":
  562. var iconHtml = '<i class="aui-iconfont aui-icon-correct"></i>';
  563. break;
  564. case "fail":
  565. var iconHtml = '<i class="aui-iconfont aui-icon-close"></i>';
  566. break;
  567. case "custom":
  568. var iconHtml = params.html;
  569. break;
  570. case "loading":
  571. var iconHtml = '<div class="api-toast-loading"></div>';
  572. break;
  573. }
  574. var titleHtml = params.title ? '<div class="api-toast-content">' + params.title + '</div>' : '';
  575. toastHtml = `<div class="api-toast">${iconHtml + titleHtml}</div>`
  576. if (document.querySelector(".api-toast")) return;
  577. document.body.insertAdjacentHTML('beforeend', toastHtml);
  578. var duration = params.duration ? params.duration : "2000";
  579. self.show();
  580. if (params.type == 'loading') {
  581. if (callback) {
  582. callback({
  583. status: "success"
  584. });
  585. };
  586. } else {
  587. setTimeout(function () {
  588. self.hide();
  589. }, duration)
  590. }
  591. },
  592. show: function () {
  593. var self = this;
  594. document.querySelector(".api-toast").style.display = "block";
  595. document.querySelector(".api-toast").style.marginTop = "-" + Math.round(document.querySelector(".api-toast").offsetHeight / 2) + "px";
  596. if (document.querySelector(".api-toast")) return;
  597. },
  598. hide: function () {
  599. var self = this;
  600. if (document.querySelector(".api-toast")) {
  601. document.querySelector(".api-toast").parentNode.removeChild(document.querySelector(".api-toast"));
  602. }
  603. },
  604. remove: function () {
  605. if (document.querySelector(".api-dialog")) document.querySelector(".api-dialog").parentNode.removeChild(document.querySelector(".api-dialog"));
  606. if (document.querySelector(".api-mask")) {
  607. document.querySelector(".api-mask").classList.remove("api-mask-out");
  608. }
  609. return true;
  610. },
  611. success: function (params, callback) {
  612. var self = this;
  613. params.type = "success";
  614. return self.create(params, callback);
  615. },
  616. fail: function (params, callback) {
  617. var self = this;
  618. params.type = "fail";
  619. return self.create(params, callback);
  620. },
  621. custom: function (params, callback) {
  622. var self = this;
  623. params.type = "custom";
  624. return self.create(params, callback);
  625. },
  626. loading: function (params, callback) {
  627. var self = this;
  628. params.type = "loading";
  629. return self.create(params, callback);
  630. }
  631. };
  632. window.apiToast = apiToast;
  633. })(window);
  634. /**
  635. *
  636. */
  637. /**
  638. * ajax 封装
  639. */
  640. (function (window) {
  641. /**
  642. ** 不带加载效果
  643. ** Promise 形式的ajax
  644. **/
  645. var h = {};
  646. h.requestData = (url, method, values) => {
  647. return new Promise((resolve, reject) => {
  648. var info = $api.getStorage('data'),
  649. token = JSON.parse(info).data.access_token || "";
  650. var headers = {
  651. "Authorization": "Bearer " + token
  652. };
  653. var tAjax = {
  654. url,
  655. method,
  656. headers,
  657. dataType: 'json',
  658. data: {
  659. values
  660. },
  661. timeout: 30
  662. };
  663. api.ajax(tAjax, function (ret, err) {
  664. if (ret) {
  665. resolve(ret)
  666. } else {
  667. reject(err)
  668. }
  669. });
  670. })
  671. };
  672. /**
  673. ** 带加载效果
  674. ** Promise 形式的ajax
  675. **/
  676. h.requestDataLoging = (url, method, values) => {
  677. var toast = new auiToast();
  678. toast.loading({
  679. title: "加载中",
  680. duration: 2000
  681. });
  682. return new Promise((resolve, reject) => {
  683. var info = $api.getStorage('data'),
  684. token = JSON.parse(info).data.access_token || "";
  685. var headers = {
  686. "Authorization": "Bearer " + token
  687. };
  688. var tAjax = {
  689. url,
  690. method,
  691. headers,
  692. dataType: 'json',
  693. data: {
  694. values
  695. },
  696. timeout: 30
  697. };
  698. api.ajax(tAjax, function (ret, err) {
  699. if (ret) {
  700. resolve(ret)
  701. } else {
  702. reject(err)
  703. }
  704. toast.hide()
  705. });
  706. })
  707. };
  708. /**
  709. ** 带加载效果 (apicloud showProgress)
  710. ** Promise 形式的 ajax
  711. **/
  712. h.requestShowProgress = (url, method, values) => {
  713. api.showProgress({
  714. title: '加载中...',
  715. text: '',
  716. modal: true
  717. });
  718. return new Promise((resolve, reject) => {
  719. var info = $api.getStorage('data'),
  720. token = JSON.parse(info).data.access_token || "";
  721. var headers = {
  722. "Authorization": "Bearer " + token
  723. };
  724. var tAjax = {
  725. url,
  726. method,
  727. headers,
  728. dataType: 'json',
  729. data: {
  730. values
  731. },
  732. timeout: 30
  733. };
  734. api.ajax(tAjax, function (ret, err) {
  735. if (ret) {
  736. resolve(ret)
  737. } else {
  738. reject(err)
  739. }
  740. api.hideProgress()
  741. });
  742. })
  743. };
  744. /**
  745. ** 带加载效果
  746. ** Promise 形式的 文件上传ajax
  747. **/
  748. h.fileUploadRequest = (url, method, files) => {
  749. api.showProgress({
  750. title: '上传中...',
  751. text: '',
  752. modal: true
  753. });
  754. return new Promise((resolve, reject) => {
  755. var info = $api.getStorage('data'),
  756. token = JSON.parse(info).data.access_token || "";
  757. var headers = {
  758. "Authorization": "Bearer " + token
  759. };
  760. var tAjax = {
  761. url,
  762. method,
  763. headers,
  764. data: {
  765. files
  766. }
  767. };
  768. api.ajax(tAjax, function (ret, err) {
  769. if (ret) {
  770. resolve(ret)
  771. } else {
  772. reject(err)
  773. }
  774. api.hideProgress()
  775. });
  776. })
  777. };
  778. /**
  779. ** 带加载效果的ajax
  780. **/
  781. h.requestData = (url, method, values) => {
  782. return new Promise((resolve, reject) => {
  783. var info = $api.getStorage('data'),
  784. token = JSON.parse(info).data.access_token || "";
  785. var headers = {
  786. "Authorization": "Bearer " + token
  787. };
  788. var tAjax = {
  789. url,
  790. method,
  791. headers,
  792. dataType: 'json',
  793. data: {
  794. values
  795. },
  796. timeout: 30
  797. };
  798. api.ajax(tAjax, function (ret, err) {
  799. if (ret) {
  800. resolve(ret)
  801. } else {
  802. reject(err)
  803. }
  804. });
  805. })
  806. };
  807. h.fnReuestData = function (pPartUrl, pHeaders, pMethod, pData, pCallback) {
  808. toast.loading({
  809. title: "加载中",
  810. duration: 2000
  811. });
  812. var tHeaders = pHeaders ? pHeaders : '';
  813. var tAjax = {
  814. url: pPartUrl,
  815. method: pMethod,
  816. headers: tHeaders,
  817. dataType: 'json',
  818. data: {
  819. values: pData
  820. },
  821. timeout: 30
  822. };
  823. api.ajax(tAjax, function (ret, err) {
  824. if ('function' === typeof pCallback) {
  825. pCallback(ret, err)
  826. }
  827. });
  828. };
  829. /**
  830. *不带低白加载效果
  831. **/
  832. h.fnReuestDataNoW = function (pPartUrl, pHeaders, pMethod, pData, pCallback) {
  833. apiToast.loading({
  834. title: "加载中",
  835. duration: 2000
  836. });
  837. var tHeaders = pHeaders ? pHeaders : '';
  838. var tAjax = {
  839. url: pPartUrl,
  840. method: pMethod,
  841. headers: tHeaders,
  842. dataType: 'json',
  843. data: {
  844. values: pData
  845. },
  846. timeout: 30
  847. };
  848. api.ajax(tAjax, function (ret, err) {
  849. if ('function' === typeof pCallback) {
  850. pCallback(ret, err)
  851. }
  852. });
  853. };
  854. /**
  855. ** 不带加载效果的ajax
  856. **/
  857. h.fnReuestDataNologing = function (pPartUrl, pHeaders, pMethod, pData, pCallback) {
  858. var tHeaders = pHeaders ? pHeaders : '';
  859. var tAjax = {
  860. url: pPartUrl,
  861. method: pMethod,
  862. headers: tHeaders,
  863. dataType: 'json',
  864. data: {
  865. values: pData
  866. },
  867. timeout: 30
  868. };
  869. api.ajax(tAjax, function (ret, err) {
  870. if ('function' === typeof pCallback) {
  871. pCallback(ret, err)
  872. }
  873. });
  874. };
  875. /**
  876. ** 加载效果的ajax
  877. ** 传JSON数据格式
  878. **/
  879. h.fnReuestDataJSON = function (pPartUrl, pHeaders, pMethod, pData, pCallback) {
  880. toast.loading({
  881. title: "加载中",
  882. duration: 2000
  883. });
  884. var tHeaders = pHeaders ? pHeaders : '';
  885. var tAjax = {
  886. url: pPartUrl,
  887. method: pMethod,
  888. contentType: 'application/json',
  889. headers: tHeaders,
  890. dataType: 'json',
  891. data: {
  892. values: pData
  893. },
  894. timeout: 30
  895. };
  896. api.ajax(tAjax, function (ret, err) {
  897. if ('function' === typeof pCallback) {
  898. pCallback(ret, err)
  899. }
  900. });
  901. };
  902. /**
  903. ** 不带加载效果的ajax
  904. ** 传JSON数据格式
  905. **/
  906. window.$http = h;
  907. }(window));
  908. /**
  909. * 常用方法
  910. */
  911. (function (window) {
  912. var e = {};
  913. /**
  914. * 封装消息发送时间
  915. */
  916. e.sendEvent = function (name, extra) {
  917. api.sendEvent({
  918. name: name,
  919. extra: extra
  920. });
  921. };
  922. /**
  923. * 消息监听事件
  924. */
  925. e.addEventListener = function (name, callback) {
  926. api.addEventListener({
  927. name: name
  928. }, function (ret, err) {
  929. callback(ret)
  930. });
  931. };
  932. /**
  933. *  滑动底部监听事件
  934. */
  935. e.scrollBottomListener = function (callback, threshold) {
  936. api.addEventListener({
  937. name: 'scrolltobottom',
  938. extra: {
  939. threshold: threshold || 0
  940. }
  941. }, function (ret, err) {
  942. callback(ret)
  943. });
  944. };
  945. /**
  946. * frame
  947. *
  948. */
  949. e.openFrame = function (name, headers, footer, pageParam, otherParam) {
  950. var headerH = headers ? $api.dom(headers).offsetHeight : 0;
  951. var footetH = footer ? $api.dom(footer).offsetHeight : 0;
  952. api.openFrame({
  953. name: name,
  954. url: name + '.html',
  955. bounces: true,
  956. scrollEnabled: false,
  957. hScrollBarEnabled: false,
  958. progress: {
  959. type: 'page'
  960. },
  961. animation: {
  962. type: 'fade'
  963. },
  964. rect: {
  965. x: 0,
  966. y: headerH,
  967. w: 'auto',
  968. h: 'auto'
  969. },
  970. pageParam: api.pageParam || {}
  971. });
  972. };
  973. /**
  974. *禁止页面弹动
  975. *
  976. **/
  977. e.openFrameBounces = function (name, headers, footer, pageParam, otherParam) {
  978. var headerH = headers ? $api.dom(headers).offsetHeight : 0;
  979. var footetH = footer ? $api.dom(footer).offsetHeight : 0;
  980. api.openFrame({
  981. name: name,
  982. url: name + '.html',
  983. bounces: false,
  984. scrollEnabled: false,
  985. hScrollBarEnabled: false,
  986. progress: {
  987. type: 'page'
  988. },
  989. animation: {
  990. type: 'fade'
  991. },
  992. rect: {
  993. x: 0,
  994. y: headerH,
  995. w: 'auto',
  996. h: 'auto'
  997. },
  998. pageParam: api.pageParam || {}
  999. });
  1000. };
  1001. /**
  1002. *打开弹出框
  1003. *
  1004. **/
  1005. e.openPopup = function (w, h, name, pageParam) {
  1006. api.openFrame({
  1007. name: name,
  1008. url: name + '.html',
  1009. bgColor: 'rgba(0,0,0,.6)',
  1010. bounces: false,
  1011. rect: {
  1012. x: 0,
  1013. y: 0,
  1014. w: w,
  1015. h: h
  1016. },
  1017. animation: {
  1018. type: 'fade'
  1019. },
  1020. pageParam: pageParam
  1021. });
  1022. }
  1023. /**
  1024. * Win
  1025. *
  1026. */
  1027. e.openWin = function (winName, winUrl, pageParam, otherParam) {
  1028. var param = {
  1029. name: winName,
  1030. url: winUrl + '.html',
  1031. scrollEnabled: false,
  1032. hScrollBarEnabled: false,
  1033. pageParam: pageParam,
  1034. animation: {
  1035. type: 'fade',
  1036. duration: 450
  1037. }
  1038. }
  1039. Object.assign(param, otherParam || {});
  1040. api.openWin(param)
  1041. }
  1042. /**
  1043. ** openTabLayout
  1044. **/
  1045. e.openTabLayout = function (name, url, title, value) {
  1046. var param = {
  1047. name: name,
  1048. url: url + '.html',
  1049. bgColor: 'rgba(0,159,232,1)',
  1050. title: title,
  1051. bounces: false,
  1052. navigationBar: {
  1053. height: '51',
  1054. background: '#009fe8',
  1055. color: '#fff',
  1056. shadow: 'transparent'
  1057. },
  1058. pageParam: value
  1059. }
  1060. api.openTabLayout(param);
  1061. }
  1062. e.openTabLayoutTransition = function (name, url, title, value) {
  1063. var param = {
  1064. name: name,
  1065. url: url + '.html',
  1066. bgColor: 'rgba(0,159,232,1)',
  1067. title: title,
  1068. bounces: false,
  1069. navigationBar: {
  1070. height: '51',
  1071. background: '#009fe8',
  1072. color: '#fff',
  1073. shadow: 'transparent'
  1074. },
  1075. animation: {
  1076. type: 'fade',
  1077. duration: 450
  1078. },
  1079. pageParam: value
  1080. }
  1081. api.openTabLayout(param);
  1082. }
  1083. /**
  1084. ** 提示框无网络
  1085. **/
  1086. e.tips = function (el, text) {
  1087. var str = `<div id="tips">
  1088. <p>
  1089. <i></i>
  1090. ${text}
  1091. </p>
  1092. </div>`;
  1093. $api.append($api.dom(el), str);
  1094. }
  1095. e.removeTips = function (el) {
  1096. $api.remove($api.byId(el));
  1097. }
  1098. /***
  1099. 没有内容提示页面
  1100. el = body
  1101. Image显示图片路径
  1102. ***/
  1103. e.NotContent = function (el, elID, Image) {
  1104. var html = `<div class="noText" id="${elID}">
  1105. <img src="${Image}" alt="">
  1106. </div>`;
  1107. $api.append($api.dom(el), html);
  1108. }
  1109. /**
  1110. *删除NotContent
  1111. **/
  1112. e.deletNotContent = function (elID) {
  1113. $api.remove($api.byId(elID));
  1114. }
  1115. /**
  1116. * 计算canvas 锚点 w,h,x,y
  1117. * Y轴,H度,W度都可用
  1118. *
  1119. **/
  1120. e.yhW = function (yhW) {
  1121. return (yhW / (667 * 2)) * (document.body.clientHeight * 2)
  1122. }
  1123. window.$event = e;
  1124. }(window));
  1125. /**
  1126. * 工具类
  1127. * */
  1128. (function (window) {
  1129. var d = {};
  1130. /**
  1131. * append
  1132. * doT模版的封装
  1133. * root DOM名称如ID 或class
  1134. * doT template 名称
  1135. * data ajax返回数据
  1136. */
  1137. d.append = function (root, template, data) {
  1138. var evalText = doT.compile($api.html($api.dom(template)))
  1139. if (typeof root == 'string') {
  1140. $api.append($api.dom(root), evalText(data))
  1141. } else {
  1142. $api.append(root, evalText(data))
  1143. }
  1144. };
  1145. /**
  1146. * html
  1147. * doT模版的封装
  1148. * root DOM名称如ID 或class
  1149. * doT template 名称
  1150. * data ajax返回数据
  1151. */
  1152. d.html = function (root, template, data) {
  1153. var evalText = doT.compile($api.html($api.dom(template)))
  1154. if (typeof root == 'string') {
  1155. $api.html($api.dom(root), evalText(data))
  1156. } else {
  1157. $api.html(root, evalText(data))
  1158. }
  1159. };
  1160. /**
  1161. * after
  1162. * doT模版的封装
  1163. * root DOM名称如ID 或class
  1164. * doT template 名称
  1165. * data ajax返回数据
  1166. */
  1167. d.after = function (root, template, data) {
  1168. var evalText = doT.compile($api.html($api.dom(template)))
  1169. if (typeof root == 'string') {
  1170. $api.after($api.dom(root), evalText(data))
  1171. } else {
  1172. $api.after(root, evalText(data))
  1173. }
  1174. };
  1175. /**
  1176. ** 缓存路径 cache:协议对应的真实目录
  1177. **/
  1178. d.CACHE_DIR = function (url) {
  1179. return api.cacheDir + '/' + url + '/' + api.frameName + '.json';
  1180. }
  1181. /**
  1182. ** 缓存路径 box://协议对应的真实目录
  1183. **/
  1184. d.BOX_DIR = function () {
  1185. return api.cacheDir + '/' + url + '/' + api.frameName + '.json';
  1186. }
  1187. /**
  1188. **把数据也入文件做数据缓存处理
  1189. **/
  1190. d.writeFile = function (url, data) {
  1191. api.writeFile({
  1192. path: url,
  1193. data: JSON.stringify(data)
  1194. })
  1195. };
  1196. /**
  1197. **读取文件中缓存的数据
  1198. **/
  1199. d.readFile = function (url, callback) {
  1200. api.readFile({
  1201. path: url
  1202. }, function (ret, err) {
  1203. callback(ret, err)
  1204. });
  1205. };
  1206. /**轮播**/
  1207. d.swiper = function (el, loops, type) {
  1208. mySwiper = new Swiper(el, {
  1209. pagination: {
  1210. el: '.swiper-pagination',
  1211. type: type,
  1212. },
  1213. loop: false,
  1214. observer: true,
  1215. observeSlideChildren: true,
  1216. speed: 600,
  1217. autoplay: {
  1218. delay: 3000,
  1219. disableOnInteraction: false,
  1220. },
  1221. on: {
  1222. slideChangeTransitionEnd: function (e) {
  1223. api.setFrameAttr({ bounces: true })
  1224. },
  1225. sliderMove: function (event) {
  1226. api.setFrameAttr({ bounces: false })
  1227. },
  1228. touchEnd: function (event) {
  1229. api.setFrameAttr({ bounces: true })
  1230. }
  1231. },
  1232. });
  1233. }
  1234. /**
  1235. ** Loading
  1236. ** frameName frame名字
  1237. ** mask 遮罩层 样式
  1238. **/
  1239. d.UILoading = function (frameName, mask) {
  1240. var UILoading = api.require('UILoading');
  1241. UILoading.flower({
  1242. center: {
  1243. x: api.winWidth / 2.0,
  1244. y: api.winHeight / 2.0
  1245. },
  1246. size: 30,
  1247. fixed: true,
  1248. mask: mask == "" ? 'rgba(255,255,255,0' : mask,
  1249. fixedOn: frameName
  1250. }, function (ret) {
  1251. loadingId = ret.id
  1252. });
  1253. };
  1254. /**
  1255. ** Loading
  1256. ** 关闭Loading
  1257. **
  1258. **/
  1259. d.CloseUILoading = function () {
  1260. var uiloading = api.require('UILoading');
  1261. uiloading.closeFlower({
  1262. id: loadingId
  1263. });
  1264. };
  1265. window.$apis = d
  1266. }(window));
  1267. /**
  1268. * 面板
  1269. *
  1270. */
  1271. (function (window, undefined) {
  1272. "use strict";
  1273. var auiCollapse = function (params) {
  1274. this.init(params);
  1275. };
  1276. auiCollapse.prototype = {
  1277. init: function (params, callback) {
  1278. var collapseHeader = document.querySelectorAll(".aui-collapse-header");
  1279. if (collapseHeader.length) {
  1280. for (var i = 0; i < collapseHeader.length; i++) {
  1281. (function (e) {
  1282. collapseHeader[e].onclick = function () {
  1283. if (collapseHeader[e].nextSibling.nextElementSibling.className.indexOf("aui-collapse-content") > -1) {
  1284. if (collapseHeader[e].nextSibling.nextElementSibling.className.indexOf("aui-show") > -1) {
  1285. collapseHeader[e].nextSibling.nextElementSibling.classList.remove("aui-show");
  1286. collapseHeader[e].classList.remove("aui-active");
  1287. } else {
  1288. if (params.autoHide) {
  1289. if (document.querySelector(".aui-collapse-header.aui-active")) {
  1290. document.querySelector(".aui-collapse-header.aui-active").classList.remove("aui-active");
  1291. }
  1292. if (document.querySelector(".aui-collapse-content.aui-show")) {
  1293. document.querySelector(".aui-collapse-content.aui-show").classList.remove("aui-show");
  1294. }
  1295. }
  1296. collapseHeader[e].nextSibling.nextElementSibling.classList.toggle("aui-show");
  1297. collapseHeader[e].classList.toggle("aui-active");
  1298. }
  1299. }
  1300. }
  1301. })(i)
  1302. }
  1303. }
  1304. }
  1305. };
  1306. window.auiCollapse = auiCollapse;
  1307. })(window);
  1308. /**
  1309. *获取当前时间年月日
  1310. *
  1311. **/
  1312. function getYearMonthDate() {
  1313. var now = new Date();
  1314. var year = now.getFullYear(); //获取年份
  1315. var month = now.getMonth(); //获取月份
  1316. var date = now.getDate(); //获取日期
  1317. var hour = now.getHours(); //获取小时
  1318. var minute = now.getMinutes(); //获取分钟
  1319. month = month + 1;
  1320. month = month < 10 ? '0' + month : month
  1321. date = date < 10 ? '0' + date : date
  1322. var time = year + "-" + month + "-" + date
  1323. return time;
  1324. }
  1325. /**
  1326. *获取当前时间YYYY-MM-dd hh:mm
  1327. *
  1328. **/
  1329. function getYearMonthDateTime() {
  1330. var now = new Date();
  1331. var year = now.getFullYear(); //获取年份
  1332. var month = now.getMonth(); //获取月份
  1333. var date = now.getDate(); //获取日期
  1334. var hour = now.getHours(); //获取小时
  1335. var minute = now.getMinutes(); //获取分钟
  1336. month = month + 1;
  1337. month = month < 10 ? '0' + month : month
  1338. date = date < 10 ? '0' + date : date
  1339. hour = hour < 10 ? '0' + hour : hour
  1340. minute = minute < 10 ? '0' + minute : minute
  1341. var time = year + "-" + month + "-" + date + " " + hour + ":" + minute
  1342. return time;
  1343. }
  1344. /**
  1345. *获取当前时间
  1346. *
  1347. **/
  1348. function getNowFormatDate() {
  1349. var now = new Date();
  1350. var year = now.getFullYear(); //获取年份
  1351. var month = now.getMonth(); //获取月份
  1352. var date = now.getDate(); //获取日期
  1353. var day = now.getDay(); //获取星期
  1354. var hour = now.getHours(); //获取小时
  1355. var minute = now.getMinutes(); //获取分钟
  1356. var seconds = now.getSeconds() < 10 ? '0' + now.getSeconds() : now.getSeconds(); //获取秒
  1357. month = month + 1;
  1358. var arr_week = new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六");
  1359. var week = arr_week[day];
  1360. var time = year + "年" + month + "月" + date + "日 " + week + " " + hour + ":" + minute + ":" + seconds;
  1361. return time;
  1362. }
  1363. // 把时间戳转为日期或者时间
  1364. function formatDateTime(inputTime) {
  1365. let date = new Date(inputTime);
  1366. let y = date.getFullYear();
  1367. let m = date.getMonth() + 1;
  1368. m = m < 10 ? ('0' + m) : m;
  1369. let d = date.getDate();
  1370. d = d < 10 ? ('0' + d) : d;
  1371. let h = date.getHours();
  1372. h = h < 10 ? ('0' + h) : h;
  1373. let minute = date.getMinutes();
  1374. let second = date.getSeconds();
  1375. minute = minute < 10 ? ('0' + minute) : minute;
  1376. second = second < 10 ? ('0' + second) : second;
  1377. return y + '-' + m + '-' + d;
  1378. }
  1379. // 计算时间天数差
  1380. function datedifference(sDate2) {
  1381. var date = new Date();
  1382. var year = date.getFullYear() - 1
  1383. var month = date.getMonth() + 1
  1384. var d = date.getDate()
  1385. var dateSpan,
  1386. tempDate,
  1387. iDays;
  1388. sDate1 = Date.parse(year + "-" + month + "-" + d);
  1389. dateSpan = sDate2 - sDate1;
  1390. dateSpan = Math.abs(dateSpan);
  1391. iDays = Math.floor(dateSpan / (24 * 3600 * 1000));
  1392. return iDays
  1393. };
  1394. /**
  1395. *消除300ms延迟
  1396. ***/
  1397. !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 }();
  1398. /**
  1399. * fastclick 消除点击时间
  1400. */
  1401. if ('addEventListener' in document) {
  1402. document.addEventListener('DOMContentLoaded', function () {
  1403. FastClick.attach(document.body);
  1404. }, false)
  1405. };
  1406. // 数组删除元素
  1407. Array.prototype.remove = function (val) {
  1408. var index = this.indexOf(val);
  1409. if (index > -1) {
  1410. this.splice(index, 1);
  1411. }
  1412. };