import request from '@/utils/request'

// 获取商家信息
export function shopUserInfo () {
  return request({
    url: '/tmerclub_admin/m/apply_shop/shop_user/info',
    method: 'get'
  })
}

// 获取联系人
export function getConversations (userCurrent, size) {
  return request({
    url: '/tmerclub_im/m/im/conversations?pageNum=' + userCurrent + '&pageSize=' + size,
    method: 'POST'
  })
}

// 获取用户信息
export function getUserinfo (id) {
  return request({
    url: '/tmerclub_im/m/im/userInfo?userId=' + id,
    method: 'GET'
  })
}

// websocket 连接
export function get (groupActivityId) {
  return request({
    url: '/luck_group/mp/group_activity',
    method: 'get',
    params: {
      groupActivityId
    }
  })
}

export function update (data) {
  return request({
    url: '/luck_group/mp/group_activity',
    method: 'put',
    data
  })
}

export function deleteById (groupActivityId) {
  return request({
    url: '/luck_group/mp/group_activity',
    method: 'delete',
    params: {
      groupActivityId
    }
  })
}
