var e = require("../../common/vendor.js"),
  r = require("../../hooks/onMounted.js"),
  n = require("../../service/index.js"),
  i = require("../../utils/util.js"),
  o = require("../../utils/navigate.js");
require("../../hooks/useState.js"),
  require("../../store/app/index.js"),
  require("../../enums/index.js"),
  require("../../data/index.js"),
  require("../../utils/request.js"),
  require("../../config/index.js"),
  require("../../constant/index.js");
var t = {
    __name: "index",
    setup: function (t) {
      var u = e.ref(""),
        a = function (e) {
          u.value = e.detail.value;
        },
        s = function () {
          u.value
            ? u.value.length < 20
              ? i.showToast("请输入正确的订单编号")
              : (i.showLoading(),
                n
                  .getOrderDetail({ order_no: u.value })
                  .then(function (e) {
                    o.navigateTo({
                      url: "/pages/order-detail/index",
                      params: { orderNo: e.order_no, productName: "彩蛋查询" },
                    });
                  })
                  .catch(function () {
                    i.showToast("订单不存在，请重新输入订单编号");
                  })
                  .finally(function () {
                    i.hideLoading();
                  }))
            : i.showToast("请输入订单编号");
        };
      return (
        r.onMounted(function () {}, !1),
        function (r, n) {
          return { a: u.value, b: e.o(a), c: e.o(s) };
        }
      );
    },
  },
  u = e._export_sfc(t, [["__scopeId", "data-v-a2957840"]]);
wx.createPage(u);
