sooyie-pgss 0.0.2 → 0.0.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.
Files changed (45) hide show
  1. package/dist/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
  2. package/dist/apiCall-DGnOSgOg.mjs +223 -0
  3. package/dist/{app-info-BbQUujMP.mjs → app-info-CUc39-ny.mjs} +1 -1
  4. package/dist/{app-info.vue_vue_type_script_setup_true_lang-CILQM5Dm.mjs → app-info.vue_vue_type_script_setup_true_lang-CgJRP6lc.mjs} +57 -55
  5. package/dist/{constant-D4fRv058.mjs → constant--xMn450l.mjs} +6 -5
  6. package/dist/{edit-Dhe1Mlih.mjs → edit-BlxqUB6-.mjs} +5 -4
  7. package/dist/{edit-DlJbNEVn.mjs → edit-Cla0dDdI.mjs} +8 -7
  8. package/dist/edit-ivH-z1iI.mjs +436 -0
  9. package/dist/image-CROZrkNB.mjs +103 -0
  10. package/dist/index-B79zNTjd.mjs +1918 -0
  11. package/dist/index-BCe402UQ.mjs +107 -0
  12. package/dist/{index-B4yFC5Qp.mjs → index-BXMXyvNp.mjs} +24 -23
  13. package/dist/{index-CoKl3CjE.mjs → index-CFfRjdwg.mjs} +27 -26
  14. package/dist/{index-quJUd8pu.mjs → index-CRPSCe9-.mjs} +156 -152
  15. package/dist/{index-BQctarUx.mjs → index-CcJJYhrX.mjs} +27 -26
  16. package/dist/index-CeyTmMNJ.mjs +109 -0
  17. package/dist/index-Cg4ZTneB.mjs +363 -0
  18. package/dist/{index-B2aeDXDI.mjs → index-D0X52CmM.mjs} +176 -173
  19. package/dist/index-D_e-YTyb.mjs +175 -0
  20. package/dist/index-DmqVT2Yh.mjs +43857 -0
  21. package/dist/index-MA9jC8ZF.mjs +109 -0
  22. package/dist/index.mjs +3039 -4
  23. package/dist/{info-BcEJCDoh.mjs → info-CshC_g3m.mjs} +5 -4
  24. package/dist/{info-B3MSviL1.mjs → info-_AfeplKG.mjs} +45 -44
  25. package/dist/{resetPwd-C00poFAP.mjs → resetPwd-CeTAHbCm.mjs} +1 -1
  26. package/dist/{resetPwd.vue_vue_type_script_setup_true_lang-jrWExNFq.mjs → resetPwd.vue_vue_type_script_setup_true_lang-Dx51Xvte.mjs} +1 -1
  27. package/dist/{simulateNum-p0ftrVo6.mjs → simulateNum-DcFDMOSh.mjs} +1 -1
  28. package/dist/{simulateNum.vue_vue_type_script_setup_true_lang-DY_YkKUO.mjs → simulateNum.vue_vue_type_script_setup_true_lang-ALzj6Sj-.mjs} +1 -1
  29. package/dist/style.css +1 -1
  30. package/dts/src/api/pgss/index.d.ts +1 -0
  31. package/dts/src/api/pgss/pgss-user-portrait/types.d.ts +1 -1
  32. package/dts/src/constant.d.ts +1 -0
  33. package/dts/src/index.d.ts +1 -2
  34. package/dts/src/lang/pgss/zh-cn.d.ts +1 -0
  35. package/dts/src/router/index.d.ts +1 -0
  36. package/dts/src/views/pgss/pgss-app-info/edit.vue.d.ts +1 -1
  37. package/dts/src/views/pgss/pgss-login/index.vue.d.ts +2 -0
  38. package/dts/src/views/pgss/pgss-prompt-template/edit.vue.d.ts +1 -1
  39. package/dts/src/views/pgss/pgss-prompt-template-custom/edit.vue.d.ts +1 -1
  40. package/dts/src/views/pgss/pgss-user-portrait/simulateNum.vue.d.ts +1 -1
  41. package/package.json +1 -1
  42. package/dist/edit-DCqiYilp.mjs +0 -417
  43. package/dist/index-CRP6JuIH.mjs +0 -1932
  44. package/dist/index-D7pM0eGF.mjs +0 -47526
  45. package/dist/index-DmneBhrk.mjs +0 -326
