| | |
| | | import request from '@/utils/request' |
| | | |
| | | // 登录方法 |
| | | export function loginCheckFactory(username, password, factoryId) { |
| | | export function loginCheckFactory(username, password) { |
| | | const data = { |
| | | username, |
| | | password, |
| | | factoryId |
| | | } |
| | | return request({ |
| | | url: '/loginCheckFactory', |
| | |
| | | method: 'get', |
| | | params: params |
| | | }) |
| | | } |
| | | } |
| | | |
| | | // 发送客户端推送标识到服务器 |
| | | export function updateClientId(data) { |
| | | return request({ |
| | | url: '/system/client/addOrUpdateClientId', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | |
| | | // 查询公告列表 |
| | | export function listNotice(query) { |
| | | return request({ |
| | | url: '/system/notice/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // 获取未读消息数量 |
| | | export function getNoticeCount(consigneeId) { |
| | | return request({ |
| | | url: '/system/notice/getCount', |
| | | method: 'get', |
| | | params: { consigneeId } |
| | | }) |
| | | } |
| | | |
| | | // 标记消息为已读 |
| | | export function markAsRead(noticeId, status) { |
| | | return request({ |
| | | url: "/system/notice", |
| | | method: "put", |
| | | data: { noticeId, status }, |
| | | }); |
| | | } |
| | | |
| | | // 一键标记所有消息为已读 |
| | | export function markAllAsRead() { |
| | | return request({ |
| | | url: "/system/notice/readAll", |
| | | method: "post", |
| | | }); |
| | | } |
| | | |
| | | // 确认消息 |
| | | export function confirmMessage(noticeId, status) { |
| | | return request({ |
| | | url: "/system/notice", |
| | | method: "put", |
| | | data: { noticeId, status }, |
| | | }); |
| | | } |