| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228 |
- import {http} from './service.js'
- //文件上传
- const uploadFile={
- submit:p => http.upload('/upload/putfile', {name:'file',filePath:p}),
- }
- //短信api
- const SMSApi = {
- sendSms:p => http.post('huawei/sms/sendSms'+p),
- validCode:p => http.post('huawei/sms/validCode'+p),
- }
- //字典
- const dict=p => http.get('/blade-system/dict-biz/dictionary',{params:p})
- //微信基本参数
- let wxData={
- //国信的
- // appId:'wx988577c5a9061283',
- // secret:'5013c82bf72e6266dfb2720757433e74',
- //园区的
- appId:'wxcfb2b48079ca59e4',
- secret:'30f9cf566aa57892e55aee0406356b9e',
- subscribe_grant_type:'client_credential', //订阅消息的grant_type
- }
- //微信api
- const wxApi = {
- subscribe:p => http.post('/wx/msgSend', p),
- getAccessToken:p => http.get('/wx/getAccessToken', {params:p}),
- getOpenId:p => http.get('/wx/getOpenId', {params:p}),
- //获取小程序的audit状态
- getAppletStatus:p => http.get('appconf/appconf/getById', {params:p}),
- }
- //登录
- const login=p => http.post('community/enterprisestaff/app/login', p)
- //修改密码
- const updatePassword=p => http.post('community/enterprisestaff/app/updatePassword'+p)
- //获取管理员的openid集合
- const getManagerOpenList=p => http.get('/community/enterprisestaff/app/getManagerList',{params:p})
- //获取token
- const getToken=p => http.post('blade-auth/oauth/token'+p,{},{header: {"Authorization": "Basic c2FiZXI6c2FiZXJfc2VjcmV0"}})
- //园区api
- const agency = {
- getAgencyTenantList:p => http.get('agency/agency/getAgencyTenantList', {params:p}),
- page:p => http.get('/agency/agency/getAgencyList', {params:p}),
- submit:p => http.post('/agency/agency/submit', p),
- }
- //区域api
- const residential = {
- page:p => http.get('/community/residential/listByAgencyId', {params:p}),
- }
- //企业api
- const enterprise = {
- page:p => http.get('/enterprise/enterprise/list', {params:p}),
- detail:p => http.get('/enterprise/enterprise/detail', {params:p}),
- submit:p => http.post('/enterprise/enterprise/submit', p),
- }
- //企业员工
- const enterprisestaff = {
- page:p => http.get('/community/enterprisestaff/getEnterpriseList', {params:p}),
- detail:p => http.get('/community/enterprisestaff/detail', {params:p}),
- submit:p => http.post('/community/enterprisestaff/submit', p),
- }
- //CMS
- const CMS={
- page:p => http.get('/estate/article/list', {params:p}),
- detail:p => http.get('/estate/article/detail', {params:p}),
- addReaderCount:p => http.post('/estate/article/addReaderCount', p),
- }
- //banner 轮播图
- const banner={
- page:p => http.get('/estate/banners/list', {params:p}),
- }
- //消防设备
- const fireDevice={
- //企业角色的设备列表接口
- page:p => http.get('/smartapplication/smartdevice/list', {params:p}),
- //园区角色的设备列表接口
- agencyPage:p => http.get('/smartapplication/smartdevice/getDeviceList', {params:p}),
- //报警记录接口
- alarmRecord:p => http.get('/smartapplication/smartdevice/getAlarmRecord', {params:p}),
- //电表抄表记录
- electricmeterrecord:p => http.get('/electricmeterrecord/electricmeterrecord/list', {params:p}),
- }
- //用户反馈
- const feedback = {
- submit:p => http.post('/estate/feedback/submit', p),
- }
- //园区公告
- const notice = {
- page:p => http.get('/estate/parknotice/list', {params:p}),
- remove:p => http.post('/estate/parknotice/remove?ids='+p),
- submit:p => http.post('/estate/parknotice/save', p),
- }
- //测温记录
- const temperatureRecord = {
- page:p => http.get('/smartapplication/temperaturerecord/getTemperatureRecord', {params:p}),
- }
- //健康码
- const healthCode = {
- getCode:p => http.post('/health/getCode', p)
- }
- const car = {
- //出入记录
- condition:p => http.get('carenterrecord/carenterrecord/queryRecord', {params:p}),
- //入场记录
- enterPage:p => http.get('/carenterrecord/carenterrecord/list', {params:p}),
- //出场记录
- outPage:p => http.get('/caroutrecord/caroutrecord/list', {params:p}),
-
- //车辆列表
- carList:p => http.get('/community/car/app/list', {params:p}),
- //添加车辆
- carAdd:p => http.post('/community/car/submit', p),
- //删除车辆
- carRemove:p => http.post('/community/car/remove?ids='+p),
- //车辆审核
- carAudit:p => http.post('/community/car/audit', p),
- }
- //开门设备
- const device={
- page:p => http.get('facedevice/facedevice/list', {params:p}),
- open:p => http.post('facedevice/facedevice/remoteOpenDoor', p)
- }
-
- //园区统计
- const statistical={
- //园区信息统计
- agencyStatistical:p => http.get('/statistics/agency', {params:p}),
- //当日动态数据
- todayData:p => http.get('/statistics/screen/park/todayData', {params:p}),
- //人员进出记录
- carTendency:p => http.get('statistics/screen/park/carTendency', {params:p}),
- //三十天内用电量
- electricMeterStatic:p => http.get('statistics/electricMeterStatic', {params:p}),
- //消防设备数据统计
- getGateStatic:p => http.get('smartapplication/smartdevice/getFireStatic', {params:p}),
- //消防场景告警事件统计
- getDeviceJobStaticByApp:p => http.get('jobs/devicejob/getDeviceJobStaticByApp', {params:p}),
-
- }
-
- //出入记录
- const accessrecord={
- page:p => http.get('/community/accessrecord/list', {params:p}),
- }
-
- //访客授权
- const guest={
- submit:p => http.post('estate/guest/application', p),
- page:p => http.get('estate/guest/list', {params:p}),
- getByGuestOpenId:p => http.get('/estate/guest/getByGuestOpenId', {params:p}),
- check:p => http.post('estate/guest/check', p),
- }
-
-
-
- export const api={
- //上传文件
- uploadFile,
- //短信
- SMSApi,
- //字典
- dict,
- //微信基本参数
- wxData,
- //微信api
- wxApi,
- //登录
- login,
- //修改密码
- updatePassword,
- //获取管理员的openid集合
- getManagerOpenList,
- //获取token
- getToken,
- //园区
- agency,
- //区域
- residential,
- //企业
- enterprise,
- //企业员工
- enterprisestaff,
- //CMS
- CMS,
- //banner 轮播图
- banner,
- //消防设备
- fireDevice,
- //用户反馈
- feedback,
- //园区公告
- notice,
- //测温记录
- temperatureRecord,
- //健康码
- healthCode,
- //车辆出入
- car,
- //开门设备
- device,
- //统计
- statistical,
- //出入记录
- accessrecord,
- //访客授权
- guest
-
- }
|