@@ -0,0 +1,175 @@
1
+ import { defineComponent as E, ref as f, computed as q, resolveComponent as i, openBlock as R, createElementBlock as k, createElementVNode as n, createVNode as t, withCtx as a, withKeys as y, withModifiers as I, createTextVNode as K } from "vue";
2
+ import { useRoute as P, useRouter as U } from "vue-router";
3
+ import { useUserStore as A, useAppStore as B, getCaptchaApi as N, netEncrypt as S, vueMetaEnv as T } from "jmash-core";
4
+ import "element-plus";
5
+ import { useI18n as M } from "vue-i18n";
6
+ import { _ as j } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
7
+ const z = { class: "login-container" }, D = { class: "login-form-wrapper" }, L = { class: "login-form-bg" }, O = { class: "login-form" }, Q = { class: "captcha" }, F = /* @__PURE__ */ E({
8
+ __name: "index",
9
+ setup(G) {
10
+ const { t: _ } = M(), C = P(), V = U(), x = A(), g = f(!1), h = f(), r = f({
11
+ scope: "",
12
+ username: "",
13
+ password: ""
14
+ }), b = q(() => {
15
+ const o = B().language === "en" ? "Please enter " : "请输入";
16
+ return {
17
+ username: [
18
+ {
19
+ required: !0,
20
+ trigger: "blur",
21
+ message: `${o}${_("login.username")}`
22
+ }
23
+ ],
24
+ password: [
25
+ {
26
+ required: !0,
27
+ trigger: "blur",
28
+ validator: (e, s, l) => {
29
+ s.length < 5 ? l(new Error("The password can not be less than 5 digits")) : l();
30
+ },
31
+ message: `${o}${_("login.password")}`
32
+ }
33
+ ],
34
+ captchaCode: [
35
+ {
36
+ required: !0,
37
+ trigger: "blur",
38
+ message: `${o}${_("login.captchaCode")}`
39
+ }
40
+ ]
41
+ };
42
+ }), w = f(""), d = () => {
43
+ N().then(({ data: o }) => {
44
+ r.value.captchaKey = o.captchaId, w.value = o.base64Image;
45
+ });
46
+ };
47
+ d();
48
+ const v = () => {
49
+ var o;
50
+ (o = h.value) == null || o.validate((e) => {
51
+ e && (g.value = !0, x.login({ ...r.value, password: S(r.value.password) }).then(() => {
52
+ const s = C.query, l = s.redirect ?? T.APP_REDIRECT, u = Object.keys(s).reduce(
53
+ (m, c) => (c !== "redirect" && (m[c] = s[c]), m),
54
+ {}
55
+ );
56
+ V.push({ path: l, query: u }), d();
57
+ }).catch(() => {
58
+ d();
59
+ }).finally(() => {
60
+ g.value = !1;
61
+ }));
62
+ });
63
+ };
64
+ return (o, e) => {
65
+ const s = i("svg-icon"), l = i("el-input"), u = i("el-form-item"), m = i("el-image"), c = i("el-button"), $ = i("el-form");
66
+ return R(), k("div", z, [
67
+ n("div", D, [
68
+ n("div", L, [
69
+ n("div", O, [
70
+ e[5] || (e[5] = n("div", { class: "login-form-header" }, [
71
+ n("div", { class: "login-form-title" }, "欢迎登录")
72
+ ], -1)),
73
+ t($, {
74
+ ref_key: "formRef",
75
+ ref: h,
76
+ model: r.value,
77
+ rules: b.value,
78
+ size: "large"
79
+ }, {
80
+ default: a(() => [
81
+ t(l, {
82
+ ref: "username",
83
+ modelValue: r.value.username,
84
+ "onUpdate:modelValue": e[0] || (e[0] = (p) => r.value.username = p),
85
+ placeholder: o.$t("login.username"),
86
+ name: "username"
87
+ }, {
88
+ prefix: a(() => [
89
+ t(s, { "icon-class": "user" })
90
+ ]),
91
+ _: 1
92
+ }, 8, ["modelValue", "placeholder"]),
93
+ t(u, {
94
+ prop: "password",
95
+ class: "el-form-item__content"
96
+ }, {
97
+ default: a(() => [
98
+ t(l, {
99
+ modelValue: r.value.password,
100
+ "onUpdate:modelValue": e[1] || (e[1] = (p) => r.value.password = p),
101
+ type: "password",
102
+ placeholder: "请输入密码",
103
+ "show-password": "",
104
+ onKeyup: y(v, ["enter"])
105
+ }, {
106
+ prefix: a(() => [
107
+ t(s, { "icon-class": "password" })
108
+ ]),
109
+ _: 1
110
+ }, 8, ["modelValue"])
111
+ ]),
112
+ _: 1
113
+ }),
114
+ t(u, {
115
+ prop: "captchaCode",
116
+ class: "el-form-item__content"
117
+ }, {
118
+ default: a(() => [
119
+ t(l, {
120
+ modelValue: r.value.captchaCode,
121
+ "onUpdate:modelValue": e[2] || (e[2] = (p) => r.value.captchaCode = p),
122
+ "auto-complete": "off",
123
+ placeholder: o.$t("login.captchaCode"),
124
+ class: "w-[60%]",
125
+ onKeyup: y(v, ["enter"])
126
+ }, {
127
+ prefix: a(() => [
128
+ t(s, { "icon-class": "captcha" })
129
+ ]),
130
+ _: 1
131
+ }, 8, ["modelValue", "placeholder"]),
132
+ n("div", Q, [
133
+ t(m, {
134
+ src: w.value,
135
+ class: "w-[130px] h-[50px] cursor-pointer",
136
+ onClick: d
137
+ }, {
138
+ error: a(() => [...e[3] || (e[3] = [
139
+ n("div", { class: "image-slot" }, null, -1)
140
+ ])]),
141
+ _: 1
142
+ }, 8, ["src"])
143
+ ])
144
+ ]),
145
+ _: 1
146
+ }),
147
+ t(u, { class: "el-form-item__content" }, {
148
+ default: a(() => [
149
+ t(c, {
150
+ loading: g.value,
151
+ type: "primary",
152
+ class: "w-full login-btn",
153
+ onClick: I(v, ["prevent"])
154
+ }, {
155
+ default: a(() => [...e[4] || (e[4] = [
156
+ K(" 登录 ", -1)
157
+ ])]),
158
+ _: 1
159
+ }, 8, ["loading"])
160
+ ]),
161
+ _: 1
162
+ })
163
+ ]),
164
+ _: 1
165
+ }, 8, ["model", "rules"])
166
+ ])
167
+ ])
168
+ ])
169
+ ]);
170
+ };
171
+ }
172
+ }), ee = /* @__PURE__ */ j(F, [["__scopeId", "data-v-c9348877"]]);
173
+ export {
174
+ ee as default
175
+ };