@indfnd/common-mobile 0.0.56 → 0.0.57

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,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
+ ### [0.0.57](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.56...v0.0.57) (2024-11-11)
6
+
5
7
  ### [0.0.56](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.55...v0.0.56) (2024-11-11)
6
8
 
7
9
 
@@ -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.55";
5
+ const version$2 = "0.0.56";
6
6
  const author$1 = "huxuetong";
7
7
  const publishConfig = {
8
8
  registry: "https://registry.npmjs.org/"
@@ -69126,9 +69126,10 @@ function createMacroBasicRoutes({ homeComponent, rootChildren } = {}) {
69126
69126
  if (rootChildren && rootChildren.length) {
69127
69127
  rootRouteTemp.children.push(...rootChildren);
69128
69128
  }
69129
+ let loginRoutes = location.host.includes("localhost") ? [] : [loginRoute];
69129
69130
  return [
69130
69131
  rootRouteTemp,
69131
- loginRoute,
69132
+ ...loginRoutes,
69132
69133
  userRoute,
69133
69134
  settingRoute,
69134
69135
  appsRoute,
@@ -70608,9 +70609,10 @@ const pluginLogin = (store2) => {
70608
70609
  store2.commit("setUserName", "");
70609
70610
  store2.commit("setToken", "");
70610
70611
  return new Promise((resolve, reject) => {
70611
- const code2 = getQueryVariable("code");
70612
- if (code2) {
70613
- axios$3.get("/ind-uc-ext-server/sso/xtbg/auth/appLogin?code=" + code2).then(async (resp) => {
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) => {
70614
70616
  setToken(resp.token);
70615
70617
  resolve(resp.token);
70616
70618
  }).catch((e) => {
@@ -70622,48 +70624,9 @@ const pluginLogin = (store2) => {
70622
70624
  });
70623
70625
  reject(0);
70624
70626
  });
70625
- } else {
70626
- Code.postMessage("");
70627
- window.getCode = function(res) {
70628
- console.log("getCode res", res);
70629
- axios$3.get("/ind-uc-ext-server/sso/ssoAppLogin?code=" + res).then(async (resp) => {
70630
- setToken(resp.token);
70631
- resolve(resp.token);
70632
- }).catch((e) => {
70633
- console.log("\u83B7\u53D6token\u5F02\u5E38", e);
70634
- Message.error({
70635
- 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",
70636
- duration: 10,
70637
- closable: true
70638
- });
70639
- reject(0);
70640
- });
70641
- };
70642
- }
70627
+ };
70643
70628
  });
70644
70629
  };
70645
- window.getQueryVariable = function getQueryVariable2(variable) {
70646
- var query = window.location.search.substring(1);
70647
- var vars = query.split("&");
70648
- for (let i = 0; i < vars.length; i++) {
70649
- let pair = vars[i].split("=");
70650
- if (pair[0] == variable) {
70651
- return pair.slice(1).join("=");
70652
- }
70653
- }
70654
- let routeHash = window.location.hash.substring(2);
70655
- if (routeHash.includes("?")) {
70656
- query = routeHash.split("?")[1];
70657
- }
70658
- vars = query.split("&");
70659
- for (let i = 0; i < vars.length; i++) {
70660
- let pair = vars[i].split("=");
70661
- if (pair[0] == variable) {
70662
- return pair.slice(1).join("=");
70663
- }
70664
- }
70665
- return false;
70666
- };
70667
70630
  const checkLogin = async () => {
70668
70631
  var _a;
70669
70632
  try {