"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.AMapWeatherRequest = void 0;
var _axios = _interopRequireDefault(require("axios"));
var _base = require("./base");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
class AMapWeatherRequest extends _base.RequestBase {
  async weather(params) {
    try {
      console.log(params);
      const {
        data
      } = await _axios.default.get(`${this.serverHost}/weather/weatherInfo`, {
        params
      });
      const {
        status,
        ...others
      } = data;
      return {
        status: Number(status),
        ...others
      };
    } catch (err) {
      return {
        status: 0,
        info: err.toString()
      };
    }
  }
}
exports.AMapWeatherRequest = AMapWeatherRequest;
//# sourceMappingURL=weather.js.map