xyvcard-settle 0.0.45 → 0.0.47

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.
@@ -1,14 +1,14 @@
1
- import { onMounted as Q, nextTick as X, getCurrentInstance as R, unref as U, getCurrentScope as Z, onScopeDispose as ee, ref as m, watch as j, watchEffect as B, computed as H, defineComponent as te, resolveComponent as C, createElementBlock as ne, openBlock as oe, createElementVNode as u, createVNode as i, withCtx as b, withDirectives as re, normalizeStyle as le, vShow as se, withKeys as N, withModifiers as ae, createTextVNode as ie, toDisplayString as ue } from "vue";
1
+ import { onMounted as Q, nextTick as X, getCurrentInstance as R, unref as U, getCurrentScope as Z, onScopeDispose as ee, ref as m, watch as j, watchEffect as B, computed as z, defineComponent as te, resolveComponent as C, createElementBlock as ne, openBlock as oe, createElementVNode as u, createVNode as i, withCtx as b, withDirectives as re, normalizeStyle as le, vShow as se, withKeys as N, withModifiers as ae, createTextVNode as ie, toDisplayString as ue } from "vue";
2
2
  import { q as ce, _ as de } from "./qrcode-success-RhATc5cS.mjs";
3
3
  import { useI18n as pe } from "vue-i18n";
4
4
  import "element-plus";
5
5
  import { useRoute as me, useRouter as fe } from "vue-router";
6
- import { vueMetaEnv as P, useAppStore as O, useUserStore as ve, netEncrypt as ge, getCaptchaApi as he, createLoginQrcode as _e } from "jmash-core";
6
+ import { vueMetaEnv as M, useAppStore as O, useUserStore as ve, netEncrypt as ge, getCaptchaApi as he, createLoginQrcode as _e } from "jmash-core";
7
7
  import { _ as ye } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
