import request from '@/sheep/request';

const SaleApi = {
  // 申请成为商户
  createMerchant: (data) => {
    return request({
      url: '/sale/merchant-apply/create',
      method: 'POST',
      data,
      custom: {
        showSuccess: true,
        successMsg: '申请成功'
      },
    });
  },
  // 获取商户信息
  getMerchant: () => {
    return request({
      url: '/sale/merchant-apply/get',
      method: 'GET',
    });
  },
  // 变动商户信息
  updateMerchant: (data) => {
    return request({
      url: '/sale/merchant-apply/update',
      method: 'PUT',
      data,
      custom: {
        showSuccess: true,
        successMsg: '变动成功'
      },
    });
  },
  getMerchantPage: (params) => {
    return request({
      url: '/sale/merchant-apply-log/page',
      method: 'GET',
      params,
	  custom: {
	    showLoading: true,
	  },
    });
  },
  checkContactNumber: (params) => {
    return request({
      url: '/system/users/getUserMobile',
      method: 'GET',
      params,
  	  custom: {
  	    showLoading: true,
  	  },
    });
  },
  checkSystemUser: (params) => {
    return request({
      url: '/sale/merchant-apply/isSystemUserByMobile',
      method: 'GET',
      params,
  	  custom: {
  	    showLoading: true,
  	  },
    });
  },
  
};

export default SaleApi;
