"use strict";
const common_vendor = require("../../../common/vendor.js");
const gen_Apis = require("../../../gen/Apis.js");
const INDEX_visitor_applies_list_model = require("./model.js");
require("../../../common/libraries/request.js");
const common_store_useWeAppAuthStore = require("../../../common/store/useWeAppAuthStore.js");
require("../../../common/store/useWorkStore.js");
const common_libraries_apiLoading = require("../../../common/libraries/apiLoading.js");
require("../../../common/libraries/userUserLogin.js");
common_store_useWeAppAuthStore.useWeAppAuthStore();
const getList = () => {
  var _a, _b;
  common_libraries_apiLoading.getApiLoading(gen_Apis.Apis.Visitor.VisitorApplies.Applies, (_b = (_a = INDEX_visitor_applies_list_model.useModel) == null ? void 0 : _a.formData) == null ? void 0 : _b.value).then((res) => {
    INDEX_visitor_applies_list_model.useModel.listData.value = [...INDEX_visitor_applies_list_model.useModel.listData.value, ...res.data];
    INDEX_visitor_applies_list_model.useModel.metaData.value = res.meta;
    console.log(res);
  });
};
const method = {
  getList,
  loadMore(page) {
    INDEX_visitor_applies_list_model.useModel.formData.value.page = page;
    this.getList();
  },
  showPassedDoc(res) {
    common_vendor.index.navigateTo({
      url: `/ME/release_items/show/index?id=${res == null ? void 0 : res.id}`
    });
  }
};
exports.method = method;
