@ajaxjs/ui 1.7.3 → 1.7.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.
@@ -1,5 +1,5 @@
1
1
  import * as vue from "vue";
2
- import { openBlock, createElementBlock, defineComponent, createElementVNode, createStaticVNode, normalizeClass, resolveComponent, createVNode, withCtx, toDisplayString, createTextVNode, withDefaults, defineProps, createBlock, createCommentVNode, Fragment, renderList, h, ref, renderSlot, withDirectives, vShow, vModelText, vModelRadio, vModelCheckbox, resolveDirective } from "vue";
2
+ import { openBlock, createElementBlock, defineComponent, createElementVNode, createStaticVNode, normalizeClass, resolveComponent, createVNode, withCtx, toDisplayString, createTextVNode, createBlock, createCommentVNode, Fragment, renderList, h, ref, renderSlot, withDirectives, vShow, vModelText, vModelRadio, vModelCheckbox, resolveDirective } from "vue";
3
3
  const _sfc_main$E = {}, _export_sfc = (s, a) => {
4
4
  const d = s.__vccOpts || s;
5
5
  for (const [t, p] of a)
@@ -510,9 +510,9 @@ const _sfc_main$B = defineComponent({
510
510
  },
511
511
  handleSubmit(s, { username: a, password: d }) {
512
512
  if (s) {
513
- const t = { grant_type: "password", username: a, password: d, client_id: "fvccgrfl3fzA7lrFyCpDA", client_secret: "zKvmM4Km8ghCIijl9ubqpHm1" };
514
- xhr_fetch.postForm("/iam_api/oidc/ropc_token", t, (p) => {
515
- p.status ? xhr_fetch.get("/iam_api/user/info", (y) => {
513
+ const t = { username: a, password: d, appId: window.config.appId };
514
+ xhr_fetch.postForm(`${window.config.iamApi}/user/login`, t, (p) => {
515
+ p.status ? xhr_fetch.get(`${window.config.iamApi}/user/info`, (y) => {
516
516
  console.log(y), this.msg = "登录成功", localStorage.setItem("isLoggedIn", "true"), localStorage.setItem("userInfo", JSON.stringify(y.data)), setTimeout(() => {
517
517
  this.$router.push("/?login_ok=1");
518
518
  }, 2e3);
@@ -549,7 +549,7 @@ function _sfc_render$A(s, a, d, t, p, y) {
549
549
  }, 8, ["onOnSubmit"])
550
550
  ]);
551
551
  }
552
- const Login = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__scopeId", "data-v-2149b790"]]);
552
+ const Login = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__scopeId", "data-v-f8e23caf"]]);
553
553
  var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
554
554
  function getDefaultExportFromCjs(s) {
555
555
  return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
@@ -12031,15 +12031,7 @@ function _sfc_render$z(s, a, d, t, p, y) {
12031
12031
  a[4] || (a[4] = createElementVNode("div", { class: "msg" }, null, -1))
12032
12032
  ]);
12033
12033
  }
12034
- const FileUpload = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z]]);
12035
- withDefaults(defineProps(), {
12036
- item: () => ({}),
12037
- // 为 object 类型提供默认空对象
12038
- data: () => ({}),
12039
- status: 0
12040
- // 为 number 类型提供默认值
12041
- });
12042
- const _sfc_main$z = defineComponent({
12034
+ const FileUpload = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z]]), _sfc_main$z = defineComponent({
12043
12035
  components: { FileUpload },
12044
12036
  props: {
12045
12037
  item: { type: Object, required: !0 },
@@ -14358,7 +14350,7 @@ const LoginLog = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_rende
14358
14350
  loading: !0,
14359
14351
  // 显示加载状态,防止用户重复点击
14360
14352
  onOk: () => {
14361
- xhr_fetch.postForm("/iam_api/user/login/logout", {}, (s) => {
14353
+ xhr_fetch.postForm(`${window.config.iamApi}/user/login/logout`, {}, (s) => {
14362
14354
  console.log(s), s.status ? (localStorage.removeItem("userInfo"), localStorage.removeItem("isLoggedIn"), this.$Message.success("登出成功!"), this.$Modal.remove(), setTimeout(() => {
14363
14355
  this.$router.push("/login");
14364
14356
  }, 2e3)) : console.error(s.message || "登录失败");