mg-ocr-invoice 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,2 +1,6 @@
1
1
  # 0.1.2
2
2
  增加确认选择时校验发票的有效性
3
+ # "version": "0.1.4",
4
+ 请求头增加请求域名
5
+ # "version": "0.1.5",
6
+ 将后端服务报错信息提示出来
package/dist/index.es.js CHANGED
@@ -3261,7 +3261,10 @@ function init(n, a) {
3261
3261
  var api = init(defaultConverter, { path: "/" });
3262
3262
  const instance = axios$1.create({
3263
3263
  baseURL: "https://invoice.imugua.team/",
3264
- timeout: 1e5
3264
+ timeout: 1e5,
3265
+ headers: {
3266
+ AuthDomain: window.location.host
3267
+ }
3265
3268
  });
3266
3269
  instance.interceptors.request.use(
3267
3270
  (n) => (n.baseURL = api.get("OCR_Base_URL"), n),
@@ -3276,7 +3279,7 @@ instance.interceptors.response.use(
3276
3279
  return a.code !== 200 || ((o = a.data) == null ? void 0 : o.code) !== 200 ? (showToast({
3277
3280
  type: "fail",
3278
3281
  message: a.data.msg
3279
- }), Promise.reject(n)) : n.data.data;
3282
+ }), Promise.reject(n.data.data)) : n.data.data;
3280
3283
  },
3281
3284
  function(n) {
3282
3285
  return Promise.reject(n);
@@ -5052,7 +5055,7 @@ const REPEAT_INTERVAL = 100, REPEAT_DELAY = 600, vRepeatClick = {
5052
5055
  }
5053
5056
  });
5054
5057
  var InputNumber = /* @__PURE__ */ _export_sfc$1(_sfc_main$4, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/input-number/src/input-number.vue"]]);
5055
- const ElInputNumber = withInstall(InputNumber), _withScopeId$2 = (n) => (pushScopeId("data-v-ff2762b9"), n = n(), popScopeId(), n), _hoisted_1$3 = { class: "Invoice" }, _hoisted_2$2 = { class: "top" }, _hoisted_3$2 = ["src"], _hoisted_4$2 = { class: "company" }, _hoisted_5$2 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
5058
+ const ElInputNumber = withInstall(InputNumber), _withScopeId$2 = (n) => (pushScopeId("data-v-a1d2f8d5"), n = n(), popScopeId(), n), _hoisted_1$3 = { class: "Invoice" }, _hoisted_2$2 = { class: "top" }, _hoisted_3$2 = ["src"], _hoisted_4$2 = { class: "company" }, _hoisted_5$2 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
5056
5059
  /* @__PURE__ */ createElementVNode("i"),
5057
5060
  /* @__PURE__ */ createTextVNode(),
5058
5061
  /* @__PURE__ */ createElementVNode("span", null, "公司")
@@ -5104,8 +5107,8 @@ const ElInputNumber = withInstall(InputNumber), _withScopeId$2 = (n) => (pushSco
5104
5107
  type: "success",
5105
5108
  message: "保存成功"
5106
5109
  }), a("saveSuccess"));
5107
- } catch {
5108
- showFailToast("保存失败"), a("saveSuccess");
5110
+ } catch (y) {
5111
+ showFailToast(y.msg), a("saveSuccess");
5109
5112
  }
5110
5113
  h.value = !1;
5111
5114
  };
@@ -5224,12 +5227,12 @@ const ElInputNumber = withInstall(InputNumber), _withScopeId$2 = (n) => (pushSco
5224
5227
  }, 8, ["show"])
5225
5228
  ], 64));
5226
5229
  }
5227
- }), index_vue_vue_type_style_index_0_scoped_ff2762b9_lang = "", _export_sfc = (n, a) => {
5230
+ }), index_vue_vue_type_style_index_0_scoped_a1d2f8d5_lang = "", _export_sfc = (n, a) => {
5228
5231
  const o = n.__vccOpts || n;
5229
5232
  for (const [l, p] of a)
5230
5233
  o[l] = p;
5231
5234
  return o;
5232
- }, Invoice = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-ff2762b9"]]), index$2 = "";
5235
+ }, Invoice = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-a1d2f8d5"]]), index$2 = "";
5233
5236
  /*!
5234
5237
  * Compressor.js v1.2.1
5235
5238
  * https://fengyuanchen.github.io/compressorjs
@@ -6166,7 +6169,7 @@ const processImage = async (n) => {
6166
6169
  }, 8, ["show"])
6167
6170
  ], 64));
6168
6171
  }
6169
- }), index_vue_vue_type_style_index_0_scoped_143066a8_lang = "", InvoiceList = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-143066a8"]]), _withScopeId = (n) => (pushScopeId("data-v-517ee3d5"), n = n(), popScopeId(), n), _hoisted_1$1 = { class: "PaymentMode" }, _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "title" }, "选择识别方式", -1)), _hoisted_3 = { class: "list" }, _hoisted_4 = ["onClick"], _hoisted_5 = { class: "left-text" }, _hoisted_6 = { class: "icon-left" }, _hoisted_7 = { class: "text" }, _hoisted_8 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "right-icon" }, [
6172
+ }), index_vue_vue_type_style_index_0_scoped_143066a8_lang = "", InvoiceList = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-143066a8"]]), _withScopeId = (n) => (pushScopeId("data-v-c4a3dcd2"), n = n(), popScopeId(), n), _hoisted_1$1 = { class: "PaymentMode" }, _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "title" }, "选择识别方式", -1)), _hoisted_3 = { class: "list" }, _hoisted_4 = ["onClick"], _hoisted_5 = { class: "left-text" }, _hoisted_6 = { class: "icon-left" }, _hoisted_7 = { class: "text" }, _hoisted_8 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "right-icon" }, [
6170
6173
  /* @__PURE__ */ createElementVNode("i", { class: "iconfont icon-xiangyou" })
6171
6174
  ], -1)), _sfc_main$1 = /* @__PURE__ */ defineComponent({
6172
6175
  __name: "index",
@@ -6202,7 +6205,7 @@ const processImage = async (n) => {
6202
6205
  message: "上传成功"
6203
6206
  }), a("uploadSuccess", w.data));
6204
6207
  } catch (w) {
6205
- console.log(w), showFailToast("上传失败");
6208
+ console.log(w), showFailToast(w.msg);
6206
6209
  }
6207
6210
  p.value = !1;
6208
6211
  };
@@ -6246,7 +6249,7 @@ const processImage = async (n) => {
6246
6249
  }, 8, ["show"])
6247
6250
  ], 64));
6248
6251
  }
6249
- }), index_vue_vue_type_style_index_0_scoped_517ee3d5_lang = "", PaymentMode = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-517ee3d5"]]);
6252
+ }), index_vue_vue_type_style_index_0_scoped_c4a3dcd2_lang = "", PaymentMode = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-c4a3dcd2"]]);
6250
6253
  function getUrlParams(n) {
6251
6254
  const a = {}, o = n.split("?")[1];
6252
6255
  return o && o.split("&").forEach((p) => {