@indfnd/common-mobile 1.0.20 → 1.0.22

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.0.22](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v1.0.21...v1.0.22) (2026-01-22)
6
+
7
+ ### [1.0.21](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v1.0.20...v1.0.21) (2026-01-21)
8
+
5
9
  ### [1.0.20](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v1.0.19...v1.0.20) (2026-01-21)
6
10
 
7
11
 
@@ -3,7 +3,7 @@ import { getQuarterNum, getHalfYearNum, formatDate, useConfig, getLocalStorage,
3
3
  import Vue$1 from "vue";
4
4
  import { DropdownMenu as DropdownMenu$1, DropdownItem as DropdownItem$1, Message, LoadingBar, Spin } from "view-design";
5
5
  const name$1 = "@indfnd/common-mobile";
6
- const version$2 = "1.0.19";
6
+ const version$2 = "1.0.21";
7
7
  const author$1 = "huxuetong";
8
8
  const publishConfig = {
9
9
  registry: "https://registry.npmjs.org/"
@@ -31427,9 +31427,8 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
31427
31427
  Debug();
31428
31428
  const LOGIN_PAGE_NAME = config.loginRouteName;
31429
31429
  const routerOptionsBak = _.cloneDeep(router.options);
31430
- const code2 = getQueryVariable("code");
31431
31430
  window.sessionNotValidHandler = async function() {
31432
- if (typeof window.Code != "undefined" || code2 || isHb$1) {
31431
+ if (typeof window.Code != "undefined" || isHb$1) {
31433
31432
  try {
31434
31433
  await pluginLogin(store2);
31435
31434
  } catch (e) {
@@ -31536,8 +31535,8 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
31536
31535
  }
31537
31536
  }
31538
31537
  }
31539
- const code3 = getQueryVariable("code");
31540
- if (typeof window.Code != "undefined" || code3 || isHb$1) {
31538
+ const code2 = getQueryVariable("code");
31539
+ if (typeof window.Code != "undefined" || code2 || isHb$1) {
31541
31540
  if (!token) {
31542
31541
  token = await pluginLogin(store2);
31543
31542
  store2.dispatch("loginSuccess", token);
@@ -31571,19 +31570,29 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
31571
31570
  window.scrollTo(0, 0);
31572
31571
  });
31573
31572
  }
31573
+ let singleLoginPromiseMapping = {};
31574
31574
  const pluginLogin = (store2) => {
31575
- sessionStorage.removeItem("lambo-token");
31576
- sessionStorage.removeItem("sso_token");
31577
- sessionStorage.removeItem("userInfo");
31578
- localStorage.removeItem("v8-token");
31579
- localStorage.removeItem("userId");
31580
- localStorage.removeItem("userInfo");
31581
- Cookie.set("lambo-sso-key", "", 1);
31582
- Cookie.set("TOKEN_KEY", "", 1);
31583
- store2.commit("setUserName", "");
31584
- store2.commit("setToken", "");
31585
- if (isHb$1) {
31586
- return new Promise((resolve, reject) => {
31575
+ let code2 = getQueryVariable("code");
31576
+ let singleLoginPromise = singleLoginPromiseMapping[code2];
31577
+ if (singleLoginPromise) {
31578
+ Dialog.alert({
31579
+ title: "\u63D0\u793A",
31580
+ message: "\u4E0D\u77E5\u9053\u4EC0\u4E48\u539F\u56E0\u5BFC\u81F4pluginLogin\u91CD\u590D\u6267\u884C\uFF01\uFF01\uFF01"
31581
+ });
31582
+ return singleLoginPromise;
31583
+ }
31584
+ singleLoginPromise = singleLoginPromiseMapping[code2] = new Promise((resolve, reject) => {
31585
+ sessionStorage.removeItem("lambo-token");
31586
+ sessionStorage.removeItem("sso_token");
31587
+ sessionStorage.removeItem("userInfo");
31588
+ localStorage.removeItem("v8-token");
31589
+ localStorage.removeItem("userId");
31590
+ localStorage.removeItem("userInfo");
31591
+ Cookie.set("lambo-sso-key", "", 1);
31592
+ Cookie.set("TOKEN_KEY", "", 1);
31593
+ store2.commit("setUserName", "");
31594
+ store2.commit("setToken", "");
31595
+ if (isHb$1) {
31587
31596
  let url = location.protocol + "//" + location.host + "/scyxgateway/ind-uc-ext-server/sso/hb/ssoHbWxLogin";
31588
31597
  axios$3.get(url).then(async (resp) => {
31589
31598
  setToken(resp.token);
@@ -31594,11 +31603,8 @@ const pluginLogin = (store2) => {
31594
31603
  console.log("\u83B7\u53D6token\u5F02\u5E38", e);
31595
31604
  reject(0);
31596
31605
  });
31597
- });
31598
- } else {
31599
- return new Promise((resolve, reject) => {
31606
+ } else {
31600
31607
  console.log("1111`111");
31601
- const code2 = getQueryVariable("code");
31602
31608
  if (code2) {
31603
31609
  axios$3.get("/ind-uc-ext-server/sso/xtbg/auth/appLogin?code=" + code2).then(async (resp) => {
31604
31610
  setToken(resp.token);
@@ -31630,8 +31636,9 @@ const pluginLogin = (store2) => {
31630
31636
  });
31631
31637
  };
31632
31638
  }
31633
- });
31634
- }
31639
+ }
31640
+ });
31641
+ return singleLoginPromise;
31635
31642
  };
31636
31643
  window.getQueryVariable = function getQueryVariable2(variable) {
31637
31644
  var query = window.location.search.substring(1);