/*
* Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved.
*
* https://www.mall4j.com/
*
* 未经允许，不可做商业用途！
*
* 版权所有，侵权必究！
*/
import request from '@/utils/request'

// 获取商家信息
export function shopUserInfo () {
  return request({
    url: '/mall4cloud_admin/s/apply_supplier/supplier_user/info',
    method: 'get'
  })
}

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

// 获取用户信息
export function getUserinfo (id) {
  return request({
    url: '/mall4cloud_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 uploadFile(data) {
//   return request({
//     headers: {
//       'Content-Type': 'multipart/form-data',
//       'Authorization': Vue.cookie.get('Authorization_vs') // 请求头带上token
//     },
//     url: '/luck_group/mp/group_activity',
//     method: 'post',
//     data
//   })
// }

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
    }
  })
}
