@indfnd/common-mobile 1.0.22 → 1.0.23
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 +2 -0
- package/dist/ind-common-mobile.es.js +30 -16
- package/dist/ind-common-mobile.umd.cjs +7 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
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.23](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v1.0.22...v1.0.23) (2026-01-22)
|
|
6
|
+
|
|
5
7
|
### [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
8
|
|
|
7
9
|
### [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)
|
|
@@ -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.
|
|
6
|
+
const version$2 = "1.0.22";
|
|
7
7
|
const author$1 = "huxuetong";
|
|
8
8
|
const publishConfig = {
|
|
9
9
|
registry: "https://registry.npmjs.org/"
|
|
@@ -31535,18 +31535,30 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
|
|
|
31535
31535
|
}
|
|
31536
31536
|
}
|
|
31537
31537
|
}
|
|
31538
|
+
async function tryPluginLogin() {
|
|
31539
|
+
try {
|
|
31540
|
+
token = await pluginLogin(store2);
|
|
31541
|
+
store2.dispatch("loginSuccess", token);
|
|
31542
|
+
return token;
|
|
31543
|
+
} catch (e) {
|
|
31544
|
+
console.log("tryPluginLogin error", e);
|
|
31545
|
+
return false;
|
|
31546
|
+
}
|
|
31547
|
+
}
|
|
31538
31548
|
const code2 = getQueryVariable("code");
|
|
31539
31549
|
if (typeof window.Code != "undefined" || code2 || isHb$1) {
|
|
31540
31550
|
if (!token) {
|
|
31541
|
-
|
|
31542
|
-
|
|
31543
|
-
|
|
31551
|
+
if (await tryPluginLogin()) {
|
|
31552
|
+
await _renderRoutes();
|
|
31553
|
+
}
|
|
31544
31554
|
} else {
|
|
31545
31555
|
if (!await checkLogin()) {
|
|
31546
|
-
|
|
31547
|
-
|
|
31556
|
+
if (await tryPluginLogin()) {
|
|
31557
|
+
await _renderRoutes();
|
|
31558
|
+
}
|
|
31559
|
+
} else {
|
|
31560
|
+
await _renderRoutes();
|
|
31548
31561
|
}
|
|
31549
|
-
await _renderRoutes();
|
|
31550
31562
|
}
|
|
31551
31563
|
} else {
|
|
31552
31564
|
if (!token && to.name !== LOGIN_PAGE_NAME) {
|
|
@@ -31558,10 +31570,14 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
|
|
|
31558
31570
|
} else {
|
|
31559
31571
|
console.log("router8");
|
|
31560
31572
|
if (!await checkLogin()) {
|
|
31561
|
-
|
|
31562
|
-
|
|
31573
|
+
if (await tryPluginLogin()) {
|
|
31574
|
+
await _renderRoutes();
|
|
31575
|
+
} else {
|
|
31576
|
+
console.log("router9");
|
|
31577
|
+
}
|
|
31578
|
+
} else {
|
|
31579
|
+
await _renderRoutes();
|
|
31563
31580
|
}
|
|
31564
|
-
await _renderRoutes();
|
|
31565
31581
|
}
|
|
31566
31582
|
}
|
|
31567
31583
|
});
|
|
@@ -31575,10 +31591,7 @@ const pluginLogin = (store2) => {
|
|
|
31575
31591
|
let code2 = getQueryVariable("code");
|
|
31576
31592
|
let singleLoginPromise = singleLoginPromiseMapping[code2];
|
|
31577
31593
|
if (singleLoginPromise) {
|
|
31578
|
-
|
|
31579
|
-
title: "\u63D0\u793A",
|
|
31580
|
-
message: "\u4E0D\u77E5\u9053\u4EC0\u4E48\u539F\u56E0\u5BFC\u81F4pluginLogin\u91CD\u590D\u6267\u884C\uFF01\uFF01\uFF01"
|
|
31581
|
-
});
|
|
31594
|
+
console.log("\u91CD\u590D\u4F7F\u7528\u4E86code\u521B\u5EFA\u4F1A\u8BDD\uFF01");
|
|
31582
31595
|
return singleLoginPromise;
|
|
31583
31596
|
}
|
|
31584
31597
|
singleLoginPromise = singleLoginPromiseMapping[code2] = new Promise((resolve, reject) => {
|
|
@@ -31663,7 +31676,7 @@ window.getQueryVariable = function getQueryVariable2(variable) {
|
|
|
31663
31676
|
return false;
|
|
31664
31677
|
};
|
|
31665
31678
|
const checkLogin = async () => {
|
|
31666
|
-
var _a;
|
|
31679
|
+
var _a, _b;
|
|
31667
31680
|
if (localStorage.getItem("whoisyourdaddy") == "1") {
|
|
31668
31681
|
return Promise.resolve(true);
|
|
31669
31682
|
}
|
|
@@ -31675,7 +31688,8 @@ const checkLogin = async () => {
|
|
|
31675
31688
|
token
|
|
31676
31689
|
}
|
|
31677
31690
|
});
|
|
31678
|
-
|
|
31691
|
+
console.log(((_a = resp.data) == null ? void 0 : _a.code) == 1 ? "\u6709\u4F1A\u8BDD\u4E86\uFF01" : "\u6CA1\u6709\u4F1A\u8BDD\u3002\u3002\u3002");
|
|
31692
|
+
return ((_b = resp.data) == null ? void 0 : _b.code) == 1;
|
|
31679
31693
|
} catch (e) {
|
|
31680
31694
|
console.log("getLoginData e", e);
|
|
31681
31695
|
Message.error({ content: "\u6821\u9A8C\u4F1A\u8BDD\u5F02\u5E38\uFF01", duration: 10, closable: true });
|