You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
242 lines
5.5 KiB
242 lines
5.5 KiB
5 years ago
|
import request from '../utils/rerquest'
|
||
|
|
||
|
/**
|
||
|
* 获得消息阅读情况列表
|
||
|
* @param {string} noticeId 消息id
|
||
|
* @param {string} readType 阅读类型:0未读,1已读
|
||
|
*/
|
||
|
export function getNoticeReadList({ noticeId, readType }: { noticeId: string, readType: string}) {
|
||
|
return request({
|
||
|
method: 'GET',
|
||
|
url: 'cloudAnalysis/masterGroup/getNoticeReadList',
|
||
|
options: {
|
||
|
noticeId,
|
||
|
readType
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
/**
|
||
|
* 获得群聊消息列表 (话题,通知)置顶 时间优先
|
||
|
* @param {number} pageIndex 0
|
||
|
* @param {number} pageSize 10
|
||
|
* @param {string} id 10
|
||
|
*/
|
||
|
export function getGridEvaList({ pageIndex,pageSize,id}: RequestAPIOptionsLogin) {
|
||
|
return request({
|
||
|
method: 'GET',
|
||
|
url: 'cloudAnalysis/masterGroup/getGroupMessageList',
|
||
|
options: {
|
||
|
pageIndex,
|
||
|
pageSize,
|
||
|
id
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 获得话题详情
|
||
|
*/
|
||
|
export function getTopicDetail(topicId:string) {
|
||
|
return request({
|
||
|
method: 'GET',
|
||
|
url: `cloudAnalysis/masterGroup/getTopicDetail/${topicId}`,
|
||
|
})
|
||
|
}
|
||
|
/**
|
||
|
* 查看群成员列表
|
||
|
*/
|
||
|
export function getMemberList() {
|
||
|
return request({
|
||
|
method: 'GET',
|
||
|
url: 'cloudAnalysis/masterGroup/getMemberList'
|
||
|
})
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 通知详情
|
||
|
*/
|
||
|
export function getNoticeDetail(noticeId:string) {
|
||
|
return request({
|
||
|
method: 'GET',
|
||
|
url: `cloudAnalysis/masterGroup/getNoticeDetail/${noticeId}`,
|
||
|
})
|
||
|
}
|
||
|
/**
|
||
|
* 置顶通知(置顶/取消)
|
||
|
* @param {String} noticeId 通知ID
|
||
|
* @param {String} topType 操作类型:1,置顶,2取消
|
||
|
*/
|
||
|
export function setTopNotice({ noticeId, topType }: { noticeId: string, topType: string }) {
|
||
|
return request({
|
||
|
method: 'GET',
|
||
|
url: 'cloudAnalysis/masterGroup/setTopNotice',
|
||
|
options: {
|
||
|
noticeId,
|
||
|
topType
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
/**
|
||
|
* 关闭通知
|
||
|
*/
|
||
|
export function closeNotice(noticeId: string) {
|
||
|
return request({
|
||
|
method: 'GET',
|
||
|
url: `cloudAnalysis/masterGroup/closeNotice/${noticeId}`,
|
||
|
})
|
||
|
}
|
||
|
/**
|
||
|
* 发布话题
|
||
|
* @param {String} topicContent 话题内容
|
||
|
* @param {Array} images 图片
|
||
|
*/
|
||
|
export function topicSubmit({ topicContent,images }: RequestAPIOptionsLogin) {
|
||
|
return request({
|
||
|
method: 'POST',
|
||
|
url: 'cloudAnalysis/masterGroup/topicSubmit',
|
||
|
options: {
|
||
|
topicContent,
|
||
|
images
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 发布通知
|
||
|
* @param {String} noticeTitle 通知标题
|
||
|
* @param {String} noticeContent 话题内容
|
||
|
* @param {Array} images 图片
|
||
|
*/
|
||
|
export function noticeSubmit({ noticeTitle,noticeContent,images }: RequestAPIOptionsLogin) {
|
||
|
return request({
|
||
|
method: 'POST',
|
||
|
url: 'cloudAnalysis/masterGroup/noticeSubmit',
|
||
|
options: {
|
||
|
noticeTitle,
|
||
|
noticeContent,
|
||
|
images
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
/**
|
||
|
* 置顶话题(置顶/取消)
|
||
|
* @param {String} topicId 话题id
|
||
|
* @param {String} topType 操作类型:1,置顶,2取消
|
||
|
*/
|
||
|
export function SetTopTopic({ topicId,topType }: RequestAPIOptionsLogin) {
|
||
|
return request({
|
||
|
method: 'GET',
|
||
|
url: 'cloudAnalysis/masterGroup/SetTopTopic',
|
||
|
options: {
|
||
|
topicId,
|
||
|
topType
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 置顶话题(置顶/取消)
|
||
|
* @param {String} topicId 话题id
|
||
|
*/
|
||
|
export function closeTopic(topicId:string) {
|
||
|
return request({
|
||
|
method: 'GET',
|
||
|
url: `cloudAnalysis/masterGroup/closeTopic/${topicId}`,
|
||
|
})
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 表态话题(赞/踩)
|
||
|
* @param {String} topicId 话题id
|
||
|
* @param {String} attitude 表态 0赞;1踩;2取消赞;3取消踩
|
||
|
*/
|
||
|
export function topicStatement({ topicId,attitude }: RequestAPIOptionsLogin) {
|
||
|
return request({
|
||
|
method: 'GET',
|
||
|
url: `cloudAnalysis/masterGroup/topicStatement`,
|
||
|
options: {
|
||
|
topicId,
|
||
|
attitude
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
|
||
|
|
||
|
/**
|
||
|
* 获取评论列表
|
||
|
* @param {number} pageIndex 0
|
||
|
* @param {number} pageSize 10
|
||
|
* @param {String} topicId 话题id
|
||
|
* @param {String} orderType 排序方式 0: 获取最新列表,1: 获取最热列表
|
||
|
*/
|
||
|
export function getCommentList({ pageIndex,pageSize,topicId,orderType }: RequestAPIOptionsLogin) {
|
||
|
return request({
|
||
|
method: 'GET',
|
||
|
url: 'cloudAnalysis/masterGroup/getCommentList',
|
||
|
options: {
|
||
|
pageIndex,
|
||
|
pageSize,
|
||
|
topicId,
|
||
|
orderType
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 表态评论(赞/踩)
|
||
|
* @param {String} topicId 话题id
|
||
|
* @param {String} attitude 表态 0赞;1踩;
|
||
|
* @param {String} commentId 表态 0赞;1踩;
|
||
|
*/
|
||
|
export function commentStatement({ attitude,commentId,topicId }: RequestAPIOptionsLogin) {
|
||
|
return request({
|
||
|
method: 'GET',
|
||
|
url: `cloudAnalysis/masterGroup/commentStatement`,
|
||
|
options: {
|
||
|
attitude,
|
||
|
topicId,
|
||
|
commentId
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 提交评论
|
||
|
* @param {String} topicId 话题id
|
||
|
* @param {String} faCommentId 父评论ID;
|
||
|
* @param {String} content 评论内容
|
||
|
*/
|
||
|
export function commentSubmit({ topicId,faCommentId,content }: RequestAPIOptionsLogin) {
|
||
|
return request({
|
||
|
method: 'POST',
|
||
|
url: `cloudAnalysis/masterGroup/commentSubmit`,
|
||
|
options: {
|
||
|
topicId,
|
||
|
faCommentId,
|
||
|
content
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 判断是否更新头像
|
||
|
*/
|
||
|
export function checkUpdateAvatar() {
|
||
|
return request({
|
||
|
method: 'GET',
|
||
|
url: `cloudAnalysis/masterGroup/checkUpdateAvatar`,
|
||
|
})
|
||
|
}
|
||
|
/**
|
||
|
* 更新头像
|
||
|
* @param {String} avatar 头像地址
|
||
|
*/
|
||
|
export function updateAvatar({ avatar }: RequestAPIOptionsLogin) {
|
||
|
return request({
|
||
|
method: 'GET',
|
||
|
url: `cloudAnalysis/masterGroup/updateAvatar`,
|
||
|
options: {
|
||
|
avatar
|
||
|
}
|
||
|
})
|
||
|
}
|