This commit is contained in:
Zy
2026-06-16 14:12:17 +08:00
4 changed files with 177 additions and 126 deletions

View File

@@ -1,35 +1,29 @@
import request, {
get,
post,
upload
} from "./request.js"
import request, { get, post, upload } from './request.js'
// =======账号密码登录========
export const getLoginPassword = (data) => {
export const getLoginPassword = data => {
return post('/api/butler/auth/loginByPassword', data)
}
// 获取验证码
export const getSendCode = (data) => {
export const getSendCode = data => {
return post('/api/butler/auth/sendSmsCode', data)
}
// 手机验证码登录
export const getLoginBySms = (data) => {
export const getLoginBySms = data => {
return post('/api/butler/auth/loginBySms', data)
}
// 忘记密码接口
export const getResetPassword = (data) => {
export const getResetPassword = data => {
return post('/api/butler/auth/forgetPassword', data)
}
// ======首页=====
// 获取小区列表
export const getVillageList = (data) => {
export const getVillageList = data => {
return get('/api/inspection/today/villageList', data)
}
// 切换小区
export const switchVillage = (data) => {
export const switchVillage = data => {
return post('/api/inspection/today/switchVillage', data)
}
// 获取当前小区
@@ -49,28 +43,23 @@ export const getBannarList = () => {
return get('/api/manage/banner/list')
}
// ============通知列表===========
export const getNoticeList = (data) => {
export const getNoticeList = data => {
return get('/manage/notice/repair', data)
}
// ======故障上报=====
// 获取报修项目
export const getRepairOrder = () => {
return get('/manage/repair/order/list')
}
// 提交维修信息
export const addRepairList = (data) => {
export const addRepairList = data => {
return post('/manage/repair/order', data)
}
// 上传图片
export const uploadFile = (filePath, fileName) => {
return upload(filePath, '/api/butler/file/uploadImage', fileName);
return upload(filePath, '/api/butler/file/uploadImage', fileName)
}
// 查询一键开门
@@ -78,7 +67,7 @@ export const getOpenDoorList = () => {
return get('/manage/remote/open/accessdevice')
}
// 一键开门
export const switchOpenDoor = (data) => {
export const switchOpenDoor = data => {
return post('/manage/remote/open', data)
}
// ===========我的========
@@ -89,14 +78,14 @@ export const getSettingInfo = () => {
// Zy ------------
// 上报记录
export const getMyOrderList = (data) => {
export const getMyOrderList = data => {
return get('/manage/repair/order/reportlist', data)
}
// Zy ------------
// =====设置=======
// 修改密码
export const changePassword = (data) => {
export const changePassword = data => {
return post('/api/setting/changePassword', data)
}
// 退出登录
@@ -104,6 +93,6 @@ export const logout = () => {
return post('/api/butler/auth/logout')
}
// 修改手机号
export const changePhone = (data) => {
export const changePhone = data => {
return post('/api/setting/changePhone', data)
}