"use strict";
const common_vendor = require("../../common/vendor.js");
const common_libraries_apiLoading = require("../../common/libraries/apiLoading.js");
const gen_Apis = require("../../gen/Apis.js");
const ME_feedback_model = require("./model.js");
const common_libraries_naviHelper = require("../../common/libraries/naviHelper.js");
require("../../common/libraries/request.js");
require("../../common/store/useWatermarkStore.js");
const common_store_useWeAppAuthStore = require("../../common/store/useWeAppAuthStore.js");
require("../../common/store/useWorkStore.js");
common_store_useWeAppAuthStore.useWeAppAuthStore();
const method = {
  handleSelectType(e) {
    ME_feedback_model.useModel.formData.value.type = e == null ? void 0 : e.value;
  },
  handleSubmit() {
    var _a, _b, _c, _d, _e, _f, _g, _h;
    if (!((_c = (_b = (_a = ME_feedback_model.useModel) == null ? void 0 : _a.formData) == null ? void 0 : _b.value) == null ? void 0 : _c.type)) {
      return common_libraries_naviHelper.showToast("请选择反馈类型！");
    }
    if (!((_f = (_e = (_d = ME_feedback_model.useModel) == null ? void 0 : _d.formData) == null ? void 0 : _e.value) == null ? void 0 : _f.type)) {
      return common_libraries_naviHelper.showToast("请输入反馈建议！");
    }
    common_libraries_apiLoading.getApiLoading(gen_Apis.Apis.Customer.CustomerOpinions.Store, (_h = (_g = ME_feedback_model.useModel) == null ? void 0 : _g.formData) == null ? void 0 : _h.value).then((res) => {
      common_libraries_naviHelper.showToastBack("提交成功", 1, true);
      console.log(res);
    });
  },
  toWorkOrder() {
    common_vendor.index.navigateTo({
      url: "/WORKORDER/list/index"
    });
  }
};
exports.method = method;
