Commit 4bfa0ce4 authored by 邓晓峰's avatar 邓晓峰

fix: api request bug

parent 6aa8abe3
[{"/FE/project/panda_maintenance/src/api/apiConfig.js":"1","/FE/project/panda_maintenance/src/api/baseService.js":"2","/FE/project/panda_maintenance/src/api/index.js":"3","/FE/project/panda_maintenance/src/api/jsonp/autoService.js":"4","/FE/project/panda_maintenance/src/api/jsonp/jsonpConfig.js":"5","/FE/project/panda_maintenance/src/api/notificationService.js":"6","/FE/project/panda_maintenance/src/app.js":"7","/FE/project/panda_maintenance/src/components/Authorized/Authorized.js":"8","/FE/project/panda_maintenance/src/components/Authorized/AuthorizedRoute.js":"9","/FE/project/panda_maintenance/src/components/Authorized/CheckPermissions.js":"10","/FE/project/panda_maintenance/src/components/Authorized/index.js":"11","/FE/project/panda_maintenance/src/components/Authorized/PromiseRender.js":"12","/FE/project/panda_maintenance/src/components/Authorized/renderAuthorize.js":"13","/FE/project/panda_maintenance/src/components/Authorized/Secured.js":"14","/FE/project/panda_maintenance/src/components/CitySelector/city-data.js":"15","/FE/project/panda_maintenance/src/components/CitySelector/index.js":"16","/FE/project/panda_maintenance/src/components/Container/HandlerMap.js":"17","/FE/project/panda_maintenance/src/components/Container/index.js":"18","/FE/project/panda_maintenance/src/components/GlobalHeader/AvatarDropdown.js":"19","/FE/project/panda_maintenance/src/components/GlobalHeader/NoticeIconView.js":"20","/FE/project/panda_maintenance/src/components/GlobalHeader/RightContent.js":"21","/FE/project/panda_maintenance/src/components/HeaderDropdown/index.js":"22","/FE/project/panda_maintenance/src/components/HeaderSearch/index.js":"23","/FE/project/panda_maintenance/src/components/HeaderSearch/panel.js":"24","/FE/project/panda_maintenance/src/components/modal/draggable.js":"25","/FE/project/panda_maintenance/src/components/modal/index.js":"26","/FE/project/panda_maintenance/src/components/modal/resize.js":"27","/FE/project/panda_maintenance/src/components/NotFound/index.js":"28","/FE/project/panda_maintenance/src/components/NoticeIcon/index.js":"29","/FE/project/panda_maintenance/src/components/NoticeIcon/NoticeList.js":"30","/FE/project/panda_maintenance/src/components/NoticeIcon/Templates/Alarm/index.js":"31","/FE/project/panda_maintenance/src/components/NoticeIcon/Templates/Case/index.js":"32","/FE/project/panda_maintenance/src/components/NoticeIcon/Templates/Notice/index.js":"33","/FE/project/panda_maintenance/src/components/NoticeIcon/Templates/Unknown/index.js":"34","/FE/project/panda_maintenance/src/components/Notifier/constants.js":"35","/FE/project/panda_maintenance/src/components/Notifier/index.js":"36","/FE/project/panda_maintenance/src/components/Notifier/message.js":"37","/FE/project/panda_maintenance/src/components/PageLoading/index.js":"38","/FE/project/panda_maintenance/src/components/SliderPanel/Categories.js":"39","/FE/project/panda_maintenance/src/components/SliderPanel/index.js":"40","/FE/project/panda_maintenance/src/components/SliderPanel/Menu.js":"41","/FE/project/panda_maintenance/src/components/SliderPanel/Panel.js":"42","/FE/project/panda_maintenance/src/components/SliderPanel/utils/event.js":"43","/FE/project/panda_maintenance/src/components/SliderPanel/utils/index.js":"44","/FE/project/panda_maintenance/src/components/SlideVerify/index.js":"45","/FE/project/panda_maintenance/src/components/TabRoute/index.js":"46","/FE/project/panda_maintenance/src/configureStore.js":"47","/FE/project/panda_maintenance/src/containers/App/index.js":"48","/FE/project/panda_maintenance/src/containers/App/store/actions.js":"49","/FE/project/panda_maintenance/src/containers/App/store/constants.js":"50","/FE/project/panda_maintenance/src/containers/App/store/index.js":"51","/FE/project/panda_maintenance/src/containers/App/store/reducer.js":"52","/FE/project/panda_maintenance/src/layouts/BasicLayout.js":"53","/FE/project/panda_maintenance/src/layouts/BlankLayout.js":"54","/FE/project/panda_maintenance/src/layouts/SecurityLayout.js":"55","/FE/project/panda_maintenance/src/layouts/Site.js":"56","/FE/project/panda_maintenance/src/layouts/UserLayout.js":"57","/FE/project/panda_maintenance/src/micro.js":"58","/FE/project/panda_maintenance/src/pages/bootpage/index.js":"59","/FE/project/panda_maintenance/src/pages/exception/403.js":"60","/FE/project/panda_maintenance/src/pages/exception/404.js":"61","/FE/project/panda_maintenance/src/pages/exception/500.js":"62","/FE/project/panda_maintenance/src/pages/user/login/components/Login/index.js":"63","/FE/project/panda_maintenance/src/pages/user/login/components/Login/LoginContext.js":"64","/FE/project/panda_maintenance/src/pages/user/login/components/Login/LoginItem.js":"65","/FE/project/panda_maintenance/src/pages/user/login/components/Login/LoginSubmit.js":"66","/FE/project/panda_maintenance/src/pages/user/login/components/Login/map.js":"67","/FE/project/panda_maintenance/src/pages/user/login/components/WxLogin/index.js":"68","/FE/project/panda_maintenance/src/pages/user/login/index.js":"69","/FE/project/panda_maintenance/src/pages/user/login/login.js":"70","/FE/project/panda_maintenance/src/pages/user/login/template/dist/iot.dev.js":"71","/FE/project/panda_maintenance/src/pages/user/login/template/iot.js":"72","/FE/project/panda_maintenance/src/reducers.js":"73","/FE/project/panda_maintenance/src/routes/config.js":"74","/FE/project/panda_maintenance/src/service-worker.js":"75","/FE/project/panda_maintenance/src/utils/authority.js":"76","/FE/project/panda_maintenance/src/utils/Authorized.js":"77","/FE/project/panda_maintenance/src/utils/checkStore.js":"78","/FE/project/panda_maintenance/src/utils/constants.js":"79","/FE/project/panda_maintenance/src/utils/env.js":"80","/FE/project/panda_maintenance/src/utils/history.js":"81","/FE/project/panda_maintenance/src/utils/injectReducer.js":"82","/FE/project/panda_maintenance/src/utils/injectSaga.js":"83","/FE/project/panda_maintenance/src/utils/loadable.js":"84","/FE/project/panda_maintenance/src/utils/reducerInjectors.js":"85","/FE/project/panda_maintenance/src/utils/request/defaultConfig.js":"86","/FE/project/panda_maintenance/src/utils/request/index.js":"87","/FE/project/panda_maintenance/src/utils/routes.js":"88","/FE/project/panda_maintenance/src/utils/sagaInjectors.js":"89","/FE/project/panda_maintenance/src/utils/storage.js":"90","/FE/project/panda_maintenance/src/utils/tests/checkStore.test.js":"91","/FE/project/panda_maintenance/src/utils/tests/injectReducer.test.js":"92","/FE/project/panda_maintenance/src/utils/tests/injectSaga.test.js":"93","/FE/project/panda_maintenance/src/utils/tests/reducerInjectors.test.js":"94","/FE/project/panda_maintenance/src/utils/tests/sagaInjectors.test.js":"95","/FE/project/panda_maintenance/src/utils/utils.js":"96"},{"size":4923,"mtime":1609036111768,"results":"97","hashOfConfig":"98"},{"size":3365,"mtime":1608963356195,"results":"99","hashOfConfig":"98"},{"size":198,"mtime":1608956520336,"results":"100","hashOfConfig":"98"},{"size":559,"mtime":1608956733287,"results":"101","hashOfConfig":"98"},{"size":643,"mtime":1609035428370,"results":"102","hashOfConfig":"98"},{"size":874,"mtime":1608963421603,"results":"103","hashOfConfig":"98"},{"size":4775,"mtime":1609035107684,"results":"104","hashOfConfig":"98"},{"size":707,"mtime":1608956520598,"results":"105","hashOfConfig":"98"},{"size":553,"mtime":1608956520616,"results":"106","hashOfConfig":"98"},{"size":1384,"mtime":1608956733289,"results":"107","hashOfConfig":"98"},{"size":305,"mtime":1605324119342,"results":"108","hashOfConfig":"98"},{"size":1644,"mtime":1608961131608,"results":"109","hashOfConfig":"98"},{"size":572,"mtime":1608961210670,"results":"110","hashOfConfig":"98"},{"size":1085,"mtime":1608958794620,"results":"111","hashOfConfig":"98"},{"size":93141,"mtime":1608956521020,"results":"112","hashOfConfig":"98"},{"size":13209,"mtime":1608959344617,"results":"113","hashOfConfig":"98"},{"size":1530,"mtime":1608962690588,"results":"114","hashOfConfig":"98"},{"size":607,"mtime":1608956733290,"results":"115","hashOfConfig":"98"},{"size":9223,"mtime":1609143181001,"results":"116","hashOfConfig":"98"},{"size":8370,"mtime":1608962780916,"results":"117","hashOfConfig":"98"},{"size":7925,"mtime":1609143363549,"results":"118","hashOfConfig":"98"},{"size":333,"mtime":1608956521748,"results":"119","hashOfConfig":"98"},{"size":5010,"mtime":1608962537222,"results":"120","hashOfConfig":"98"},{"size":12901,"mtime":1608962916822,"results":"121","hashOfConfig":"98"},{"size":18360,"mtime":1609142020694,"results":"122","hashOfConfig":"98"},{"size":11258,"mtime":1608963149937,"results":"123","hashOfConfig":"98"},{"size":6446,"mtime":1609142030434,"results":"124","hashOfConfig":"98"},{"size":412,"mtime":1608956733294,"results":"125","hashOfConfig":"98"},{"size":4156,"mtime":1608962480988,"results":"126","hashOfConfig":"98"},{"size":4102,"mtime":1608962952968,"results":"127","hashOfConfig":"98"},{"size":2501,"mtime":1608960247697,"results":"128","hashOfConfig":"98"},{"size":2696,"mtime":1609035573226,"results":"129","hashOfConfig":"98"},{"size":1731,"mtime":1608960344187,"results":"130","hashOfConfig":"98"},{"size":1226,"mtime":1608962571773,"results":"131","hashOfConfig":"98"},{"size":1136,"mtime":1608956522424,"results":"132","hashOfConfig":"98"},{"size":20875,"mtime":1608961335107,"results":"133","hashOfConfig":"98"},{"size":646,"mtime":1608962054137,"results":"134","hashOfConfig":"98"},{"size":83,"mtime":1608956522608,"results":"135","hashOfConfig":"98"},{"size":1318,"mtime":1608958694813,"results":"136","hashOfConfig":"98"},{"size":48,"mtime":1602722188845,"results":"137","hashOfConfig":"98"},{"size":2290,"mtime":1608958383675,"results":"138","hashOfConfig":"98"},{"size":4605,"mtime":1608958578410,"results":"139","hashOfConfig":"98"},{"size":2007,"mtime":1608956522841,"results":"140","hashOfConfig":"98"},{"size":68,"mtime":1608956522852,"results":"141","hashOfConfig":"98"},{"size":8732,"mtime":1608963109065,"results":"142","hashOfConfig":"98"},{"size":317,"mtime":1608960413103,"results":"143","hashOfConfig":"98"},{"size":1726,"mtime":1609049591325,"results":"144","hashOfConfig":"98"},{"size":1132,"mtime":1608956523065,"results":"145","hashOfConfig":"98"},{"size":2224,"mtime":1608956523083,"results":"146","hashOfConfig":"98"},{"size":1020,"mtime":1608956523099,"results":"147","hashOfConfig":"98"},{"size":168,"mtime":1602835992876,"results":"148","hashOfConfig":"98"},{"size":5006,"mtime":1608965590895,"results":"149","hashOfConfig":"98"},{"size":24684,"mtime":1609123817060,"results":"150","hashOfConfig":"98"},{"size":102,"mtime":1597502525444,"results":"151","hashOfConfig":"98"},{"size":1185,"mtime":1608956733306,"results":"152","hashOfConfig":"98"},{"size":19228,"mtime":1608958173523,"results":"153","hashOfConfig":"98"},{"size":1764,"mtime":1608956733307,"results":"154","hashOfConfig":"98"},{"size":5143,"mtime":1609129086762,"results":"155","hashOfConfig":"98"},{"size":4357,"mtime":1609035544657,"results":"156","hashOfConfig":"98"},{"size":321,"mtime":1608956523834,"results":"157","hashOfConfig":"98"},{"size":447,"mtime":1608964921719,"results":"158","hashOfConfig":"98"},{"size":462,"mtime":1608964939722,"results":"159","hashOfConfig":"98"},{"size":1089,"mtime":1608956523901,"results":"160","hashOfConfig":"98"},{"size":110,"mtime":1597502525557,"results":"161","hashOfConfig":"98"},{"size":4006,"mtime":1609036232231,"results":"162","hashOfConfig":"98"},{"size":496,"mtime":1608956523989,"results":"163","hashOfConfig":"98"},{"size":1564,"mtime":1606215775146,"results":"164","hashOfConfig":"98"},{"size":946,"mtime":1609142058390,"results":"165","hashOfConfig":"98"},{"size":18344,"mtime":1609036538953,"results":"166","hashOfConfig":"98"},{"size":23547,"mtime":1609036389569,"results":"167","hashOfConfig":"98"},{"size":0,"mtime":1608956733310,"results":"168","hashOfConfig":"98"},{"size":0,"mtime":1606122298679,"results":"169","hashOfConfig":"98"},{"size":550,"mtime":1600658544879,"results":"170","hashOfConfig":"98"},{"size":1140,"mtime":1608964837989,"results":"171","hashOfConfig":"98"},{"size":2031,"mtime":1609049617985,"results":"172","hashOfConfig":"98"},{"size":695,"mtime":1603542686633,"results":"173","hashOfConfig":"98"},{"size":473,"mtime":1606198973068,"results":"174","hashOfConfig":"98"},{"size":471,"mtime":1597548494653,"results":"175","hashOfConfig":"98"},{"size":390,"mtime":1607328435356,"results":"176","hashOfConfig":"98"},{"size":77,"mtime":1608956524623,"results":"177","hashOfConfig":"98"},{"size":112,"mtime":1597548494655,"results":"178","hashOfConfig":"98"},{"size":1181,"mtime":1597548494656,"results":"179","hashOfConfig":"98"},{"size":1238,"mtime":1597548494659,"results":"180","hashOfConfig":"98"},{"size":308,"mtime":1597548494659,"results":"181","hashOfConfig":"98"},{"size":904,"mtime":1597548494660,"results":"182","hashOfConfig":"98"},{"size":1977,"mtime":1597548494661,"results":"183","hashOfConfig":"98"},{"size":3136,"mtime":1597548494662,"results":"184","hashOfConfig":"98"},{"size":3420,"mtime":1608965348902,"results":"185","hashOfConfig":"98"},{"size":2355,"mtime":1597548494662,"results":"186","hashOfConfig":"98"},{"size":1189,"mtime":1609036295022,"results":"187","hashOfConfig":"98"},{"size":881,"mtime":1597548494662,"results":"188","hashOfConfig":"98"},{"size":2579,"mtime":1597548494663,"results":"189","hashOfConfig":"98"},{"size":3811,"mtime":1597548494663,"results":"190","hashOfConfig":"98"},{"size":2726,"mtime":1597548494664,"results":"191","hashOfConfig":"98"},{"size":7245,"mtime":1597548494664,"results":"192","hashOfConfig":"98"},{"size":2519,"mtime":1609130533529,"results":"193","hashOfConfig":"98"},{"filePath":"194","messages":"195","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1ps2gq2",{"filePath":"196","messages":"197","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"198","messages":"199","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"200","messages":"201","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"202","messages":"203","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"204","messages":"205","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"206","messages":"207","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"208","messages":"209","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"210","messages":"211","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"212","messages":"213","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"214","messages":"215","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"216","messages":"217","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"218","messages":"219","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"220","messages":"221","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"222","messages":"223","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"224","messages":"225","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"226","messages":"227","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"228","messages":"229","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"230","messages":"231","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"232","messages":"233","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"234","messages":"235","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"236","messages":"237","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"238","messages":"239","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"240","messages":"241","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"242","messages":"243","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"244","messages":"245","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"246","messages":"247","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"248","messages":"249","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"250","messages":"251","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"252","messages":"253","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"254","messages":"255","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"256","messages":"257","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"258","messages":"259","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"260","messages":"261","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"262","messages":"263","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"264","messages":"265","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"266","messages":"267","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"268","messages":"269","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"270","messages":"271","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"272","messages":"273","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"274","messages":"275","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"276","messages":"277","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"278","messages":"279","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"280","messages":"281","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"282","messages":"283","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"284","messages":"285","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"286","messages":"287","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"288","messages":"289","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"290","messages":"291","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"292","messages":"293","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"294","messages":"295","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"296","messages":"297","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"298","messages":"299","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"300","messages":"301","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"302","messages":"303","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"304","messages":"305","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"306","messages":"307","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"308","messages":"309","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"310","messages":"311","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"312","messages":"313","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"314","messages":"315","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"316","messages":"317","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"318","messages":"319","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"320","messages":"321","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"322","messages":"323","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"324","messages":"325","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"326","messages":"327","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"328","messages":"329","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"330","messages":"331","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"332","messages":"333","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"334","messages":"335","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"336","messages":"337","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"338","messages":"339","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"340","messages":"341","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"342","messages":"343","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"344","messages":"345","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"346","messages":"347","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"348","messages":"349","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"350","messages":"351","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"352","messages":"353","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"354","messages":"355","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"356","messages":"357","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"358","messages":"359","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"360","messages":"361","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"362","messages":"363","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"364","messages":"365","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"366","messages":"367","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"368","messages":"369","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"370","messages":"371","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"372","messages":"373","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"374","messages":"375","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"376","messages":"377","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"378","messages":"379","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"380","messages":"381","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"382","messages":"383","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"384","messages":"385","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/FE/project/panda_maintenance/src/api/apiConfig.js",[],"/FE/project/panda_maintenance/src/api/baseService.js",[],"/FE/project/panda_maintenance/src/api/index.js",[],"/FE/project/panda_maintenance/src/api/jsonp/autoService.js",[],"/FE/project/panda_maintenance/src/api/jsonp/jsonpConfig.js",[],"/FE/project/panda_maintenance/src/api/notificationService.js",[],"/FE/project/panda_maintenance/src/app.js",[],"/FE/project/panda_maintenance/src/components/Authorized/Authorized.js",[],"/FE/project/panda_maintenance/src/components/Authorized/AuthorizedRoute.js",[],"/FE/project/panda_maintenance/src/components/Authorized/CheckPermissions.js",[],"/FE/project/panda_maintenance/src/components/Authorized/index.js",[],"/FE/project/panda_maintenance/src/components/Authorized/PromiseRender.js",[],"/FE/project/panda_maintenance/src/components/Authorized/renderAuthorize.js",[],"/FE/project/panda_maintenance/src/components/Authorized/Secured.js",[],"/FE/project/panda_maintenance/src/components/CitySelector/city-data.js",[],"/FE/project/panda_maintenance/src/components/CitySelector/index.js",[],"/FE/project/panda_maintenance/src/components/Container/HandlerMap.js",[],"/FE/project/panda_maintenance/src/components/Container/index.js",[],"/FE/project/panda_maintenance/src/components/GlobalHeader/AvatarDropdown.js",[],"/FE/project/panda_maintenance/src/components/GlobalHeader/NoticeIconView.js",[],"/FE/project/panda_maintenance/src/components/GlobalHeader/RightContent.js",[],"/FE/project/panda_maintenance/src/components/HeaderDropdown/index.js",[],"/FE/project/panda_maintenance/src/components/HeaderSearch/index.js",[],"/FE/project/panda_maintenance/src/components/HeaderSearch/panel.js",[],"/FE/project/panda_maintenance/src/components/modal/draggable.js",[],"/FE/project/panda_maintenance/src/components/modal/index.js",[],"/FE/project/panda_maintenance/src/components/modal/resize.js",[],"/FE/project/panda_maintenance/src/components/NotFound/index.js",[],"/FE/project/panda_maintenance/src/components/NoticeIcon/index.js",[],"/FE/project/panda_maintenance/src/components/NoticeIcon/NoticeList.js",[],"/FE/project/panda_maintenance/src/components/NoticeIcon/Templates/Alarm/index.js",[],"/FE/project/panda_maintenance/src/components/NoticeIcon/Templates/Case/index.js",[],"/FE/project/panda_maintenance/src/components/NoticeIcon/Templates/Notice/index.js",[],"/FE/project/panda_maintenance/src/components/NoticeIcon/Templates/Unknown/index.js",[],"/FE/project/panda_maintenance/src/components/Notifier/constants.js",[],"/FE/project/panda_maintenance/src/components/Notifier/index.js",[],"/FE/project/panda_maintenance/src/components/Notifier/message.js",[],"/FE/project/panda_maintenance/src/components/PageLoading/index.js",[],"/FE/project/panda_maintenance/src/components/SliderPanel/Categories.js",[],"/FE/project/panda_maintenance/src/components/SliderPanel/index.js",[],"/FE/project/panda_maintenance/src/components/SliderPanel/Menu.js",[],"/FE/project/panda_maintenance/src/components/SliderPanel/Panel.js",[],"/FE/project/panda_maintenance/src/components/SliderPanel/utils/event.js",[],"/FE/project/panda_maintenance/src/components/SliderPanel/utils/index.js",[],"/FE/project/panda_maintenance/src/components/SlideVerify/index.js",[],"/FE/project/panda_maintenance/src/components/TabRoute/index.js",[],"/FE/project/panda_maintenance/src/configureStore.js",[],"/FE/project/panda_maintenance/src/containers/App/index.js",[],"/FE/project/panda_maintenance/src/containers/App/store/actions.js",[],"/FE/project/panda_maintenance/src/containers/App/store/constants.js",[],"/FE/project/panda_maintenance/src/containers/App/store/index.js",[],"/FE/project/panda_maintenance/src/containers/App/store/reducer.js",[],"/FE/project/panda_maintenance/src/layouts/BasicLayout.js",[],"/FE/project/panda_maintenance/src/layouts/BlankLayout.js",[],"/FE/project/panda_maintenance/src/layouts/SecurityLayout.js",[],"/FE/project/panda_maintenance/src/layouts/Site.js",[],"/FE/project/panda_maintenance/src/layouts/UserLayout.js",[],"/FE/project/panda_maintenance/src/micro.js",[],"/FE/project/panda_maintenance/src/pages/bootpage/index.js",[],"/FE/project/panda_maintenance/src/pages/exception/403.js",[],"/FE/project/panda_maintenance/src/pages/exception/404.js",[],"/FE/project/panda_maintenance/src/pages/exception/500.js",[],"/FE/project/panda_maintenance/src/pages/user/login/components/Login/index.js",[],"/FE/project/panda_maintenance/src/pages/user/login/components/Login/LoginContext.js",[],"/FE/project/panda_maintenance/src/pages/user/login/components/Login/LoginItem.js",[],"/FE/project/panda_maintenance/src/pages/user/login/components/Login/LoginSubmit.js",[],"/FE/project/panda_maintenance/src/pages/user/login/components/Login/map.js",[],"/FE/project/panda_maintenance/src/pages/user/login/components/WxLogin/index.js",[],"/FE/project/panda_maintenance/src/pages/user/login/index.js",["386"],"/FE/project/panda_maintenance/src/pages/user/login/login.js",[],"/FE/project/panda_maintenance/src/pages/user/login/template/dist/iot.dev.js",[],"/FE/project/panda_maintenance/src/pages/user/login/template/iot.js",[],"/FE/project/panda_maintenance/src/reducers.js",[],"/FE/project/panda_maintenance/src/routes/config.js",[],"/FE/project/panda_maintenance/src/service-worker.js",[],"/FE/project/panda_maintenance/src/utils/authority.js",[],"/FE/project/panda_maintenance/src/utils/Authorized.js",[],"/FE/project/panda_maintenance/src/utils/checkStore.js",[],"/FE/project/panda_maintenance/src/utils/constants.js",[],"/FE/project/panda_maintenance/src/utils/env.js",[],"/FE/project/panda_maintenance/src/utils/history.js",[],"/FE/project/panda_maintenance/src/utils/injectReducer.js",[],"/FE/project/panda_maintenance/src/utils/injectSaga.js",[],"/FE/project/panda_maintenance/src/utils/loadable.js",[],"/FE/project/panda_maintenance/src/utils/reducerInjectors.js",[],"/FE/project/panda_maintenance/src/utils/request/defaultConfig.js",[],"/FE/project/panda_maintenance/src/utils/request/index.js",[],"/FE/project/panda_maintenance/src/utils/routes.js",[],"/FE/project/panda_maintenance/src/utils/sagaInjectors.js",[],"/FE/project/panda_maintenance/src/utils/storage.js",[],"/FE/project/panda_maintenance/src/utils/tests/checkStore.test.js",[],"/FE/project/panda_maintenance/src/utils/tests/injectReducer.test.js",[],"/FE/project/panda_maintenance/src/utils/tests/injectSaga.test.js",[],"/FE/project/panda_maintenance/src/utils/tests/reducerInjectors.test.js",[],"/FE/project/panda_maintenance/src/utils/tests/sagaInjectors.test.js",[],"/FE/project/panda_maintenance/src/utils/utils.js",[],{"ruleId":"387","severity":1,"message":"388","line":188,"column":20,"nodeType":"389","endLine":188,"endColumn":25},"react/no-array-index-key","Do not use Array index in keys","Identifier"]
\ No newline at end of file
......@@ -2,10 +2,10 @@ module.exports = {
dev: {
'/CityInterface': {
// target: 'http://192.168.10.151:8055',
// target: 'https://panda-water.cn',
target: 'https://panda-water.cn',
// target: 'http://192.168.19.102:8055',
target: 'https://panda-water.com',
// target: 'https://panda-water.com',
// target: 'http://192.168.10.150:8050',
// target: 'http://192.168.19.103:8112',
// target: 'http://192.168.12.8:8098',
......@@ -21,9 +21,9 @@ module.exports = {
'/cityinterface': {
// target: 'http://192.168.10.151:8055',
// target: 'http://192.168.10.150:8050',
// target: 'https://panda-water.cn',
target: 'https://panda-water.cn',
// target: 'http://192.168.19.102:8055',
target: 'https://panda-water.com',
// target: 'https://panda-water.com',
// target: 'http://192.168.12.8:8098',
// target: 'http://192.168.10.20:8888',
changeOrigin: true,
......@@ -38,9 +38,9 @@ module.exports = {
// target: 'http://192.168.12.8:8098',
// target: 'http://192.168.10.20:8888',
// target: 'http://192.168.10.151:8055',
// target: 'https://panda-water.cn',
target: 'https://panda-water.cn',
// target: 'http://192.168.19.102:8055',
target: 'https://panda-water.com',
// target: 'https://panda-water.com',
// target: 'http://192.168.10.150:8050',
changeOrigin: true,
headers: {
......
......@@ -7150,6 +7150,62 @@
"@xtuc/long": "4.2.2"
}
},
"@wisdom-utils/components": {
"version": "0.0.4",
"resolved": "https://g.civnet.cn:4873/@wisdom-utils%2fcomponents/-/components-0.0.4.tgz",
"integrity": "sha512-+G/0eSHsney5VePzjAPmXcW8xKclUnac+h+Xi7xxXAfHGYn8ruYj4a3eT9XcnvqDSHvEHSIRH23a8weTdIDjzw=="
},
"@wisdom-utils/utils": {
"version": "0.0.19",
"resolved": "https://g.civnet.cn:4873/@wisdom-utils%2futils/-/utils-0.0.19.tgz",
"integrity": "sha512-Y8zEIaDfZ/D0M8sb0KJoikRoT/x7rUKrbxC8UZkNwmrQqm+yyALPV2GqfTXYHHYCvgQ+zpD/E3uP3leKCAJ97Q==",
"requires": {
"axios": "^0.21.1",
"cookie": "^0.4.1",
"eventemitter3": "^4.0.7",
"intersection-observer": "^0.7.0",
"jsonp": "^0.2.1",
"lodash.debounce": "^4.0.8",
"lodash.isequal": "^4.5.0",
"lodash.throttle": "^4.1.1",
"query-string": "^6.13.8"
},
"dependencies": {
"axios": {
"version": "0.21.1",
"resolved": "https://g.civnet.cn:4873/axios/-/axios-0.21.1.tgz",
"integrity": "sha1-IlY0gZYvTWvemnbVFu8OXTwJsrg=",
"requires": {
"follow-redirects": "^1.10.0"
}
},
"cookie": {
"version": "0.4.1",
"resolved": "https://g.civnet.cn:4873/cookie/-/cookie-0.4.1.tgz",
"integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA=="
},
"follow-redirects": {
"version": "1.13.1",
"resolved": "https://g.civnet.cn:4873/follow-redirects/-/follow-redirects-1.13.1.tgz",
"integrity": "sha1-X2m4Ezds7k/QR0o6uoNd8Eq3Y7c="
},
"query-string": {
"version": "6.13.8",
"resolved": "https://g.civnet.cn:4873/query-string/-/query-string-6.13.8.tgz",
"integrity": "sha1-jPIxdZyFSE2jzwWoUYENjoJcEVk=",
"requires": {
"decode-uri-component": "^0.2.0",
"split-on-first": "^1.0.0",
"strict-uri-encode": "^2.0.0"
}
},
"strict-uri-encode": {
"version": "2.0.0",
"resolved": "https://g.civnet.cn:4873/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz",
"integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY="
}
}
},
"@xobotyi/scrollbar-width": {
"version": "1.9.5",
"resolved": "https://g.civnet.cn:4873/@xobotyi%2fscrollbar-width/-/scrollbar-width-1.9.5.tgz",
......@@ -11275,8 +11331,7 @@
"decode-uri-component": {
"version": "0.2.0",
"resolved": "https://g.civnet.cn:4873/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
"integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
"dev": true
"integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU="
},
"decompress-response": {
"version": "3.3.0",
......@@ -13436,8 +13491,7 @@
"eventemitter3": {
"version": "4.0.7",
"resolved": "https://g.civnet.cn:4873/eventemitter3/-/eventemitter3-4.0.7.tgz",
"integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==",
"dev": true
"integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="
},
"events": {
"version": "3.2.0",
......@@ -16492,8 +16546,7 @@
"intersection-observer": {
"version": "0.7.0",
"resolved": "https://g.civnet.cn:4873/intersection-observer/-/intersection-observer-0.7.0.tgz",
"integrity": "sha1-7ha+6XjbU1FurS8KgVSwm0ALvck=",
"dev": true
"integrity": "sha1-7ha+6XjbU1FurS8KgVSwm0ALvck="
},
"intl": {
"version": "1.2.5",
......@@ -18548,7 +18601,6 @@
"version": "0.2.1",
"resolved": "https://g.civnet.cn:4873/jsonp/-/jsonp-0.2.1.tgz",
"integrity": "sha1-pltPoPEL2nGaBUQep7lMVfPhW64=",
"dev": true,
"requires": {
"debug": "^2.1.3"
}
......@@ -18606,9 +18658,9 @@
"dev": true
},
"kit_global_config": {
"version": "1.0.10",
"resolved": "https://g.civnet.cn:4873/kit_global_config/-/kit_global_config-1.0.10.tgz",
"integrity": "sha512-o55fr6HmSmQotg3Qbv4IonQRUYcwfW/8N22ScCNAIOi3/zEB3qDMdPOj1p64yYwr7nJwtZjEBEDtA2vQ/iYM1Q==",
"version": "1.0.12",
"resolved": "https://g.civnet.cn:4873/kit_global_config/-/kit_global_config-1.0.12.tgz",
"integrity": "sha512-gFp7NhmlLsNE2V8QC7b1NKVUeWmPSDH8EUlbfEH5/9Y6Zzydsyy2bJEdbXmHf3N8/6Yb7W0IpdOZqdtB7KEf6A==",
"requires": {
"@babel/runtime": "^7.10.5",
"js-base64": "^3.5.2",
......@@ -19375,8 +19427,7 @@
"lodash.debounce": {
"version": "4.0.8",
"resolved": "https://g.civnet.cn:4873/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
"integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=",
"dev": true
"integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168="
},
"lodash.defaultsdeep": {
"version": "4.6.1",
......@@ -19393,8 +19444,7 @@
"lodash.isequal": {
"version": "4.5.0",
"resolved": "https://g.civnet.cn:4873/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
"integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=",
"dev": true
"integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA="
},
"lodash.ismatch": {
"version": "4.4.0",
......@@ -19448,8 +19498,7 @@
"lodash.throttle": {
"version": "4.1.1",
"resolved": "https://g.civnet.cn:4873/lodash.throttle/-/lodash.throttle-4.1.1.tgz",
"integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ=",
"dev": true
"integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ="
},
"lodash.toarray": {
"version": "4.4.0",
......@@ -27499,8 +27548,7 @@
"split-on-first": {
"version": "1.1.0",
"resolved": "https://g.civnet.cn:4873/split-on-first/-/split-on-first-1.1.0.tgz",
"integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==",
"dev": true
"integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw=="
},
"split-string": {
"version": "3.1.0",
......@@ -84,6 +84,8 @@
"dependencies": {
"@babel/polyfill": "7.4.3",
"@babel/runtime": "^7.10.5",
"@wisdom-utils/components": "0.0.4",
"@wisdom-utils/utils": "0.0.19",
"animate.css": "^4.1.1",
"chalk": "2.4.2",
"compression": "1.7.4",
......@@ -99,7 +101,7 @@
"ip": "1.1.5",
"js-base64": "^3.5.2",
"js-cookie": "^2.2.1",
"kit_global_config": "^1.0.10",
"kit_global_config": "^1.0.12",
"kit_logger": "^1.0.2",
"kit_utils": "^1.3.6",
"lodash": "4.17.11",
......
import axios from 'axios';
import uuid from 'uuid';
import 'kit_logger';
const baseURL =
process.env.NODE_ENV === 'development'
? window.location.origin
: window.location.origin;
axios.defaults.withCredentials = true;
// eslint-disable-next-line no-undef
const Logger = logger('Http');
const pending = []; // 声明一个数组用于存储每个ajax请求的取消函数和ajax标识
const cancelToken = axios.CancelToken;
class HttpRequest {
constructor(props) {
this.requestApi = axios.create({
baseURL,
timeout: 30000,
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
});
this.requestApi.interceptors.request.use(
config => {
// if(config.params&&config.params.cancelAllRequest){
// removeAllPending()
// }
config.url = this.transformURL(config.url)
// ------------------------------------------------------------------------------------
if (!config.ignoreSite && this.getSite(config)) {
config.headers['civ-site'] = this.getSite(config);
// config.headers['civ-site'] = "192_168_19_105_site_c8de50fc";
}
this.removePending(config); // 在一个ajax发送前执行一下取消操作
// eslint-disable-next-line new-cap
config.cancelToken = new cancelToken(c => {
const uid = uuid.v1();
config.uuid = uid;
pending.push({ uuid: uid, f: c });
});
// -----------------------------------------------------------------------------------------
return config;
},
function(error) {
Logger.log('request error', error);
return Promise.reject(error);
},
);
this.requestApi.interceptors.response.use(
response => {
// ------------------------------------------------------------------------------------------
this.removePending(response.config); // 在一个ajax响应后再执行一下取消操作,把已经完成的请求从pending中移除
// ------------------------------------------------------------------------------------------
if (response.status === 200) {
return response.data;
}
return response;
},
function(error) {
if (error && error.response) {
switch (error.response.status) {
case 400:
error.message = '错误请求';
break;
case 401:
error.message = '未授权,请重新登录';
break;
case 403:
error.message = '拒绝访问';
break;
case 404:
error.message = '请求错误,未找到该资源';
break;
case 405:
error.message = '请求方法未允许';
break;
case 408:
error.message = '请求超时';
break;
case 500:
error.message = '服务器端出错';
break;
case 501:
error.message = '网络未实现';
break;
case 502:
error.message = '网络错误';
break;
case 503:
error.message = '服务不可用';
break;
case 504:
error.message = '网络超时';
break;
case 505:
error.message = 'http版本不支持该请求';
break;
default:
// eslint-disable-next-line no-undef
error.message = `连接错误${err.response.status}`;
}
} else {
error.message = '连接到服务器失败';
}
return Promise.reject(error);
},
);
}
removePending(ever) {
for (const p in pending) {
if (pending[p].uuid === ever.uuid) {
// 当当前请求在数组中存在时执行函数体
pending[p].f(); // 执行取消操作
pending.splice(p, 1); // 把这条记录从数组中移除
}
}
}
removeAllPending() {
// eslint-disable-next-line guard-for-in
for (const p in pending) {
pending[p].f(); // 执行取消操作
pending.splice(p, 1); // 把这条记录从数组中移除
}
}
getSite(config) {
return window.globalConfig &&
window.globalConfig.userInfo &&
window.globalConfig.userInfo.site &&
!config.ignoreSite
? window.globalConfig.userInfo.site
: '';
}
transformURL(url) {
if (window.globalConfig && window.globalConfig.hasGateWay) {
let u = url.replace(
/CityInterface\/rest|cityinterface\/rest/,
'CityInterface',
);
u = /^\//.test(u) ? u : `/${u}`;
return `Publish/GateWay${u}`;
}
return url;
}
get(url, params, config = {}) {
return this.requestApi.get(url, { ...config, params });
}
post(url, data, config = {}) {
return this.requestApi.post(url, { ...data, ...config });
}
delete(url, params, config = {}) {
return this.requestApi.delete(url, { ...config, params });
}
put(url, params, config = {}) {
return this.requestApi.delete(url, params, config);
}
}
const http = new HttpRequest();
export default http;
const REQUEST_HTTP = 'http';
const REQUEST_POP = 'pop';
const REQUEST_METHOD_GET = 'get';
const REQUEST_METHOD_POST = 'post';
const REQUEST_METHOD_PUT = 'put';
const REQUEST_METHOD_DELETE = 'delete';
export default {
REQUEST_HTTP,
REQUEST_POP,
REQUEST_METHOD_GET,
REQUEST_METHOD_POST,
REQUEST_METHOD_PUT,
REQUEST_METHOD_DELETE,
};
import http from './apiConfig';
import BaseService from './baseService';
import NotificationService from './notificationService';
BaseService(http);
NotificationService(http);
export default http;
import jsonp from './jsonpConfig';
export function searchAutoCity(keywords) {
const url = 'https://restapi.amap.com/v3/assistant/inputtips';
const options = {
callback: `jsonp_${new Date().getTime()}`,
};
const params = Object.assign(
{},
{
s: 'rsv3',
key: 'e83f64300a2a55a33fa8e4ab9a46bca6',
platform: 'JS',
logversion: '2.0',
csid: '5A098355-8164-41D5-A2DC-78E1471CCD28',
appname: window.location.href,
sdkversion: '1.4.15',
keywords,
},
);
return jsonp(url, params, options);
}
import originJsonp from 'jsonp';
export default function jsonp(url, data, option) {
url += (url.indexOf('?') < 0 ? '?' : '&') + param(data);
return new Promise((resolve, reject) => {
// eslint-disable-next-line no-shadow
originJsonp(url, option, (err, data) => {
if (!err) {
resolve(data);
} else {
reject(err);
}
});
});
}
export function param(data) {
let url = '';
// eslint-disable-next-line guard-for-in
for (const k in data) {
const value = data[k] !== undefined ? data[k] : '';
url += `&${k}=${encodeURIComponent(value)}`;
}
return url ? url.substring(1) : '';
}
import { params } from 'kit_utils';
import { service, jsonp } from '@wisdom-utils/utils';
import constants from '../constants';
export const API = {
GET_GATEWAY_CONFIG: '/Publish/OMS/GateWayConfig',
GET_CONFIG: '/CityInterface/rest/services.svc/GetConfig',
......@@ -22,68 +22,118 @@ export const API = {
'CityInterface/rest/services/OMS.svc/U_UpdatePasswordQuickGCK',
FILE_DOWNLOAD: '"/cityinterface/rest/services/filedownload.svc/download',
};
/* eslint-disable */
export default vm => {
vm.getWateWayConfig = (data = {}, config = {}) => vm.get(API.GET_GATEWAY_CONFIG, data, config).then(res => Promise.resolve(res));
vm.getConfig = (
data = { client: params.getParams('client') || 'city', ts: Date.now() },
config = {},
) => vm.get(API.GET_CONFIG, data, config).then(res => Promise.resolve(res));
const services = service({
getWateWayConfig: {
url: API.GET_GATEWAY_CONFIG,
method: constants.REQUEST_METHOD_GET,
type: constants.REQUEST_HTTP,
},
queryConfig: {
url: API.GET_CONFIG,
method: constants.REQUEST_METHOD_GET,
type: constants.REQUEST_HTTP,
},
generateToken: {
url:
(window.globalConfig && window.globalConfig.loginTemplate) ===
'Dark - IOTMultiLogin.html'
? API.GENERATE_IOT_TOKEN
: API.GENERATE_TOKEN,
method: constants.REQUEST_METHOD_GET,
type: constants.REQUEST_HTTP,
},
generatetokenByqrcode: {
url: API.GENERATE_QRCODE,
method: constants.REQUEST_METHOD_GET,
type: constants.REQUEST_HTTP,
},
vm.generateToken = (data = {}, config = {}) =>
vm
.get(
window.globalConfig.loginTemplate === 'Dark - IOTMultiLogin.html'
? API.GENERATE_IOT_TOKEN
: API.GENERATE_TOKEN,
data,
config,
)
.then(res => Promise.resolve(res));
getWebSiteConfig: {
url: API.GET_WEB_SITE_CONFIG,
method: constants.REQUEST_METHOD_GET,
type: constants.REQUEST_HTTP,
},
vm.generatetokenByqrcode = (data = {}, config = {}) =>
vm.get(API.GENERATE_QRCODE, data, config).then(res => Promise.resolve(res));
vm.getWebSiteConfig = (data = {}, config = {}) =>
vm
.get(API.GET_WEB_SITE_CONFIG, data, config)
.then(res => Promise.resolve(res));
getUserInfo: {
url: API.GET_USER_INFO,
method: constants.REQUEST_METHOD_GET,
type: constants.REQUEST_HTTP,
},
vm.getUserInfo = (data = {}, config = {}) =>
vm.get(API.GET_USER_INFO, data, config).then(res => Promise.resolve(res));
getOA: {
url: API.GET_OA,
method: constants.REQUEST_METHOD_GET,
type: constants.REQUEST_HTTP,
},
vm.getOA = (data = {}) =>
vm.get(API.GET_OA, data).then(res => Promise.resolve(res));
writeLogs: {
url: API.GET_LOGS,
method: constants.REQUEST_METHOD_POST,
type: constants.REQUEST_HTTP,
},
vm.writeLogs = (data = {}, config = {}) =>
vm.post(API.GET_LOGS, data, config).then(res => Promise.resolve(res));
getCity: {
url: API.GET_CITY,
method: constants.REQUEST_METHOD_GET,
type: constants.REQUEST_HTTP,
},
vm.getCity = () => vm.get(API.GET_CITY).then(res => Promise.resolve(res));
generateTokenQuick: {
url: API.GENERATE_TOKEN_CHANGE,
method: constants.REQUEST_METHOD_GET,
type: constants.REQUEST_HTTP,
},
vm.generateTokenQuick = (data = {}) =>
vm.get(API.GENERATE_TOKEN_CHANGE, data).then(res => Promise.resolve(res));
getAllGroupsInfoForUser: {
url: API.GET_ALL_GROUPS_INFO_FORUSER,
method: constants.REQUEST_METHOD_GET,
type: constants.REQUEST_HTTP,
},
vm.getAllGroupsInfoForUser = (data = {}, config) =>
vm
.get(API.GET_ALL_GROUPS_INFO_FORUSER, data, config)
.then(res => Promise.resolve(res));
getWeather: {
url: API.GET_WEATHER,
method: constants.REQUEST_METHOD_GET,
type: constants.REQUEST_HTTP,
},
vm.getWeather = (data = {}, config) =>
vm.get(API.GET_WEATHER, data, config).then(res => Promise.resolve(res));
sendMessVerificationCode: {
url: API.SEND_MESSAGE_CODE,
method: constants.REQUEST_METHOD_GET,
type: constants.REQUEST_HTTP,
},
vm.sendMessVerificationCode = (data = {}, config = {}) =>
vm
.get(API.SEND_MESSAGE_CODE, data, config)
.then(res => Promise.resolve(res));
changePassword: {
url:
(window.globalConfig && window.globalConfig.loginTemplate) ===
'Dark - IOTMultiLogin.html'
? API.IOT_CHANGE_PASSWORD
: API.CHANGE_PASSWORD,
method: constants.REQUEST_METHOD_GET,
type: constants.REQUEST_HTTP,
},
});
vm.changePassword = (data = {}, config = {}) =>
vm
.get(
window.globalConfig.loginTemplate === 'Dark - IOTMultiLogin.html'
? API.IOT_CHANGE_PASSWORD
: API.CHANGE_PASSWORD,
data,
config,
)
.then(res => Promise.resolve(res));
export const searchAutoCity = keywords => {
const url = 'https://restapi.amap.com/v3/assistant/inputtips';
const options = {
callback: `jsonp_${new Date().getTime()}`,
};
const params = Object.assign(
{},
{
s: 'rsv3',
key: 'e83f64300a2a55a33fa8e4ab9a46bca6',
platform: 'JS',
logversion: '2.0',
csid: '5A098355-8164-41D5-A2DC-78E1471CCD28',
appname: window.location.href,
sdkversion: '1.4.15',
keywords,
},
);
return jsonp(url, params, options);
};
export default services;
import qs from 'qs';
import { service } from '@wisdom-utils/utils';
import constants from '../constants';
const API = {
GET_INFORMATION:
......@@ -10,22 +11,28 @@ const API = {
POST_ADD_OPTIONS:
'/CityInterface/rest/services/WisdomUnion.svc/CustomerManage/AddOption',
};
/* eslint-disable */
export default vm => {
vm.getInformationInfo = (data = {}) =>
vm.get(API.GET_INFORMATION, data).then(res => Promise.resolve(res));
vm.getMqttSiteCode = (data = {}) =>
vm.get(API.GET_MQTT_SITE_CODE, data).then(res => Promise.resolve(res));
const notificationService = service({
getInformationInfo: {
url: API.GET_INFORMATION,
method: constants.REQUEST_METHOD_GET,
type: constants.REQUEST_HTTP,
},
getMqttSiteCode: {
url: API.GET_MQTT_SITE_CODE,
method: constants.REQUEST_METHOD_GET,
type: constants.REQUEST_HTTP,
},
postInformationStatus: {
url: API.POST_INFORMATION_STATUS,
method: constants.REQUEST_METHOD_POST,
type: constants.REQUEST_HTTP,
},
postAddOptions: {
url: API.POST_ADD_OPTIONS,
method: constants.REQUEST_METHOD_POST,
type: constants.REQUEST_HTTP,
},
});
vm.postInformationStatus = (params = {}) => {
const paramsStr = qs.stringify(params, { arrayFormat: 'brackets' });
return vm
.post(`${API.POST_INFORMATION_STATUS}?${paramsStr}`)
.then(res => Promise.resolve(res));
};
vm.postAddOptions = (params = {}) => {
return vm.post(API.POST_ADD_OPTIONS, params).then(res => Promise.resolve(res))
}
};
export default notificationService;
......@@ -14,7 +14,6 @@ import { params, Storeage } from 'kit_utils';
import { Provider } from 'react-redux';
import { message, Button, ConfigProvider, notification } from 'antd';
import defaultSettings from '../config/defaultSetting';
import Http from './api';
import Container from './components/Container';
import configureStore from './configureStore';
import App from './containers/App';
......@@ -22,12 +21,13 @@ import { actionCreators } from './containers/App/store';
import { initMicroApps } from './micro';
import history from './utils/history';
import { isString } from './utils/utils';
import services from './api/service/base';
const isHttps = document.location.protocol === 'https:';
const { pwa } = defaultSettings;
// eslint-disable-next-line no-restricted-globals
const namespace = `__PANDA_STORE__${location.hostname}`;
window.createStoreage = new Storeage(namespace);
window.Http = Http;
// eslint-disable-next-line no-underscore-dangle
const initialState = Immutable.Map();
const store = configureStore(initialState, history);
const MOUNT_NODE = document.getElementById('app');
......@@ -73,17 +73,15 @@ const initGlobalConfig = () => {
store.dispatch(actionCreators.getConfig(config));
render({ appContent: '', loading: true });
} else {
Http.getConfig()
services
.queryConfig({ client: params.getParams('client') || 'city' })
.then(res => {
if (res) {
const data = res;
store.dispatch(
actionCreators.getConfig(
Object.assign({}, data),
),
);
store.dispatch(actionCreators.getConfig(Object.assign({}, data)));
// eslint-disable-next-line no-shadow
Http.getWateWayConfig()
services
.getWateWayConfig()
// eslint-disable-next-line no-shadow
.then(res => {
const hasGateWay =
......
import React from 'react';
import { BaseComponent } from '@wisdom-utils/components';
import mousetrap from 'mousetrap';
import propTypes from 'prop-types';
/* eslint-disable */
export default class HandlerMap extends React.Component {
export default class HandlerMap extends BaseComponent {
componentDidMount() {
const { keyHandlerMap } = this.props;
if (keyHandlerMap) {
......
......@@ -3,9 +3,8 @@ import React from 'react';
import { Avatar, Form, Input, message, Modal, Popover, Spin } from 'antd';
import Cookies from 'js-cookie';
import { withRouter } from 'react-router-dom';
import { API } from '../../api/baseService';
import styles from './index.less';
import services from '../../api/service/base';
const formItemLayout = {
labelCol: {
......@@ -87,7 +86,7 @@ class AvatarDropdown extends React.Component {
newpassword: res.newPwd,
token: window.globalConfig.token,
};
Http.changePassword(params)
services.changePassword(params)
.then(res => {
if (res.success) {
message.success('修改密码成功');
......@@ -128,14 +127,14 @@ class AvatarDropdown extends React.Component {
userInfo.UserImge &&
userInfo.UserImge.indexOf('个人信息') > -1
) {
image = `${API.FILE_DOWNLOAD}/${userInfo.UserImge}`;
image = `/cityinterface/rest/services/filedownload.svc/download/${userInfo.UserImge}`;
} else if (
userInfo.UserImge &&
userInfo.UserImge !== '' &&
userInfo.UserImge !== 'default_user.png'
) {
image = userInfo.UserImge;
} else if (userInfo.WxImage && userInfo.WxImage != '') {
} else if (userInfo.WxImage && userInfo.WxImage !== '') {
image = userInfo.WxImage;
}
return image;
......
......@@ -9,6 +9,7 @@ import { ERR_OK, MESSAGE_TYPE, NEW_MESSAGE } from '../Notifier/constants';
import styles from './index.less';
import { findPathByWidget, isJSON } from '../../utils/utils';
import { actionCreators } from '../../containers/App/store';
import service from '../../api/service/notification';
class NoticeIconView extends Component {
constructor(props) {
......@@ -134,21 +135,23 @@ class NoticeIconView extends Component {
handlerOptions = value => {
// eslint-disable-next-line no-undef
Http.postAddOptions({
UserName: this.props.global.userInfo.fullName,
Type: '其他问题',
System: '熊猫智联',
Content: value.content,
Phone: value.phone,
UserID: this.props.global.userInfo.OID,
Picture: '',
}).then(res => {
if (res.statusCode === ERR_OK) {
this.setState({
sysTopVisible: false,
});
}
});
service
.postAddOptions({
UserName: this.props.global.userInfo.fullName,
Type: '其他问题',
System: '熊猫智联',
Content: value.content,
Phone: value.phone,
UserID: this.props.global.userInfo.OID,
Picture: '',
})
.then(res => {
if (res.statusCode === ERR_OK) {
this.setState({
sysTopVisible: false,
});
}
});
};
renderSysPlatform = message => {
......
......@@ -21,6 +21,7 @@ import {
VIDEO_LEVEL,
} from './constants';
import createMessage from './message';
import service from '../../api/service/notification';
/* eslint-disable */
// eslint-disable-next-line no-undef
const Logger = logger('mqtt');
......@@ -129,7 +130,7 @@ class Notifier {
if (isAll) hisIDs = this.messageCache.messages.map(item => item.id);
const self = this;
// eslint-disable-next-line no-undef
Http.postInformationStatus({
service.postInformationStatus({
userID: this.userInfo.OID,
hisID: hisIDs.join(','),
isAll: isAll ? 1 : '',
......@@ -497,7 +498,7 @@ class Notifier {
// 工具类
async loadHisMessages(pageIndex, pageSize) {
const self = this;
return Http.getInformationInfo({
return service.getInformationInfo({
userID: self.getUserInfo().OID,
pageIndex,
pageSize,
......@@ -506,7 +507,7 @@ class Notifier {
if (res) {
const result = {
totalCount: res.totalRcdNum,
messages: res.getMe.map(this.parseHisToMessage.bind(this)),
messages: (Array.isArray(res.getMe) ? res.getMe: []) .map(this.parseHisToMessage.bind(this)),
};
self.messageCache.totalCount = result.totalCount;
(result.messages || []).forEach(message => {
......@@ -530,7 +531,7 @@ class Notifier {
async getMqttSiteCode() {
const self = this;
return Http.getMqttSiteCode({ 'request.preventCache': Date.now() }).then(
return service.getMqttSiteCode({ 'request.preventCache': Date.now() }).then(
res => {
if (res && res.say.statusCode === ERR_OK) {
let mqttConfig = {
......
......@@ -133,42 +133,6 @@ const Modal = props => {
return ret.length > 0 ? ret : [];
};
// const transformSeachProductList = () => {
// return (
// <div className={styles.resultContainer}>
// {
// searchProduct.map((item, index) => {
// const match = props.matchValue(item.name, keyword)
// const name = keyword!== "" && match ? (
// <div className={styles.withHightLight}>
// {
// item.name.substring(0, match[0])
// }
// <em>
// {
// item.name.substring(match[0], match[1] + 1)
// }
// </em>
// {
// item.name.substring(match[1] + 1)
// }
// </div>
// ): item.name;
// return (
// <a className={styles.item} key={index}>
// <span className={styles.title}>
// {name}
// <RightCircleOutlined/>
// </span>
// <span className={styles.subtitle}>产品功能入口</span>
// </a>
// )
// })
// }
// </div>
// )
// }
const goFeature = (event, item) => {
event.persist && event.persist();
event && event.stopPropagation();
......
......@@ -67,11 +67,20 @@ const appReducer = (state = initialState, action) => {
switch (action.type) {
case GET_CONFIG:
// eslint-disable-next-line no-debugger
debugger
// eslint-disable-next-line no-underscore-dangle
window.__INITIAL_STATE__ = Object.assign({}, action.data, {
allWidgets: action.data.widgets || [],
});
window.__INITIAL_STATE__ = Object.assign(
{},
// eslint-disable-next-line no-underscore-dangle
action.data,
{
allWidgets: action.data.widgets || [],
baseURL: {
dev: window.location.origin,
prod: window.location.origin,
},
env: process.env.NODE_ENV === 'development' ? 'daily' : 'prod',
},
);
// eslint-disable-next-line global-require
if (!window.globalConfig) {
// eslint-disable-next-line global-require
......
......@@ -126,7 +126,7 @@ const StationsItem = (item, action) => {
>
{item.groupName}
{item.promoteTip && HOT.includes(item.promoteTip) && (
<div imgType={item.promoteTip}>{item.promoteTip}</div>
<div title={`${item.promoteTip}`}>{item.promoteTip}</div>
)}
</a>
</li>
......
......@@ -9,6 +9,7 @@ import CitySelector from '../components/CitySelector';
import Login from '../pages/user/login/login';
import cityJson from './city.json';
import styles from './UserLayout.less';
import services from '../api/service/base';
const { Link } = Anchor;
......@@ -36,7 +37,7 @@ class Site {
this.globalConfig.userInfo.site
) {
// eslint-disable-next-line no-undef
Http.getCity().then(res => {
services.getCity().then(res => {
// eslint-disable-next-line no-restricted-globals
if (res && !isNaN(res.cid)) {
const cityResult = JSON.parse(cityJson);
......@@ -56,192 +57,188 @@ class Site {
const self = this;
return new Promise((resolve, reject) => {
// eslint-disable-next-line no-undef
Http.getAllGroupsInfoForUser(
{
services
.getAllGroupsInfoForUser({
loginName,
'request.preventCache': new Date().getTime(),
},
{
ignoreSite: true,
},
).then(res => {
if (res && res.say.errMsg === '' && res.say.statusCode === ERR_OK) {
const result = res.getMe;
let city = self.weatherCity;
let arr = [];
self.globalConfig.userInfo.groupType = '';
self.globalConfig.userInfo.Groups = res.getMe;
// eslint-disable-next-line no-array-constructor
self.globalConfig.userInfo.Industries = new Array();
if (
self.globalConfig.userInfo.Groups &&
self.globalConfig.userInfo.Groups.length
) {
self.globalConfig.userInfo.Groups.forEach(group => {
if (
group.industry &&
self.globalConfig.userInfo.Industries.indexOf(group.industry) <
0
)
self.globalConfig.userInfo.Industries.push(group.industry);
});
}
if (
self.globalConfig.userInfo &&
self.globalConfig.userInfo.site &&
self.globalConfig.userInfo.Groups &&
self.globalConfig.userInfo.Groups.length
) {
// eslint-disable-next-line no-underscore-dangle
const _indestryItem = self.globalConfig.userInfo.Groups.find(
// eslint-disable-next-line eqeqeq
item => item.site === self.globalConfig.userInfo.site,
);
if (_indestryItem && _indestryItem.industry) {
self.globalConfig.Industry = _indestryItem.industry;
}
}
let allStation = [];
let projectStation = [];
self.showStations = [];
if (self.globalConfig.Industry) {
allStation = result.filter(
item => item.industry === self.globalConfig.Industry,
);
self.showStations = allStation.filter(
item => item.promoteIndex && item.promoteIndex > 0,
);
projectStation = allStation.filter(item => !item.promoteIndex);
} else {
allStation = result;
}
if (allStation.length) {
let allChoice = false;
allStation.forEach(val => {
if (val.promoteIndex === 0) {
allChoice = true;
}
});
if (!allChoice) {
// me.$el.find('#changeCityWays').hide();
// me.$el.find('.LMBcityBox').hide();
// me.$el.find('div.cities').css('min-width', 'initial');
// me.$el.find('.focusStations').addClass('LMBcolumnList');
}
if (allStation.length > 120) {
// $(me.el).find("div.cities div.cityContent").css("height", '335px');
})
.then(res => {
if (res && res.say.errMsg === '' && res.say.statusCode === ERR_OK) {
const result = res.getMe;
let city = self.weatherCity;
let arr = [];
self.globalConfig.userInfo.groupType = '';
self.globalConfig.userInfo.Groups = res.getMe;
// eslint-disable-next-line no-array-constructor
self.globalConfig.userInfo.Industries = new Array();
if (
self.globalConfig.userInfo.Groups &&
self.globalConfig.userInfo.Groups.length
) {
self.globalConfig.userInfo.Groups.forEach(group => {
if (
group.industry &&
self.globalConfig.userInfo.Industries.indexOf(
group.industry,
) < 0
)
self.globalConfig.userInfo.Industries.push(group.industry);
});
}
// eslint-disable-next-line no-underscore-dangle
let _enterprise = null;
if (
self.globalConfig.userInfo &&
self.globalConfig.userInfo.site &&
self.globalConfig.userInfo.site.length
self.globalConfig.userInfo.Groups &&
self.globalConfig.userInfo.Groups.length
) {
_enterprise = allStation.filter(
enterprise =>
// eslint-disable-next-line eqeqeq
enterprise.site === self.globalConfig.userInfo.site,
// eslint-disable-next-line no-underscore-dangle
const _indestryItem = self.globalConfig.userInfo.Groups.find(
// eslint-disable-next-line eqeqeq
item => item.site === self.globalConfig.userInfo.site,
);
if (_indestryItem && _indestryItem.industry) {
self.globalConfig.Industry = _indestryItem.industry;
}
}
let allStation = [];
let projectStation = [];
self.showStations = [];
if (self.globalConfig.Industry) {
allStation = result.filter(
item => item.industry === self.globalConfig.Industry,
);
self.showStations = allStation.filter(
item => item.promoteIndex && item.promoteIndex > 0,
);
projectStation = allStation.filter(item => !item.promoteIndex);
} else {
allStation = result;
}
if (_enterprise && _enterprise.length) {
if (_enterprise[0].groupName.indexOf('演示' >= 0)) {
arr[0] = _enterprise[0].groupName;
if (allStation.length) {
let allChoice = false;
allStation.forEach(val => {
if (val.promoteIndex === 0) {
allChoice = true;
}
});
if (!allChoice) {
// me.$el.find('#changeCityWays').hide();
// me.$el.find('.LMBcityBox').hide();
// me.$el.find('div.cities').css('min-width', 'initial');
// me.$el.find('.focusStations').addClass('LMBcolumnList');
}
if (allStation.length > 120) {
// $(me.el).find("div.cities div.cityContent").css("height", '335px');
}
// eslint-disable-next-line no-underscore-dangle
let _enterprise = null;
if (
self.globalConfig.userInfo.site &&
self.globalConfig.userInfo.site.length
) {
_enterprise = allStation.filter(
enterprise =>
// eslint-disable-next-line eqeqeq
enterprise.site === self.globalConfig.userInfo.site,
);
}
if (_enterprise && _enterprise.length) {
if (_enterprise[0].groupName.indexOf('演示' >= 0)) {
arr[0] = _enterprise[0].groupName;
} else {
arr = _enterprise[0].city.split('/');
}
const tmp = _enterprise[0].city.split('/')[1];
city = tmp.substr(0, tmp.length - 1);
self.globalConfig.userInfo.groupType = _enterprise[0].groupType;
} else {
arr = _enterprise[0].city.split('/');
arr = allStation[0].city.split('/');
const tmp = arr[1];
city = tmp.substr(0, tmp.length - 1);
self.globalConfig.userInfo.groupType = allStation[0].groupType;
}
const tmp = _enterprise[0].city.split('/')[1];
city = tmp.substr(0, tmp.length - 1);
self.globalConfig.userInfo.groupType = _enterprise[0].groupType;
} else {
arr = allStation[0].city.split('/');
const tmp = arr[1];
city = tmp.substr(0, tmp.length - 1);
self.globalConfig.userInfo.groupType = allStation[0].groupType;
}
}
if (allStation.length > 1) {
self.currentStationName = arr[arr.length - 1];
self.citySelector = self.AvailableofRegionName(projectStation);
self.siteCityList = self.buildCitySelectTemple(projectStation);
}
// 只有演示环境出现友好提示
if (allStation.length === self.showStations.length) {
self.isOnlyDisplay = true;
} else {
self.citySelector = self.AvailableofRegionName(projectStation);
self.siteCityList = self.buildCitySelectTemple(projectStation);
}
if (allStation.length > 1) {
self.currentStationName = arr[arr.length - 1];
self.citySelector = self.AvailableofRegionName(projectStation);
self.siteCityList = self.buildCitySelectTemple(projectStation);
}
// 只有演示环境出现友好提示
if (allStation.length === self.showStations.length) {
self.isOnlyDisplay = true;
} else {
self.citySelector = self.AvailableofRegionName(projectStation);
self.siteCityList = self.buildCitySelectTemple(projectStation);
}
// eslint-disable-next-line no-unused-expressions
self.updateConfig && self.updateConfig(self.globalConfig);
const stations = self.insertYSStation();
if (city) {
// eslint-disable-next-line no-undef
Http.getWeather(
{
city,
'request.preventCache': new Date().getTime(),
},
{
ignoreSite: true,
},
)
// eslint-disable-next-line no-shadow
.then(res => {
if (res.say.statusCode === ERR_OK) {
const firtValue = res.getMe[0];
if (firtValue.cityName) {
const text = firtValue.forcastFirst.split(' ')[1];
const imgPath = firtValue.presentPictureFirst.replace(
'gif',
'svg',
);
// eslint-disable-next-line no-unused-expressions
self.updateConfig && self.updateConfig(self.globalConfig);
const stations = self.insertYSStation();
if (city) {
// eslint-disable-next-line no-undef
services
.getWeather({
city,
'request.preventCache': new Date().getTime(),
ignoreSite: true,
})
// eslint-disable-next-line no-shadow
.then(res => {
if (res.say.statusCode === ERR_OK) {
const firtValue = res.getMe[0];
if (firtValue.cityName) {
const text = firtValue.forcastFirst.split(' ')[1];
const imgPath = firtValue.presentPictureFirst.replace(
'gif',
'svg',
);
resolve({
stations,
weathers: {
icon: `https://panda-water.cn/web4/assets/images/weather2/${imgPath}`,
text: text + firtValue.temperatureFirst,
},
siteCityList: self.siteCityList,
citySelector: self.citySelector,
currentStationName: self.currentStationName,
});
}
} else {
resolve({
stations,
weathers: {
icon: `https://panda-water.cn/web4/assets/images/weather2/${imgPath}`,
text: text + firtValue.temperatureFirst,
},
siteCityList: self.siteCityList,
citySelector: self.citySelector,
currentStationName: self.currentStationName,
weathers: {},
});
}
} else {
})
.catch(error => {
resolve({
stations,
siteCityList: self.siteCityList,
citySelector: self.citySelector,
currentStationName: self.currentStationName,
weathers: {},
siteCityList: self.siteCityList,
citySelector: self.citySelector,
});
}
})
.catch(error => {
resolve({
stations,
currentStationName: self.currentStationName,
weathers: {},
siteCityList: self.siteCityList,
citySelector: self.citySelector,
});
} else {
resolve({
stations,
currentStationName: self.currentStationName,
weathers: {},
siteCityList: self.siteCityList,
citySelector: self.citySelector,
});
} else {
resolve({
stations,
currentStationName: self.currentStationName,
weathers: {},
siteCityList: self.siteCityList,
citySelector: self.citySelector,
});
}
}
}
});
});
});
}
......@@ -350,14 +347,11 @@ class Site {
const { loginName } = this.globalConfig.userInfo;
this.setLoading(true);
// eslint-disable-next-line no-undef
Http.generateTokenQuick(
{
services
.generateTokenQuick({
loginName,
},
{
ignoreSite: true,
},
)
})
.then(res => {
const { token } = res;
if (token) {
......@@ -371,16 +365,13 @@ class Site {
beforeChangeCheck(token, site) {
// eslint-disable-next-line no-undef
Http.getUserInfo(
{
services
.getUserInfo({
token,
subOID: 'subOID',
site,
},
{
ignoreSite: true,
},
)
})
.then(res => {
if (res && !res.errMsg) {
this.writeCookie(token, site);
......@@ -494,14 +485,11 @@ class Site {
const self = this;
if (item) {
// eslint-disable-next-line no-undef
Http.generateTokenQuick(
{
services
.generateTokenQuick({
loginName: self.globalConfig.userInfo.loginName,
},
{
ignoreSite: true,
},
)
})
.then(res => {
const { token } = res;
if (token) {
......@@ -591,7 +579,7 @@ class Site {
const item = cities.segs[j];
children.push(
<div key={item.letter}>
<div key={j}>
<a
className={styles.letter}
href={`${item.letter}`}
......@@ -609,12 +597,12 @@ class Site {
pName = city.proviceName.substr(0, 3);
}
return (
<div className={styles.Provice} key={city.proviceName}>
<div className={styles.Provice} key={i}>
<span className={styles.proviceName}>{pName}</span>
<ul className={styles.city_list}>
{/* eslint-disable-next-line no-shadow */}
{city.stations.map((item, index) => (
<li key={item.cityName}>
<li key={item.cityName + index}>
<a
className={classNames(
styles.city_select,
......
......@@ -224,7 +224,7 @@
color: #23527c !important;
transition: color 0.3s;
}
div[imgType] {
div[title] {
display: inline-block;
color: #fff;
text-align: center;
......@@ -233,26 +233,26 @@
position: absolute;
top: -10px;
}
div[imgType='县'] {
div[title='县'] {
width: 30px;
height: 24px;
background: url(https://panda-water.cn/web4/assets/images/云平台/县.png)
center center no-repeat;
}
div[imgType='市'] {
div[title='市'] {
width: 30px;
height: 24px;
background: url(https://panda-water.cn/web4/assets/images/云平台/市.png)
center center no-repeat;
}
div[imgType='市'] {
div[title='市'] {
width: 30px;
height: 24px;
background: url(https://panda-water.cn/web4/assets/images/云平台/市.png)
center center no-repeat;
}
div[imgType='HOT'],
div[imgType='New'] {
div[title='HOT'],
div[title='New'] {
width: 41px;
height: 24px;
background: url(https://panda-water.cn/web4/assets/images/云平台/HOT.png)
......@@ -373,7 +373,7 @@
:global(.ant-menu-dark .ant-menu-item, .ant-menu-dark
.ant-menu-item-group-title, .ant-menu-dark
.ant-menu-item
> a, .ant-menu-dark .ant-menu-item > span > a) {
> a, .ant-menu-dark .ant-menu-item> span > a) {
width: 48px;
display: flex;
flex-direction: column;
......
......@@ -6,6 +6,7 @@ import 'kit_logger';
import styles from './index.less';
import LoginContext from './LoginContext';
import ItemMap from './map';
import services from '../../../../../api/service/base';
const FormItem = Form.Item;
// eslint-disable-next-line no-undef
......@@ -48,15 +49,12 @@ const LoginItem = props => {
const onGetCaptcha = useCallback(mobile => {
// eslint-disable-next-line no-undef
Http.sendMessVerificationCode(
{
services
.sendMessVerificationCode({
phoneNumber: mobile,
},
{
ignoreSite: true,
cacheBust: true,
},
)
})
.then(res => {
if (res) {
setExt(res.ext);
......
......@@ -2,6 +2,7 @@ import { message } from 'antd';
import { decode, encode } from 'js-base64';
import Cookies from 'js-cookie';
import sha1 from 'sha1';
import services from '../../../api/service/base';
import 'kit_logger';
import SlideVerify from '../../../components/SlideVerify';
// eslint-disable-next-line no-undef
......@@ -63,35 +64,32 @@ class Login {
this.globalConfig.token = token;
const self = this;
// eslint-disable-next-line no-undef
Http.getUserInfo(
{
services
.getUserInfo({
token: this.globalConfig.token,
subOID: 'subOID',
site: this.getLocalSiteBytoken(token),
'request.preventCache': Date.now(),
},
{
ignoreSite: true,
},
).then(response => {
if (response && !response.errMsg) {
self.globalConfig.userInfo = {};
if (
response.Groups &&
response.Groups instanceof Array &&
response.Groups.length
) {
self.globalConfig.userInfo.Groups = response.Groups;
})
.then(response => {
if (response && !response.errMsg) {
self.globalConfig.userInfo = {};
if (
response.Groups &&
response.Groups instanceof Array &&
response.Groups.length
) {
self.globalConfig.userInfo.Groups = response.Groups;
}
self.globalConfig.userInfo = Object.assign(
{},
response,
self.globalConfig.userInfo,
);
self.updateConfig && self.updateConfig(self.globalConfig);
self.getUserInfoAndConfig();
}
self.globalConfig.userInfo = Object.assign(
{},
response,
self.globalConfig.userInfo,
);
self.updateConfig && self.updateConfig(self.globalConfig);
self.getUserInfoAndConfig();
}
});
});
}
writeLogs() {
......@@ -103,18 +101,20 @@ class Login {
if (this.globalConfig.userInfo.site) {
// eslint-disable-next-line no-undef
Http.writeLogs({
origin: window.location.origin,
client: this.globalConfig.client,
site:
this.globalConfig.userInfo && this.globalConfig.userInfo.site
? this.globalConfig.userInfo.site
: '',
loginName:
this.globalConfig.userInfo && this.globalConfig.userInfo.fullName
? this.globalConfig.userInfo.fullName
: '',
}).catch(error => {});
services
.writeLogs({
origin: window.location.origin,
client: this.globalConfig.client,
site:
this.globalConfig.userInfo && this.globalConfig.userInfo.site
? this.globalConfig.userInfo.site
: '',
loginName:
this.globalConfig.userInfo && this.globalConfig.userInfo.fullName
? this.globalConfig.userInfo.fullName
: '',
})
.catch(error => {});
}
}
......@@ -151,11 +151,12 @@ class Login {
getWebConfig(token, getIndustry) {
const self = this;
// eslint-disable-next-line no-undef
Http.getWebSiteConfig({
client: this.globalConfig.client,
token,
'request.preventCache': Date.now(),
})
services
.getWebSiteConfig({
client: this.globalConfig.client,
token,
'request.preventCache': Date.now(),
})
.then(response => {
if (response && response.length > 0) {
self.globalConfig = Object.assign(
......@@ -189,38 +190,39 @@ class Login {
self.globalConfig.userInfo.site &&
self.globalConfig.userInfo.site.length > 0
) {
// eslint-disable-next-line no-undef
Http.getWebSiteConfig(
{
client: self.globalConfig.client,
token,
},
{
ignoreSite: true,
'request.preventCache': Date.now(),
},
// eslint-disable-next-line no-undef,no-underscore-dangle
services
.getWebSiteConfig(
{
client: self.globalConfig.client,
token,
ignoreSite: true,
'request.preventCache': Date.now(),
},
// eslint-disable-next-line no-shadow
)
// eslint-disable-next-line no-shadow
).then(response => {
if (response && response.length > 0) {
const mainConf = response.shift();
if (mainConf.homepage)
self.globalConfig.homepage = mainConf.homepage;
if (mainConf.bannerLogo)
self.globalConfig.bannerLogo = mainConf.bannerLogo;
if (mainConf.logo) self.globalConfig.logo = mainConf.logo;
if (mainConf.mdi) self.globalConfig.mdi = mainConf.mdi;
if (mainConf.menu) self.globalConfig.menu = mainConf.menu;
if (mainConf.shortcutIcon)
self.globalConfig.shortcutIcon = mainConf.shortcutIcon;
}
self.updateConfig && self.updateConfig(self.globalConfig);
// console.log("===loginSuccess===")
getIndustry
? self.events.emit('toggleIndustry')
: self.events.emit('loginSuccess');
window.share.event = self.events;
self.callback && self.callback();
});
.then(response => {
if (response && response.length > 0) {
const mainConf = response.shift();
if (mainConf.homepage)
self.globalConfig.homepage = mainConf.homepage;
if (mainConf.bannerLogo)
self.globalConfig.bannerLogo = mainConf.bannerLogo;
if (mainConf.logo) self.globalConfig.logo = mainConf.logo;
if (mainConf.mdi) self.globalConfig.mdi = mainConf.mdi;
if (mainConf.menu) self.globalConfig.menu = mainConf.menu;
if (mainConf.shortcutIcon)
self.globalConfig.shortcutIcon = mainConf.shortcutIcon;
}
self.updateConfig && self.updateConfig(self.globalConfig);
// console.log("===loginSuccess===")
getIndustry
? self.events.emit('toggleIndustry')
: self.events.emit('loginSuccess');
window.share.event = self.events;
self.callback && self.callback();
});
} else {
// loginSuccess
self.updateConfig && self.updateConfig(self.globalConfig);
......@@ -425,18 +427,14 @@ class Login {
qrcodeLogin(code) {
const self = this;
// eslint-disable-next-line no-undef
Http.generatetokenByqrcode(
{
services
.generatetokenByqrcode({
f: 'json',
expiration: self.globalConfig.expiration || 43200000,
referer: self.globalConfig.client,
skipMenuTest: 1,
qrcode: code,
},
{
cacheBust: true,
},
)
})
.then(response => {
if (response.token) {
self.globalConfig.token = response.token;
......@@ -472,45 +470,46 @@ class Login {
const password = decode(pwd.substring(0, pwd.length - 3));
const self = this;
// eslint-disable-next-line no-undef
Http.generateToken({
f: 'json',
expiration: this.globalConfig.expiration, // token过期时间(单位:秒)
client: 'referer',
username: uesrName,
password: sha1(password).toUpperCase(),
referer: this.globalConfig.client,
skipMenuTest: 1,
})
services
.generateToken({
f: 'json',
expiration: this.globalConfig.expiration, // token过期时间(单位:秒)
client: 'referer',
username: uesrName,
password: sha1(password).toUpperCase(),
referer: this.globalConfig.client,
skipMenuTest: 1,
})
.then(response => {
if (response && response.token) {
const tk = response.token;
this.globalConfig.token = tk;
// eslint-disable-next-line no-undef
Http.getUserInfo(
{
token: tk,
subOID: 'subOID',
site: this.getLocalSiteBytoken(tk),
},
{
cacheBust: true,
ignoreSite: true,
},
// eslint-disable-next-line no-undef,no-debugger
services
.getUserInfo(
{
token: tk,
subOID: 'subOID',
site: this.getLocalSiteBytoken(tk),
ignoreSite: true,
},
// eslint-disable-next-line no-shadow
)
// eslint-disable-next-line no-shadow
).then(response => {
if (response && response.errMsg) {
this.globalConfig.userInfo = {};
if (
response.data.Groups &&
response.data.Groups instanceof Array &&
response.data.Groups.length
) {
this.globalConfig.userInfo.Groups = response.data.Groups;
.then(response => {
if (response && response.errMsg) {
this.globalConfig.userInfo = {};
if (
response.data.Groups &&
response.data.Groups instanceof Array &&
response.data.Groups.length
) {
this.globalConfig.userInfo.Groups = response.data.Groups;
}
self.updateConfig && self.updateConfig(self.globalConfig);
self.getUserInfoAndConfig();
}
self.updateConfig && self.updateConfig(self.globalConfig);
self.getUserInfoAndConfig();
}
});
});
} else {
self.handleLoginError();
message.error('登录失败');
......@@ -564,18 +563,16 @@ class Login {
if (self.isSignIn || !!industry) {
// eslint-disable-next-line no-undef
Http.getUserInfo(
services.getUserInfo(
{
token,
subOID: 'subOID',
industry,
site: _industrySite || this.getLocalSiteBytoken(token),
// self.globalConfig.userInfo.site ? self.globalConfig.userInfo.site: this.getLocalSiteBytoken(token),
// industrySite ? _industrySite : this.getLocalSiteBytoken(token),
},
{
ignoreSite: true,
'request.preventCache': Date.now(),
// self.globalConfig.userInfo.site ? self.globalConfig.userInfo.site: this.getLocalSiteBytoken(token),
// industrySite ? _industrySite : this.getLocalSiteBytoken(token),
},
)
.then(response => {
......@@ -642,7 +639,7 @@ class Login {
this.events.removeAllListeners('loginError');
const self = this;
// eslint-disable-next-line no-undef
Http.generateToken(
services.generateToken(
{
f: 'json',
expiration: this.globalConfig.expiration, // token过期时间(单位:秒)
......@@ -653,8 +650,6 @@ class Login {
skipMenuTest: 1,
userPhone,
'request.preventCache': Date.now(),
},
{
ignoreSite: true,
},
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment