mg-ocr-invoice 0.1.2 → 0.1.4

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,18 +1,4 @@
1
- # Vue 3 + TypeScript + Vite
2
-
3
- This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
4
-
5
- ## Recommended IDE Setup
6
-
7
- - [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
8
-
9
- ## Type Support For `.vue` Imports in TS
10
-
11
- TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
12
-
13
- If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
14
-
15
- 1. Disable the built-in TypeScript Extension
16
- 1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette
17
- 2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
18
- 2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
1
+ # 0.1.2
2
+ 增加确认选择时校验发票的有效性
3
+ # "version": "0.1.4",
4
+ 请求头增加请求域名
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),
@@ -5903,7 +5906,7 @@ const processImage = async (n) => {
5903
5906
  default:
5904
5907
  return "ok";
5905
5908
  }
5906
- }, _withScopeId$1 = (n) => (pushScopeId("data-v-d452817c"), n = n(), popScopeId(), n), _hoisted_1$2 = { class: "InvoiceList" }, _hoisted_2$1 = { class: "card" }, _hoisted_3$1 = ["onClick"], _hoisted_4$1 = { class: "li" }, _hoisted_5$1 = {
5909
+ }, _withScopeId$1 = (n) => (pushScopeId("data-v-143066a8"), n = n(), popScopeId(), n), _hoisted_1$2 = { class: "InvoiceList" }, _hoisted_2$1 = { class: "card" }, _hoisted_3$1 = ["onClick"], _hoisted_4$1 = { class: "li" }, _hoisted_5$1 = {
5907
5910
  key: 0,
5908
5911
  class: "item-card"
5909
5912
  }, _hoisted_6$1 = { class: "storeName" }, _hoisted_7$1 = { class: "name" }, _hoisted_8$1 = { class: "left" }, _hoisted_9 = {
@@ -5988,10 +5991,14 @@ const processImage = async (n) => {
5988
5991
  }
5989
5992
  h.value = !1;
5990
5993
  }, $ = computed(() => g.value.filter((B) => B.selected).every((B) => B.invoiceStatus === "unused" && (B.taskStatus === "ocr_success" || B.taskStatus === "repeat" || B.taskStatus === "finish")) && g.value.filter((B) => B.selected).length > 0), D = () => {
5991
- if (y.value.length <= 0) {
5994
+ if (console.log($.value), y.value.length <= 0) {
5992
5995
  showToast({ type: "text", message: "请先选择发票" });
5993
5996
  return;
5994
5997
  }
5998
+ if (!$.value) {
5999
+ showToast({ type: "text", message: "存在无效发票,无法提交" });
6000
+ return;
6001
+ }
5995
6002
  const S = g.value.filter((B) => B.selected);
5996
6003
  a("ok", S);
5997
6004
  };
@@ -6162,7 +6169,7 @@ const processImage = async (n) => {
6162
6169
  }, 8, ["show"])
6163
6170
  ], 64));
6164
6171
  }
6165
- }), index_vue_vue_type_style_index_0_scoped_d452817c_lang = "", InvoiceList = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-d452817c"]]), _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-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" }, [
6166
6173
  /* @__PURE__ */ createElementVNode("i", { class: "iconfont icon-xiangyou" })
6167
6174
  ], -1)), _sfc_main$1 = /* @__PURE__ */ defineComponent({
6168
6175
  __name: "index",
@@ -15558,7 +15565,7 @@ const VConsole = /* @__PURE__ */ getDefaultExportFromCjs(vconsole_minExports), _
15558
15565
  api.set(
15559
15566
  "OCR_Base_URL",
15560
15567
  D.Base_URL || p || "https://invoice.imugua.team/"
15561
- );
15568
+ ), console.log(api.get("OCR_Base_URL"), "Cookies.get('OCR_Base_URL')");
15562
15569
  }, w = ref(0), y = ref(null), E = ref({}), x = ref({}), I = (D) => {
15563
15570
  y.value = D, w.value = 2;
15564
15571
  }, k = (D, L) => {
@@ -15591,7 +15598,7 @@ const VConsole = /* @__PURE__ */ getDefaultExportFromCjs(vconsole_minExports), _
15591
15598
  }, null, 8, ["ids", "invoiceData"])) : createCommentVNode("", !0)
15592
15599
  ]));
15593
15600
  }
15594
- }), index_vue_vue_type_style_index_0_scoped_0350273c_lang = "", index$1 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0350273c"]]), components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
15601
+ }), index_vue_vue_type_style_index_0_scoped_e308188e_lang = "", index$1 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e308188e"]]), components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
15595
15602
  __proto__: null,
15596
15603
  Invoice,
15597
15604
  InvoiceList,