8
- function z(e) {
8
+ function H(e) {
9
9
  return Z() ? (ee(e), !0) : !1;
10
10
  }
11
- function W(e) {
11
+ function $(e) {
12
12
  return typeof e == "function" ? e() : U(e);
13
13
  }
14
14
  const we = typeof window < "u" && typeof document < "u";
@@ -18,37 +18,37 @@ const be = Object.prototype.toString, Ce = (e) => be.call(e) === "[object Object
18
18
  function Ie(e) {
19
19
  return R();
20
20
  }
21
- function Te(e, n = !0, o) {
21
+ function Se(e, n = !0, o) {
22
22
  Ie() ? Q(e, o) : n ? e() : X(e);
23
23
  }
24
- function Se(e) {
24
+ function Te(e) {
25
25
  var n;
26
- const o = W(e);
26
+ const o = $(e);
27
27
  return (n = o == null ? void 0 : o.$el) != null ? n : o;
28
28
  }
29
- const $ = we ? window : void 0;
29
+ const x = we ? window : void 0;
30
30
  function Ve(...e) {
31
31
  let n, o, a, t;
32
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([o, a, t] = e, n = $) : [n, o, a, t] = e, !n)
32
+ if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([o, a, t] = e, n = x) : [n, o, a, t] = e, !n)
33
33
  return Ee;
34
34
  Array.isArray(o) || (o = [o]), Array.isArray(a) || (a = [a]);
35
35
  const c = [], s = () => {
36
36
  c.forEach((f) => f()), c.length = 0;
37
37
  }, d = (f, v, E, g) => (f.addEventListener(v, E, g), () => f.removeEventListener(v, E, g)), p = j(
38
- () => [Se(n), W(t)],
38
+ () => [Te(n), $(t)],
39
39
  ([f, v]) => {
40
40
  if (s(), !f)
41
41
  return;
42
42
  const E = Ce(v) ? { ...v } : v;
43
43
  c.push(
44
- ...o.flatMap((g) => a.map((T) => d(f, g, T, E)))
44
+ ...o.flatMap((g) => a.map((S) => d(f, g, S, E)))
45
45
  );
46
46
  },
47
47
  { immediate: !0, flush: "post" }
48
48
  ), _ = () => {
49
49
  p(), s();
50
50
  };
51
- return z(_), _;
51
+ return H(_), _;
52
52
  }
53
53
  function ke() {
54
54
  const e = m(!1), n = R();
@@ -58,25 +58,25 @@ function ke() {
58
58
  }
59
59
  function qe(e) {
60
60
  const n = ke();
61
- return H(() => (n.value, !!e()));
61
+ return z(() => (n.value, !!e()));
62
62
  }
63
- function Pe(e, n = {}) {
64
- const { window: o = $ } = n, a = qe(() => o && "matchMedia" in o && typeof o.matchMedia == "function");
63
+ function Ae(e, n = {}) {
64
+ const { window: o = x } = n, a = qe(() => o && "matchMedia" in o && typeof o.matchMedia == "function");
65
65
  let t;
66
66
  const c = m(!1), s = (_) => {
67
67
  c.value = _.matches;
68
68
  }, d = () => {
69
69
  t && ("removeEventListener" in t ? t.removeEventListener("change", s) : t.removeListener(s));
70
70
  }, p = B(() => {
71
- a.value && (d(), t = o.matchMedia(W(e)), "addEventListener" in t ? t.addEventListener("change", s) : t.addListener(s), c.value = t.matches);
71
+ a.value && (d(), t = o.matchMedia($(e)), "addEventListener" in t ? t.addEventListener("change", s) : t.addListener(s), c.value = t.matches);
72
72
  });
73
- return z(() => {
73
+ return H(() => {
74
74
  p(), d(), t = void 0;
75
75
  }), c;
76
76
  }
77
- function Ae(e = {}) {
77
+ function Le(e = {}) {
78
78
  const {
79
- window: n = $,
79
+ window: n = x,
80
80
  initialWidth: o = Number.POSITIVE_INFINITY,
81
81
  initialHeight: a = Number.POSITIVE_INFINITY,
82
82
  listenOrientation: t = !0,
@@ -84,22 +84,22 @@ function Ae(e = {}) {
84
84
  } = e, s = m(o), d = m(a), p = () => {
85
85
  n && (c ? (s.value = n.innerWidth, d.value = n.innerHeight) : (s.value = n.document.documentElement.clientWidth, d.value = n.document.documentElement.clientHeight));
86
86
  };
87
- if (p(), Te(p), Ve("resize", p, { passive: !0 }), t) {
88
- const _ = Pe("(orientation: portrait)");
87
+ if (p(), Se(p), Ve("resize", p, { passive: !0 }), t) {
88
+ const _ = Ae("(orientation: portrait)");
89
89
  j(_, () => p());
90
90
  }
91
91
  return { width: s, height: d };
92
92
  }
93
- const Me = { class: "login-container" }, Le = { class: "login-top flex items-center" }, Oe = { class: "qrcode-container" }, We = ["src"], $e = { class: "flex justify-between items-center w-full" }, xe = ["src"], De = 992, Ne = /* @__PURE__ */ te({
93
+ const Me = { class: "login-container" }, Pe = { class: "login-top flex items-center" }, Oe = { class: "qrcode-container" }, $e = ["src"], xe = { class: "flex justify-between items-center w-full" }, We = ["src"], De = 992, Ne = /* @__PURE__ */ te({
94
94
  __name: "index",
95
95
  setup(e) {
96
- const { t: n } = pe(), o = m(P.APP_ACTIVE), a = (r) => {
97
- r.props.name === "user" ? (M(), g()) : L(), o.value = r.props.name;
96
+ const { t: n } = pe(), o = m(M.APP_ACTIVE), a = (r) => {
97
+ r.props.name === "user" ? (L(), g()) : P(), o.value = r.props.name;
98
98
  }, t = m({
99
99
  scope: "",
100
100
  username: "",
101
101
  password: ""
102
- }), c = H(() => {
102
+ }), c = z(() => {
103
103
  const r = O().language === "en" ? "Please enter " : "请输入";
104
104
  return {
105
105
  username: [
@@ -131,8 +131,8 @@ const Me = { class: "login-container" }, Le = { class: "login-top flex items-cen
131
131
  var r;
132
132
  (r = d.value) == null || r.validate((l) => {
133
133
  l && (s.value = !0, f.login({ ...t.value, password: ge(t.value.password) }).then(() => {
134
- const y = p.query, h = y.redirect ?? P.APP_REDIRECT, w = Object.keys(y).reduce(
135
- (S, q) => (q !== "redirect" && (S[q] = y[q]), S),
134
+ const y = p.query, h = y.redirect ?? M.APP_REDIRECT, w = Object.keys(y).reduce(
135
+ (T, q) => (q !== "redirect" && (T[q] = y[q]), T),
136
136
  {}
137
137
  );
138
138
  _.push({ path: h, query: w }), g();
@@ -148,18 +148,18 @@ const Me = { class: "login-container" }, Le = { class: "login-top flex items-cen
148
148
  });
149
149
  };
150
150
  g();
151
- let T = setInterval(x, 3e3);
151
+ let S = setInterval(W, 3e3);
152
152
  const V = m({});
153
- function L() {
154
- console.log(P, "=> vueMetaEnv.APP_WECHAT_APPID"), _e().then(({ data: r }) => {
155
- V.value = r, k.value = !1, K(), T = setInterval(x, 3e3);
153
+ function P() {
154
+ _e().then(({ data: r }) => {
155
+ V.value = r, k.value = !1, K(), S = setInterval(W, 3e3);
156
156
  });
157
157
  }
158
- o.value === "qrCode" && L();
159
- function x() {
158
+ o.value === "qrCode" && P();
159
+ function W() {
160
160
  V.value.ticket && f.loginByQrcode({ ticket: V.value.ticket }).then(() => {
161
- M(), k.value = !1, V.value.qrcodeUrl = ce;
162
- const r = p.query, l = r.redirect ?? P.APP_REDIRECT, y = Object.keys(r).reduce(
161
+ L(), k.value = !1, V.value.qrcodeUrl = ce;
162
+ const r = p.query, l = r.redirect ?? M.APP_REDIRECT, y = Object.keys(r).reduce(
163
163
  (h, w) => (w !== "redirect" && (h[w] = r[w]), h),
164
164
  {}
165
165
  );
@@ -168,21 +168,21 @@ const Me = { class: "login-container" }, Le = { class: "login-top flex items-cen
168
168
  }
169
169
  let A = null;
170
170
  const k = m(!1);
171
- function M() {
172
- T && (clearInterval(T), T = null), A && (clearTimeout(A), A = null);
171
+ function L() {
172
+ S && (clearInterval(S), S = null), A && (clearTimeout(A), A = null);
173
173
  }
174
174
  function K() {
175
- M(), A = setTimeout(() => {
176
- M(), k.value = !0;
177
- }, P.APP_TIMEOUT);
175
+ L(), A = setTimeout(() => {
176
+ L(), k.value = !0;
177
+ }, M.APP_TIMEOUT);
178
178
  }
179
- const D = O(), { width: F } = Ae();
179
+ const D = O(), { width: F } = Le();
180
180
  return B(() => {
181
181
  F.value < De ? D.toggleDevice("mobile") : D.toggleDevice("desktop");
182
182
  }), (r, l) => {
183
- const y = C("lang-select"), h = C("el-tab-pane"), w = C("el-input"), S = C("el-form-item"), q = C("el-button"), G = C("el-form"), Y = C("el-tabs"), J = C("el-card");
183
+ const y = C("lang-select"), h = C("el-tab-pane"), w = C("el-input"), T = C("el-form-item"), q = C("el-button"), G = C("el-form"), Y = C("el-tabs"), J = C("el-card");
184
184
  return oe(), ne("div", Me, [
185
- u("div", Le, [
185
+ u("div", Pe, [
186
186
  l[4] || (l[4] = u("img", {
187
187
  src: de,
188
188
  class: "logo-img",
@@ -214,10 +214,10 @@ const Me = { class: "login-container" }, Le = { class: "login-top flex items-cen
214
214
  src: V.value.qrcodeUrl,
215
215
  style: le({ opacity: k.value ? 0.02 : 1 }),
216
216
  alt: "二维码"
217
- }, null, 12, We),
217
+ }, null, 12, $e),
218
218
  re(u("div", null, [
219
219
  l[6] || (l[6] = u("div", null, "二维码已过期", -1)),
220
- u("div", { onClick: L }, "点击刷新")
220
+ u("div", { onClick: P }, "点击刷新")
221
221
  ], 512), [
222
222
  [se, k.value]
223
223
  ])
@@ -238,7 +238,7 @@ const Me = { class: "login-container" }, Le = { class: "login-top flex items-cen
238
238
  rules: c.value
239
239
  }, {
240
240
  default: b(() => [
241
- i(S, { prop: "username" }, {
241
+ i(T, { prop: "username" }, {
242
242
  default: b(() => [
243
243
  i(w, {
244
244
  modelValue: t.value.username,
@@ -248,7 +248,7 @@ const Me = { class: "login-container" }, Le = { class: "login-top flex items-cen
248
248
  ]),
249
249
  _: 1
250
250
  }),
251
- i(S, { prop: "password" }, {
251
+ i(T, { prop: "password" }, {
252
252
  default: b(() => [
253
253
  i(w, {
254
254
  modelValue: t.value.password,
@@ -261,9 +261,9 @@ const Me = { class: "login-container" }, Le = { class: "login-top flex items-cen
261
261
  ]),
262
262
  _: 1
263
263
  }),
264
- i(S, { prop: "captchaCode" }, {
264
+ i(T, { prop: "captchaCode" }, {
265
265
  default: b(() => [
266
- u("div", $e, [
266
+ u("div", xe, [
267
267
  i(w, {
268
268
  style: { width: "65%" },
269
269
  modelValue: t.value.captchaCode,
@@ -276,7 +276,7 @@ const Me = { class: "login-container" }, Le = { class: "login-top flex items-cen
276
276
  src: E.value,
277
277
  onClick: g,
278
278
  alt: "验证码"
279
- }, null, 8, xe)
279
+ }, null, 8, We)
280
280
  ])
281
281
  ]),
282
282
  _: 1
@@ -307,7 +307,7 @@ const Me = { class: "login-container" }, Le = { class: "login-top flex items-cen
307
307
  ]);
308
308
  };
309
309
  }
310
- }), Ke = /* @__PURE__ */ ye(Ne, [["__scopeId", "data-v-dd9336db"]]);
310
+ }), Ke = /* @__PURE__ */ ye(Ne, [["__scopeId", "data-v-b8d707bf"]]);
311
311
  export {
312
312
  Ke as default
313
313
  };