"use strict";
const common_vendor = require("../../common/vendor.js");
const config_request = require("../../config/request.js");
const useFrontEndConfigVersion = async () => {
  return new Promise((resolve) => {
    common_vendor.index.request({
      url: `${config_request.BASE_URL}api/smallproFrontEndConfigVersion/localConfig.do`,
      method: "GET",
      data: {},
      success(resp) {
        if (common_vendor.index.getStorageSync("frontEndConfigVersion") == resp.data.frontEndConfigVersion) {
          common_vendor.index.setStorageSync("frontEndConfigRequest", false);
        } else {
          common_vendor.index.setStorageSync("frontEndConfigRequest", true);
          common_vendor.index.setStorageSync("frontEndConfigVersion", resp.data.frontEndConfigVersion);
        }
        resolve(false);
      },
      fail(error) {
        common_vendor.index.setStorageSync("frontEndConfigRequest", true);
        resolve(false);
      }
    });
  });
};
exports.useFrontEndConfigVersion = useFrontEndConfigVersion;
//# sourceMappingURL=../../../.sourcemap/mp-alipay/hook/use-front-end-config-version/index.js.map
