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.
		
		
		
		
		
			
		
			
				
					
					
						
							284 lines
						
					
					
						
							5.0 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							284 lines
						
					
					
						
							5.0 KiB
						
					
					
				
								const request  = require('../../../utils/request')
							 | 
						|
								
							 | 
						|
								/**
							 | 
						|
								 * 创建社群
							 | 
						|
								 * @params {
							 | 
						|
								 *   groupNamegroupName 社群名称
							 | 
						|
								 *   groupAvatar 社群头像
							 | 
						|
								 *   groupIntroduction 社群介绍
							 | 
						|
								 * }
							 | 
						|
								 */
							 | 
						|
								export function createAssociation ({ groupName, groupAvatar, groupIntroduction }) {
							 | 
						|
								  return request.post('group/group/create', {
							 | 
						|
								    groupName,
							 | 
						|
								    groupAvatar,
							 | 
						|
								    groupIntroduction
							 | 
						|
								  })
							 | 
						|
								}
							 | 
						|
								
							 | 
						|
								/**
							 | 
						|
								 * 社群详情
							 | 
						|
								 */
							 | 
						|
								export function getAssociationDetail (id) {
							 | 
						|
								  return request.get(`group/group/detail/${id}`)
							 | 
						|
								}
							 | 
						|
								
							 | 
						|
								/**
							 | 
						|
								 * 修改群头像
							 | 
						|
								 */
							 | 
						|
								export function modifyAvatar ({id, groupAvatar}) {
							 | 
						|
								  return request.post('group/group/modifyAvatar', {
							 | 
						|
								    id,
							 | 
						|
								    groupAvatar
							 | 
						|
								  })
							 | 
						|
								}
							 | 
						|
								
							 | 
						|
								/**
							 | 
						|
								 * 解散群
							 | 
						|
								 */
							 | 
						|
								export function disbandAssociation({id, processingOpinions}) {
							 | 
						|
								  return request.post('group/group/disband', {
							 | 
						|
								    id,
							 | 
						|
								    processingOpinions
							 | 
						|
								  })
							 | 
						|
								}
							 | 
						|
								
							 | 
						|
								/**
							 | 
						|
								 * 加入社群
							 | 
						|
								 */
							 | 
						|
								
							 | 
						|
								 export function joinAssociation (groupId) {
							 | 
						|
								   return request.post('group/group/applyForGroup', {
							 | 
						|
								    groupId
							 | 
						|
								   })
							 | 
						|
								 }
							 | 
						|
								
							 | 
						|
								 /**
							 | 
						|
								  * 修改群介绍
							 | 
						|
								  */
							 | 
						|
								 export function changeIntroduce ({id, groupIntroduction}) {
							 | 
						|
								   return request.post('group/group/modifyIntroduction', {
							 | 
						|
								    id,
							 | 
						|
								    groupIntroduction
							 | 
						|
								   })
							 | 
						|
								 }
							 | 
						|
								
							 | 
						|
								 /**
							 | 
						|
								  * 群成员列表 审核通过/待审核
							 | 
						|
								  */
							 | 
						|
								 export function getAssociationMember ({groupId, state}) {
							 | 
						|
								   return request.get('group/group/listOfMember', {
							 | 
						|
								    groupId,
							 | 
						|
								    state
							 | 
						|
								   })
							 | 
						|
								 }
							 | 
						|
								
							 | 
						|
								 /**
							 | 
						|
								  * 删除群成员
							 | 
						|
								  */
							 | 
						|
								 export function deleteMember ({groupId, userId}) {
							 | 
						|
								   return request.post('group/group/removeMember', {
							 | 
						|
								    groupId,
							 | 
						|
								    userId
							 | 
						|
								   })
							 | 
						|
								 }
							 | 
						|
								
							 | 
						|
								 /**
							 | 
						|
								  * 审核入群成员
							 | 
						|
								  */
							 | 
						|
								 export function incomingVerify ({ groupId, members }) {
							 | 
						|
								   return request.post('group/group/reviewApply', {
							 | 
						|
								    groupId,
							 | 
						|
								    members
							 | 
						|
								   })
							 | 
						|
								 }
							 | 
						|
								
							 | 
						|
								 /**
							 | 
						|
								  * 添加好友列表
							 | 
						|
								  */
							 | 
						|
								 export function getInviteList ({groupId, mobile, road, lastName}) {
							 | 
						|
								   return request.get('group/group/getInviteList', {
							 | 
						|
								    groupId,
							 | 
						|
								    mobile,
							 | 
						|
								    road,
							 | 
						|
								    lastName
							 | 
						|
								   })
							 | 
						|
								 }
							 | 
						|
								
							 | 
						|
								 /**
							 | 
						|
								  * 添加好友
							 | 
						|
								  */
							 | 
						|
								 export function addMember ({ groupId, members}) {
							 | 
						|
								   return request.post('group/group/addMember', {
							 | 
						|
								    groupId,
							 | 
						|
								    members
							 | 
						|
								   })
							 | 
						|
								 }
							 | 
						|
								
							 | 
						|
								 /**
							 | 
						|
								  * 发布话题
							 | 
						|
								  */
							 | 
						|
								 export function addTopic ({topicContent, topicAddress, topicLatitude, topicLongitude, groupId, groupName, images}) {
							 | 
						|
								   return request.post('group/topic/submit', {
							 | 
						|
								    topicContent,
							 | 
						|
								    topicAddress,
							 | 
						|
								    topicLatitude,
							 | 
						|
								    topicLongitude,
							 | 
						|
								    groupId,
							 | 
						|
								    groupName,
							 | 
						|
								    images
							 | 
						|
								   })
							 | 
						|
								 }
							 | 
						|
								
							 | 
						|
								 /**
							 | 
						|
								  * 话题列表
							 | 
						|
								  */
							 | 
						|
								 export function getTopicList ({ pageIndex, pageSize, timestamp, groupId, topicId }) {
							 | 
						|
								   return request.get('group/topic/list', {
							 | 
						|
								    pageIndex,
							 | 
						|
								    pageSize,
							 | 
						|
								    timestamp,
							 | 
						|
								    groupId,
							 | 
						|
								    topicId
							 | 
						|
								   })
							 | 
						|
								 }
							 | 
						|
								
							 | 
						|
								 /**
							 | 
						|
								  * 话题详情
							 | 
						|
								  */
							 | 
						|
								export function getTopicDetail (detailId) {
							 | 
						|
								  return request.get(`group/topic/detail/${detailId}`)
							 | 
						|
								}
							 | 
						|
								
							 | 
						|
								/**
							 | 
						|
								 * 退群
							 | 
						|
								 * @param groupId
							 | 
						|
								 */
							 | 
						|
								export function withdrawGroup (groupId) {
							 | 
						|
								  return request.post('group/group/quitGroup', {
							 | 
						|
								    groupId
							 | 
						|
								  })
							 | 
						|
								}
							 | 
						|
								
							 | 
						|
								/**
							 | 
						|
								 * 评论最新最热列表
							 | 
						|
								 */
							 | 
						|
								export function getRemarkList({ pageIndex, pageSize, timestamp, orderType, topicId }) {
							 | 
						|
								  return request.get('group/comment/list', {
							 | 
						|
								    pageIndex,
							 | 
						|
								    pageSize,
							 | 
						|
								    timestamp,
							 | 
						|
								    orderType,
							 | 
						|
								    topicId
							 | 
						|
								  })
							 | 
						|
								}
							 | 
						|
								
							 | 
						|
								/**
							 | 
						|
								 * 评论或者回复
							 | 
						|
								 */
							 | 
						|
								export function remarkOrReply ({ topicId, faCommentId, content }) {
							 | 
						|
								  return request.post('group/comment/submit', {
							 | 
						|
								    topicId,
							 | 
						|
								    faCommentId,
							 | 
						|
								    content 
							 | 
						|
								  })
							 | 
						|
								}
							 | 
						|
								
							 | 
						|
								/**
							 | 
						|
								 * 话题评论 v2
							 | 
						|
								 */
							 | 
						|
								export function topicCom({ topicId, faCommentId, content }) {
							 | 
						|
								  return request.post('group/comment/topicCom', {
							 | 
						|
								    topicId,
							 | 
						|
								    faCommentId,
							 | 
						|
								    content 
							 | 
						|
								  })
							 | 
						|
								}
							 | 
						|
								/**
							 | 
						|
								 * 话题回复 v2
							 | 
						|
								 */
							 | 
						|
								export function topicReply({ topicId, faCommentId, content }) {
							 | 
						|
								  return request.post('group/comment/topicReply', {
							 | 
						|
								    topicId,
							 | 
						|
								    faCommentId,
							 | 
						|
								    content 
							 | 
						|
								  })
							 | 
						|
								}
							 | 
						|
								
							 | 
						|
								/**
							 | 
						|
								 * 关闭话题
							 | 
						|
								 */
							 | 
						|
								export function closeTopic ({ id, processingOpinions }) {
							 | 
						|
								  return request.post('group/topic/close', {
							 | 
						|
								    id,
							 | 
						|
								    processingOpinions
							 | 
						|
								  })
							 | 
						|
								}
							 | 
						|
								
							 | 
						|
								/**
							 | 
						|
								 * 分类列表
							 | 
						|
								 */
							 | 
						|
								export function getClassifyList () {
							 | 
						|
								  return request.get('events/issue/category/list')
							 | 
						|
								}
							 | 
						|
								
							 | 
						|
								/**
							 | 
						|
								 * 话题转议题
							 | 
						|
								 */
							 | 
						|
								export function changeToIssue ({ id, categoryId, advice }) {
							 | 
						|
								  return request.post('group/topic/changeToIssue', {
							 | 
						|
								    id,
							 | 
						|
								    categoryId,
							 | 
						|
								    advice
							 | 
						|
								  })
							 | 
						|
								}
							 | 
						|
								
							 | 
						|
								/**
							 | 
						|
								 * 支持/反对 表态
							 | 
						|
								 */
							 | 
						|
								export function publishStatement ({ attitude, commentId, topicId }) {
							 | 
						|
								  return request.post('group/comment/statement', {
							 | 
						|
								    attitude,
							 | 
						|
								    commentId,
							 | 
						|
								    topicId
							 | 
						|
								  })
							 | 
						|
								}
							 | 
						|
								
							 | 
						|
								/**
							 | 
						|
								 * 话题评论点赞 v2
							 | 
						|
								 */
							 | 
						|
								export function topicComLike({ attitude, commentId, topicId }) {
							 | 
						|
								  return request.post('group/comment/topicComLike', {
							 | 
						|
								    attitude,
							 | 
						|
								    commentId,
							 | 
						|
								    topicId
							 | 
						|
								  })
							 | 
						|
								}
							 | 
						|
								/**
							 | 
						|
								 * 话题评论点踩 v2
							 | 
						|
								 */
							 | 
						|
								export function topicComUnlike({ attitude, commentId, topicId }) {
							 | 
						|
								  return request.post('group/comment/topicComUnlike', {
							 | 
						|
								    attitude,
							 | 
						|
								    commentId,
							 | 
						|
								    topicId
							 | 
						|
								  })
							 | 
						|
								}
							 | 
						|
								
							 | 
						|
								/**
							 | 
						|
								 * 生成网格小程序码
							 | 
						|
								 */
							 | 
						|
								
							 | 
						|
								 export function createQRCode ({ gridId, inviteUserId }) {
							 | 
						|
								   return request.get('app-user/user/createQRCode', {
							 | 
						|
								    gridId,
							 | 
						|
								    inviteUserId
							 | 
						|
								   })
							 | 
						|
								 }
							 | 
						|
								
							 | 
						|
								 /**
							 | 
						|
								  * 获取关闭原因
							 | 
						|
								  */
							 | 
						|
								 export function getCloseReason (topicId) {
							 | 
						|
								   return request.get(`group/topic/auditRecord/${topicId}`)
							 | 
						|
								 }
							 |