lw-cdp-ui 1.4.70 → 1.4.71

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.
@@ -406,7 +406,7 @@ export default {
406
406
 
407
407
  //获取token
408
408
  let token = await this.$api.auth.token(data)
409
- if (this.$config.ENV) {
409
+ if (!this.$config?.PROD) {
410
410
  this.$tool.data.set('TOKEN', token)
411
411
  }
412
412
 
@@ -5079,35 +5079,35 @@ const Gd = /* @__PURE__ */ Tc(zd), Hd = "data:image/svg+xml,%3c?xml%20version='1
5079
5079
  return n.setPublicKey(e), n.encrypt(t);
5080
5080
  },
5081
5081
  async login() {
5082
- var u;
5082
+ var u, d;
5083
5083
  await this.$refs.loginForm.validate();
5084
5084
  let e = {
5085
5085
  username: this.ruleForm.user,
5086
5086
  password: this.ruleForm.password
5087
5087
  };
5088
5088
  if (this.isEncryption) {
5089
- const d = await this.$api.auth.key();
5090
- d && (e = {
5091
- username: this.encrypt(d, this.ruleForm.user),
5092
- password: this.encrypt(d, this.ruleForm.password)
5089
+ const f = await this.$api.auth.key();
5090
+ f && (e = {
5091
+ username: this.encrypt(f, this.ruleForm.user),
5092
+ password: this.encrypt(f, this.ruleForm.password)
5093
5093
  });
5094
5094
  }
5095
5095
  let t = await this.$api.auth.token(e);
5096
- this.$config.ENV && this.$tool.data.set("TOKEN", t), this.islogin = !0;
5096
+ (u = this.$config) != null && u.PROD || this.$tool.data.set("TOKEN", t), this.islogin = !0;
5097
5097
  let n = await this.$api.auth.bu();
5098
5098
  if (n.length == 0)
5099
5099
  return this.$message.warning("用户没有应用权限"), !1;
5100
5100
  this.$tool.data.set("buList", n);
5101
5101
  let r = this.$tool.data.get("buCode");
5102
- n.find((d) => d.code == r) || this.$tool.data.set("buCode", n[0].code);
5102
+ n.find((f) => f.code == r) || this.$tool.data.set("buCode", n[0].code);
5103
5103
  let o = await this.$api.auth.user();
5104
- if (!(o != null && o.userAuthInfo) && ((u = o == null ? void 0 : o.loginPage) != null && u.includes("pwdChange")))
5104
+ if (!(o != null && o.userAuthInfo) && ((d = o == null ? void 0 : o.loginPage) != null && d.includes("pwdChange")))
5105
5105
  return this.$message.warning("您的密码已过期,请修改密码!"), this.isPassword = !0, this.islogin = !1, !1;
5106
5106
  let i = [
5107
- ...new Set(o.userAuthInfo.menus.map((d) => d.split(".")[0].split("_")[0]))
5107
+ ...new Set(o.userAuthInfo.menus.map((f) => f.split(".")[0].split("_")[0]))
5108
5108
  ];
5109
5109
  o.userAuthInfo.grantedApplications = o.userAuthInfo.grantedApplications.filter(
5110
- (d) => i.includes(d.code)
5110
+ (f) => i.includes(f.code)
5111
5111
  );
5112
5112
  let l = {
5113
5113
  ...o.userAuthInfo,
@@ -5119,12 +5119,12 @@ const Gd = /* @__PURE__ */ Tc(zd), Hd = "data:image/svg+xml,%3c?xml%20version='1
5119
5119
  this.$tool.data.set("tenantId", o.userAuthInfo.tenantId), this.$tool.data.set("userAuthInfo", l), this.$store.state.user = l;
5120
5120
  let s = this.$tool.data.get("MENU_LIST") || {};
5121
5121
  if (s.menuDynamic = !!(o != null && o.menuDynamic), this.$config.MENU_DYNAMIC && (o != null && o.menuDynamic)) {
5122
- let d = await this.$api.auth.menu();
5123
- s.DYNAMIC_MENU = this.exportMenu(d);
5122
+ let f = await this.$api.auth.menu();
5123
+ s.DYNAMIC_MENU = this.exportMenu(f);
5124
5124
  }
5125
5125
  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) {
5126
- let d = await this.$api.auth.initialized();
5127
- this.$tool.data.set("zoneInitialized", d), d ? this.$router.push(this.$config.DASHBOARD_URL) : this.$router.push(this.$config.INIT_URL);
5126
+ let f = await this.$api.auth.initialized();
5127
+ this.$tool.data.set("zoneInitialized", f), f ? this.$router.push(this.$config.DASHBOARD_URL) : this.$router.push(this.$config.INIT_URL);
5128
5128
  } else
5129
5129
  this.$router.push(this.$config.DASHBOARD_URL);
5130
5130
  this.$message.success(this.t("loginPage.loginSuccess")), this.islogin = !1;
@@ -5182,7 +5182,7 @@ const Gd = /* @__PURE__ */ Tc(zd), Hd = "data:image/svg+xml,%3c?xml%20version='1
5182
5182
  }), n;
5183
5183
  }
5184
5184
  }
5185
- }, Ho = (e) => (It("data-v-d4e10dd3"), e = e(), xt(), e), Kd = { class: "login_bg" }, Wd = { class: "video-container" }, Jd = /* @__PURE__ */ Ho(() => /* @__PURE__ */ q("img", {
5185
+ }, Ho = (e) => (It("data-v-7cdd252e"), e = e(), xt(), e), Kd = { class: "login_bg" }, Wd = { class: "video-container" }, Jd = /* @__PURE__ */ Ho(() => /* @__PURE__ */ q("img", {
5186
5186
  class: "logo",
5187
5187
  src: Hd
5188
5188
  }, null, -1)), Xd = {
@@ -5543,7 +5543,7 @@ function f8(e, t, n, r, a, o) {
5543
5543
  ])
5544
5544
  ]);
5545
5545
  }
5546
- const p8 = /* @__PURE__ */ re(Yd, [["render", f8], ["__scopeId", "data-v-d4e10dd3"]]), g8 = { class: "svg-icon" }, m8 = ["xlink:href"], A8 = {
5546
+ const p8 = /* @__PURE__ */ re(Yd, [["render", f8], ["__scopeId", "data-v-7cdd252e"]]), g8 = { class: "svg-icon" }, m8 = ["xlink:href"], A8 = {
5547
5547
  __name: "index",
5548
5548
  props: {
5549
5549
  name: {