@indfnd/common-mobile 0.0.58 → 0.0.60

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,15 @@
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
+ ### [0.0.60](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.59...v0.0.60) (2024-11-12)
6
+
7
+ ### [0.0.59](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.58...v0.0.59) (2024-11-12)
8
+
9
+
10
+ ### Features
11
+
12
+ * 山东生产环境要去掉登录页的路由 ([7960bc3](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/7960bc3b163c5dbd096a9d84b78620f3b35856b9))
13
+
5
14
  ### [0.0.58](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.57...v0.0.58) (2024-11-11)
6
15
 
7
16
 
@@ -2,7 +2,7 @@ import { getQuarterNum, getHalfYearNum, formatDate, useConfig, getLocalStorage,
2
2
  import Vue$1 from "vue";
3
3
  import { DropdownMenu as DropdownMenu$1, DropdownItem as DropdownItem$1, Message, LoadingBar, Spin } from "view-design";
4
4
  const name$1 = "@indfnd/common-mobile";
5
- const version$2 = "0.0.57";
5
+ const version$2 = "0.0.59";
6
6
  const author$1 = "huxuetong";
7
7
  const publishConfig = {
8
8
  registry: "https://registry.npmjs.org/"
@@ -70563,7 +70563,8 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
70563
70563
  }
70564
70564
  }
70565
70565
  }
70566
- if (typeof window.Code != "undefined") {
70566
+ const code2 = getQueryVariable("code");
70567
+ if (typeof window.Code != "undefined" || code2) {
70567
70568
  if (!token) {
70568
70569
  token = await pluginLogin(store2);
70569
70570
  store2.dispatch("loginSuccess", token);
@@ -70609,10 +70610,10 @@ const pluginLogin = (store2) => {
70609
70610
  store2.commit("setUserName", "");
70610
70611
  store2.commit("setToken", "");
70611
70612
  return new Promise((resolve, reject) => {
70612
- Code.postMessage("");
70613
- window.getCode = function(res) {
70614
- console.log("getCode res", res);
70615
- axios$3.get("/ind-uc-ext-server/sso/ssoAppLogin?code=" + res).then(async (resp) => {
70613
+ console.log("1111`111");
70614
+ const code2 = getQueryVariable("code");
70615
+ if (code2) {
70616
+ axios$3.get("/ind-uc-ext-server/sso/xtbg/auth/appLogin?code=" + code2).then(async (resp) => {
70616
70617
  setToken(resp.token);
70617
70618
  resolve(resp.token);
70618
70619
  }).catch((e) => {
@@ -70624,9 +70625,48 @@ const pluginLogin = (store2) => {
70624
70625
  });
70625
70626
  reject(0);
70626
70627
  });
70627
- };
70628
+ } else {
70629
+ Code.postMessage("");
70630
+ window.getCode = function(res) {
70631
+ console.log("getCode res", res);
70632
+ axios$3.get("/ind-uc-ext-server/sso/ssoAppLogin?code=" + res).then(async (resp) => {
70633
+ setToken(resp.token);
70634
+ resolve(resp.token);
70635
+ }).catch((e) => {
70636
+ console.log("\u83B7\u53D6token\u5F02\u5E38", e);
70637
+ Message.error({
70638
+ content: "\u8C03\u7528\u5355\u70B9\u767B\u5F55\u670D\u52A1\u767B\u5F55\u5F02\u5E38\uFF0C\u8BF7\u8FD4\u56DE\u79FB\u52A8\u95E8\u6237\u91CD\u65B0\u767B\u5F55\uFF01",
70639
+ duration: 10,
70640
+ closable: true
70641
+ });
70642
+ reject(0);
70643
+ });
70644
+ };
70645
+ }
70628
70646
  });
70629
70647
  };
70648
+ window.getQueryVariable = function getQueryVariable2(variable) {
70649
+ var query = window.location.search.substring(1);
70650
+ var vars = query.split("&");
70651
+ for (let i = 0; i < vars.length; i++) {
70652
+ let pair = vars[i].split("=");
70653
+ if (pair[0] == variable) {
70654
+ return pair.slice(1).join("=");
70655
+ }
70656
+ }
70657
+ let routeHash = window.location.hash.substring(2);
70658
+ if (routeHash.includes("?")) {
70659
+ query = routeHash.split("?")[1];
70660
+ }
70661
+ vars = query.split("&");
70662
+ for (let i = 0; i < vars.length; i++) {
70663
+ let pair = vars[i].split("=");
70664
+ if (pair[0] == variable) {
70665
+ return pair.slice(1).join("=");
70666
+ }
70667
+ }
70668
+ return false;
70669
+ };
70630
70670
  const checkLogin = async () => {
70631
70671
  var _a;
70632
70672
  try {