99 lines
2.5 KiB
JavaScript
99 lines
2.5 KiB
JavaScript
import request, { get, post, upload } from './request.js'
|
|
|
|
// =======账号密码登录========
|
|
export const getLoginPassword = data => {
|
|
return post('/api/butler/auth/loginByPassword', data)
|
|
}
|
|
// 获取验证码
|
|
export const getSendCode = data => {
|
|
return post('/api/butler/auth/sendSmsCode', data)
|
|
}
|
|
// 手机验证码登录
|
|
export const getLoginBySms = data => {
|
|
return post('/api/butler/auth/loginBySms', data)
|
|
}
|
|
// 忘记密码接口
|
|
export const getResetPassword = data => {
|
|
return post('/api/butler/auth/forgetPassword', data)
|
|
}
|
|
|
|
// ======首页=====
|
|
// 获取小区列表
|
|
export const getVillageList = data => {
|
|
return get('/api/inspection/today/villageList', data)
|
|
}
|
|
// 切换小区
|
|
export const switchVillage = data => {
|
|
return post('/api/inspection/today/switchVillage', data)
|
|
}
|
|
// 获取当前小区
|
|
export const getCurrentVillage = () => {
|
|
return get('/api/butler/auth/today/village')
|
|
}
|
|
// 获取首页今日巡检
|
|
export const getTodayInspection = () => {
|
|
return get('/api/inspection/today/inspection')
|
|
}
|
|
// 首页最新消息通知
|
|
export const getNewNoticeData = () => {
|
|
return get('/manage/notice/new')
|
|
}
|
|
// 获取bannar图
|
|
export const getBannarList = () => {
|
|
return get('/api/manage/banner/list')
|
|
}
|
|
|
|
// ============通知列表===========
|
|
export const getNoticeList = data => {
|
|
return get('/manage/notice/repair', data)
|
|
}
|
|
|
|
// ======故障上报=====
|
|
// 获取报修项目
|
|
export const getRepairOrder = () => {
|
|
return get('/manage/repair/order/list')
|
|
}
|
|
// 提交维修信息
|
|
export const addRepairList = data => {
|
|
return post('/manage/repair/order', data)
|
|
}
|
|
// 上传图片
|
|
export const uploadFile = (filePath, fileName) => {
|
|
return upload(filePath, '/api/butler/file/uploadImage', fileName)
|
|
}
|
|
|
|
// 查询一键开门
|
|
export const getOpenDoorList = () => {
|
|
return get('/manage/remote/open/accessdevice')
|
|
}
|
|
// 一键开门
|
|
export const switchOpenDoor = data => {
|
|
return post('/manage/remote/open', data)
|
|
}
|
|
// ===========我的========
|
|
// 获取管家信息
|
|
export const getSettingInfo = () => {
|
|
return get('/api/setting/info')
|
|
}
|
|
|
|
// Zy ------------
|
|
// 上报记录
|
|
export const getMyOrderList = data => {
|
|
return get('/manage/repair/order/reportlist', data)
|
|
}
|
|
// Zy ------------
|
|
|
|
// =====设置=======
|
|
// 修改密码
|
|
export const changePassword = data => {
|
|
return post('/api/setting/changePassword', data)
|
|
}
|
|
// 退出登录
|
|
export const logout = () => {
|
|
return post('/api/butler/auth/logout')
|
|
}
|
|
// 修改手机号
|
|
export const changePhone = data => {
|
|
return post('/api/setting/changePhone', data)
|
|
}
|