lw-cdp-ui 1.4.68 → 1.4.69

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.
@@ -401,7 +401,7 @@ export default {
401
401
 
402
402
  //获取token
403
403
  let token = await this.$api.auth.token(data)
404
- if (import.meta.env.DEV) {
404
+ if (this.$config.ENV) {
405
405
  this.$tool.data.set('TOKEN', token)
406
406
  }
407
407
 
@@ -5076,51 +5076,52 @@ const Gd = /* @__PURE__ */ Tc(Ud), Hd = "data:image/svg+xml,%3c?xml%20version='1
5076
5076
  return n.setPublicKey(e), n.encrypt(t);
5077
5077
  },
5078
5078
  async login() {
5079
- var s;
5079
+ var u;
5080
5080
  await this.$refs.loginForm.validate();
5081
5081
  let e = {
5082
5082
  username: this.ruleForm.user,
5083
5083
  password: this.ruleForm.password
5084
5084
  };
5085
5085
  if (this.isEncryption) {
5086
- const u = await this.$api.auth.key();
5087
- u && (e = {
5088
- username: this.encrypt(u, this.ruleForm.user),
5089
- password: this.encrypt(u, this.ruleForm.password)
5086
+ const d = await this.$api.auth.key();
5087
+ d && (e = {
5088
+ username: this.encrypt(d, this.ruleForm.user),
5089
+ password: this.encrypt(d, this.ruleForm.password)
5090
5090
  });
5091
5091
  }
5092
- await this.$api.auth.token(e), this.islogin = !0;
5093
- let t = await this.$api.auth.bu();
5094
- if (t.length == 0)
5092
+ let t = await this.$api.auth.token(e);
5093
+ this.$config.ENV && this.$tool.data.set("TOKEN", t), this.islogin = !0;
5094
+ let n = await this.$api.auth.bu();
5095
+ if (n.length == 0)
5095
5096
  return this.$message.warning("用户没有应用权限"), !1;
5096
- this.$tool.data.set("buList", t);
5097
- let n = this.$tool.data.get("buCode");
5098
- t.find((u) => u.code == n) || this.$tool.data.set("buCode", t[0].code);
5099
- let a = await this.$api.auth.user();
5100
- if (!(a != null && a.userAuthInfo) && ((s = a == null ? void 0 : a.loginPage) != null && s.includes("pwdChange")))
5097
+ this.$tool.data.set("buList", n);
5098
+ let r = this.$tool.data.get("buCode");
5099
+ n.find((d) => d.code == r) || this.$tool.data.set("buCode", n[0].code);
5100
+ let o = await this.$api.auth.user();
5101
+ if (!(o != null && o.userAuthInfo) && ((u = o == null ? void 0 : o.loginPage) != null && u.includes("pwdChange")))
5101
5102
  return this.$message.warning("您的密码已过期,请修改密码!"), this.isPassword = !0, this.islogin = !1, !1;
5102
- let o = [
5103
- ...new Set(a.userAuthInfo.menus.map((u) => u.split(".")[0].split("_")[0]))
5103
+ let i = [
5104
+ ...new Set(o.userAuthInfo.menus.map((d) => d.split(".")[0].split("_")[0]))
5104
5105
  ];
5105
- a.userAuthInfo.grantedApplications = a.userAuthInfo.grantedApplications.filter(
5106
- (u) => o.includes(u.code)
5106
+ o.userAuthInfo.grantedApplications = o.userAuthInfo.grantedApplications.filter(
5107
+ (d) => i.includes(d.code)
5107
5108
  );
5108
- let i = {
5109
- ...a.userAuthInfo,
5110
- combined: a.combined,
5111
- loginPage: a.loginPage,
5112
- logo: a.logo,
5113
- menuContent: a.menuContent
5109
+ let l = {
5110
+ ...o.userAuthInfo,
5111
+ combined: o.combined,
5112
+ loginPage: o.loginPage,
5113
+ logo: o.logo,
5114
+ menuContent: o.menuContent
5114
5115
  };
5115
- this.$tool.data.set("tenantId", a.userAuthInfo.tenantId), this.$tool.data.set("userAuthInfo", i), this.$store.state.user = i;
5116
- let l = this.$tool.data.get("MENU_LIST") || {};
5117
- if (l.menuDynamic = !!(a != null && a.menuDynamic), this.$config.MENU_DYNAMIC && (a != null && a.menuDynamic)) {
5118
- let u = await this.$api.auth.menu();
5119
- l.DYNAMIC_MENU = this.exportMenu(u);
5116
+ this.$tool.data.set("tenantId", o.userAuthInfo.tenantId), this.$tool.data.set("userAuthInfo", l), this.$store.state.user = l;
5117
+ let s = this.$tool.data.get("MENU_LIST") || {};
5118
+ if (s.menuDynamic = !!(o != null && o.menuDynamic), this.$config.MENU_DYNAMIC && (o != null && o.menuDynamic)) {
5119
+ let d = await this.$api.auth.menu();
5120
+ s.DYNAMIC_MENU = this.exportMenu(d);
5120
5121
  }
5121
- if (this.$tool.data.set("MENU_LIST", l), sessionStorage.setItem("easyweb_session_passport_current_user", JSON.stringify({ v: a })), sessionStorage.setItem("easyweb_session_passport_bu", JSON.stringify({ v: t[0] })), sessionStorage.setItem("easyweb_session_passport_bu_list", JSON.stringify({ v: t })), this.isInitialized) {
5122
- let u = await this.$api.auth.initialized();
5123
- this.$tool.data.set("zoneInitialized", u), u ? this.$router.push(this.$config.DASHBOARD_URL) : this.$router.push(this.$config.INIT_URL);
5122
+ if (this.$tool.data.set("MENU_LIST", s), sessionStorage.setItem("easyweb_session_passport_current_user", JSON.stringify({ v: o })), sessionStorage.setItem("easyweb_session_passport_bu", JSON.stringify({ v: n[0] })), sessionStorage.setItem("easyweb_session_passport_bu_list", JSON.stringify({ v: n })), this.isInitialized) {
5123
+ let d = await this.$api.auth.initialized();
5124
+ this.$tool.data.set("zoneInitialized", d), d ? this.$router.push(this.$config.DASHBOARD_URL) : this.$router.push(this.$config.INIT_URL);
5124
5125
  } else
5125
5126
  this.$router.push(this.$config.DASHBOARD_URL);
5126
5127
  this.$message.success(this.t("loginPage.loginSuccess")), this.islogin = !1;
@@ -5178,7 +5179,7 @@ const Gd = /* @__PURE__ */ Tc(Ud), Hd = "data:image/svg+xml,%3c?xml%20version='1
5178
5179
  }), n;
5179
5180
  }
5180
5181
  }
5181
- }, Ho = (e) => (It("data-v-fb754c9f"), e = e(), xt(), e), Kd = { class: "login_bg" }, Wd = { class: "video-container" }, Jd = /* @__PURE__ */ Ho(() => /* @__PURE__ */ q("img", {
5182
+ }, Ho = (e) => (It("data-v-2316da57"), e = e(), xt(), e), Kd = { class: "login_bg" }, Wd = { class: "video-container" }, Jd = /* @__PURE__ */ Ho(() => /* @__PURE__ */ q("img", {
5182
5183
  class: "logo",
5183
5184
  src: Hd
5184
5185
  }, null, -1)), Xd = {
@@ -5539,7 +5540,7 @@ function f8(e, t, n, r, a, o) {
5539
5540
  ])
5540
5541
  ]);
5541
5542
  }
5542
- const p8 = /* @__PURE__ */ re(Yd, [["render", f8], ["__scopeId", "data-v-fb754c9f"]]), g8 = { class: "svg-icon" }, m8 = ["xlink:href"], A8 = {
5543
+ const p8 = /* @__PURE__ */ re(Yd, [["render", f8], ["__scopeId", "data-v-2316da57"]]), g8 = { class: "svg-icon" }, m8 = ["xlink:href"], A8 = {
5543
5544
  __name: "index",
5544
5545
  props: {
5545
5546
  name: {