// 用户模块

// 获取用户列表
export const getUserList = {
  url: '/user/userList/page',
  method: 'GET',
  dealReqData: ({ uid, account, pageNum, pageSize }) => {
    return { uid, account, pageNum, pageSize }
  }
}

// 清除用户认证信息
export const clearUserAuthInfo = {
  url: '/account/manger/clearAuthInfo',
  method: 'DELETE',
  dealReqData: ({ uid }) => {
    return { uid }
  }
}

// 更新用户邀请码
export const updateUserInviteCode = {
  url: '/account/manger/updateInvitePeople',
  method: 'PUT',
  dealReqData: ({ uid, inviteUid }) => {
    return { uid, inviteUid }
  }
}

// 更新用户状态
export const updateUserStatus = {
  url: '/user/userList/lock',
  method: 'PUT',
  dealReqData: ({ uid, lock }) => {
    return { uid, lock }
  }
}

// 商户列表查询
export const getMerchantList = {
  url: '/userCenterMerchant/merchantList/page',
  method: 'GET',
  dealReqData: ({ merchantId, account, linkMan, pageNum, pageSize }) => {
    return { merchantId, account, linkMan, pageNum, pageSize }
  }
}

// 查询商户IDCard
export const searchMerchangIdCard = {
  url: '/userCenterMerchant/merchantCheck/getIdCard',
  method: 'GET',
  dealReqData: ({ registerPhone }) => {
    return { registerPhone }
  }
}

// 更新用户状态
export const updateMerchantStatus = {
  url: '/userCenterMerchant/merchantList/lock',
  method: 'PUT',
  dealReqData: ({ merchantId, lock }) => {
    return { merchantId, lock }
  }
}

// 查询商户审核列表
export const getMerchantCheckList = {
  url: '/userCenterMerchant/merchantCheck/page',
  method: 'GET',
  dealReqData: ({ merchantId, account, linkMan, pageNum, pageSize }) => {
    return { merchantId, account, linkMan, pageNum, pageSize }
  }
}
// 商户审核结果
export const checkMerchant = {
  url: '/userCenterMerchant/merchantCheck/check',
  method: 'PUT',
  dealReqData: ({ merchantId, check, reason }) => {
    return { merchantId, check, reason }
  }
}

// 重置商户登录密码

export const resetMerchantPwd = {
  url: '/userCenterMerchant/merchantList/resetLoginPwd',
  method: 'PUT',
  dealUrl: (url, account) => {
    return `${url}/${account}`
  }
}

// 获取商户设置列表
export const getMerchantConfigList = {
  url: '/userCenterMerchant/merchantSettings/list',
  method: 'GET'
}

// 编辑商户设置某些值
export const editMerchantConfig = {
  url: '/userCenterMerchant/merchantSettings/edit',
  method: 'POST',
  dealReqData: (form) => {
    return form
  }
}

// 获取用户设置列表
export const getMemberList = {
  url: '/member/memberSettings/list',
  method: 'GET'
}

// 编辑用户某些值
export const editMemberConfig = {
  url: '/member/memberSettings/edit',
  method: 'POST',
  dealReqData: (form) => {
    return form
  }
}
