"use strict";
const common_vendor = require("../common/vendor.js");
let baseURL = "";
{
  baseURL = "https://app.valuefrontier.cn";
}
function get(url, params) {
  return new Promise((resolve, reject) => {
    let token = common_vendor.index.getStorageSync("token");
    common_vendor.index.request({
      url: baseURL + url,
      data: params,
      header: {
        "Accept": "application/json",
        "Content-Type": "application/x-www-form-urlencoded",
        "token": token ? token : ""
      },
      method: "GET",
      success: (response) => {
        common_vendor.index.__f__("log", "at request/http.js:34", response);
        if (response.data.code == -200) {
          common_vendor.index.navigateTo({
            url: "/pages/login/login"
          });
        } else {
          resolve(response.data);
        }
      },
      fail: (error) => {
        reject(error.response);
      }
    });
  });
}
exports.get = get;
//# sourceMappingURL=../../.sourcemap/mp-weixin/request/http.js.map
