import request from '@/utils/request';
import { encryptData } from '@/utils/encrypt';

/**
 * 加密请求参数的POST请求
 */
export function postEncryptRequest (url, data) {
  return request({
    data: { encryptData: encryptData(data) },
    url: url,
    method: 'post',
  });
};

/**
 * 加密请求参数的PUT请求
 */
export function putEncryptRequest (url, data) {
  return request({
    data: { encryptData: encryptData(data) },
    url: url,
    method: 'put',
  });
};
