"use strict";
var common_vendor = require("../common/vendor.js");
var config_api_config = require("../config/api.config.js");
const request = async (url, config) => {
  return new Promise((resolve, reject) => {
    var _a;
    common_vendor.index.request({
      url: config_api_config.BASE_URL + url,
      method: (_a = config.method) != null ? _a : "GET",
      data: config.data || null,
      success: (res) => {
        resolve(res.data);
      },
      fail: (err) => {
        reject(err);
      }
    });
  });
};
exports.request = request;
