123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186 |
- import RequestFun from './request.js'
- export function getToken(data) { //登录接口
- return new RequestFun().fetch(
- '/app/user/loginApp',
- 'POST',
- data
- )
- }
- export function getUser(data) { //查看个人信息
- return new RequestFun().fetch(
- `/app/user/getUserInfo`,
- 'GET',
- data
- )
- }
- export function exit(data) { //退出登录
- return new RequestFun().fetch(
- '/app/user/quitApp',
- 'GET',
- data
- )
- }
- export function updateMobile(data) { //修改手机号
- return new RequestFun().fetch(
- '/app/user/updateMobile',
- 'POST',
- data
- )
- }
- export function updateName(data) { //修改昵称
- return new RequestFun().fetch(
- '/app/user/updateName',
- 'POST',
- data
- )
- }
- export function updateIcon(data) { //修改头像
- return new RequestFun().fetch(
- '/app/user/updateIcon',
- 'POST',
- data
- )
- }
- export function updateEmail(data) { //修改邮箱
- return new RequestFun().fetch(
- '/app/user/updateEmail',
- 'POST',
- data
- )
- }
- export function updatePassword(data) { //修改密码
- return new RequestFun().fetch(
- '/app/user/updatePassword',
- 'POST',
- data
- )
- }
- export function updateMsgStatus(data) { //修改消息接收
- return new RequestFun().fetch(
- '/app/user/updateMsgStatus',
- 'POST',
- data
- )
- }
- export function addTask(data) { //创建任务
- return new RequestFun().fetch(
- '/app/task/addTask',
- 'POST',
- data
- )
- }
- export function followRobot(data) { //关注机器人
- return new RequestFun().fetch(
- '/app/robot/followRobot',
- 'POST',
- data
- )
- }
- export function unfollowRobot(data) { //取消关注机器人
- return new RequestFun().fetch(
- '/app/robot/unfollowRobot',
- 'POST',
- data
- )
- }
- export function getRobotList(data,complete) { //查询全部机器人
- return new RequestFun().fetch(
- `/app/robot/getRobotList`,
- 'GET',
- data,
- complete
- )
- }
- export function getEnvData(data) { //获取最新环境数据
- return new RequestFun().fetch(
- `/app/data/getEnvData`,
- 'GET',
- data
- )
- }
- export function getRobotStauts(data) { //查询机器人实时状态
- return new RequestFun().fetch(
- `/app/robot/getRobotStauts`,
- 'GET',
- data
- )
- }
- export function currentTask(data) { //查询巡检任务列表
- return new RequestFun().fetch(
- `/app/task/currentTask`,
- 'GET',
- data
- )
- }
- export function getMessageList(data,complete) { //查看消息列表
- return new RequestFun().fetch(
- `/app/data/getWarningData`,
- 'GET',
- data,
- complete
- )
- }
- export function readAll(data) { //全部标记已读
- return new RequestFun().fetch(
- '/app/data/readAll',
- 'POST',
- data
- )
- }
- export function getReadNum(data) { //全部标记已读
- return new RequestFun().fetch(
- '/app/data/getNewMsgCount',
- 'GET',
- data
- )
- }
- export function readMsg(data) { //标记已读
- return new RequestFun().fetch(
- '/app/data/readMsg',
- 'POST',
- data
- )
- }
- export function getCheckData(data,complete) { //查询巡检数据
- return new RequestFun().fetch(
- `/app/data/getCheckData`,
- 'GET',
- data,
- complete
- )
- }
- export function getImage(data) { //查询巡检图片
- return new RequestFun().fetch(
- `/app/data/getImage`,
- 'GET',
- data,
- null,
- 'Blob'
- )
- }
|