@indfnd/common-mobile 1.0.73 → 1.0.75

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,27 @@
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.75](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v1.0.74...v1.0.75) (2026-04-03)
6
+
7
+
8
+ ### Features
9
+
10
+ * 解决企业微信不能返回的bug ([6e4243a](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/6e4243a2c571f560b4a30ee449581a2ed135a0c0))
11
+
12
+ ### [1.0.74](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v1.0.73...v1.0.74) (2026-04-02)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * 测试 ([8fff7f1](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/8fff7f13d6f583ed3f077e02c83eea863c4b4e6d))
18
+ * 处理山东路由问题 ([b639282](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/b6392826edff85760c83fa5dcd6bba828dbdf7b1))
19
+ * 处理山东路由问题 ([9927f4b](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/9927f4b731f265dcaad491cf15c5c4102c39c14a))
20
+ * 复原代码 ([9b6cb8a](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/9b6cb8abb2ccbcb43b58983a00ab4eefae3de1d4))
21
+ * 回滚 ([9d4d88e](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/9d4d88ed655dcad5fa67c3f317fa48c95257b47e))
22
+ * 回退 ([b3f2a21](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/b3f2a2190580988dd3aac5d3d3f4d784aff432a8))
23
+ * 企业微信跳转至正确路由 ([ccccfe2](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/ccccfe24cfab374421f53cb2d04abef3f1b4c139))
24
+ * 添加路由跳转日志 ([c7e9758](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/c7e97588ee73508b5242957fd86f8d527fdb8e8a))
25
+
5
26
  ### [1.0.73](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v1.0.72...v1.0.73) (2026-03-27)
6
27
 
7
28
 
@@ -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.72";
6
+ const version$2 = "1.0.74";
7
7
  const author$1 = "huxuetong";
8
8
  const publishConfig = {
9
9
  registry: "https://registry.npmjs.org/"
@@ -22672,23 +22672,23 @@ function install$1(Vue2) {
22672
22672
  if (typeof window !== "undefined" && window.Vue) {
22673
22673
  install$1(window.Vue);
22674
22674
  }
22675
- const isHb$1 = location.pathname.includes("scyxweb");
22675
+ const isHb$2 = location.pathname.includes("scyxweb");
22676
22676
  function getIndexPreset(params) {
22677
22677
  return axios$3.get(
22678
- `${location.protocol}//${location.host}${isHb$1 ? "/scyxgateway" : ""}/ind-uc-ext-server/manage/ind-index-manage-preset/get`,
22678
+ `${location.protocol}//${location.host}${isHb$2 ? "/scyxgateway" : ""}/ind-uc-ext-server/manage/ind-index-manage-preset/get`,
22679
22679
  { params }
22680
22680
  );
22681
22681
  }
22682
22682
  function saveIndexPreset(params) {
22683
22683
  return axios$3.post(
22684
- `${location.protocol}//${location.host}${isHb$1 ? "/scyxgateway" : ""}/ind-uc-ext-server/manage/ind-index-manage-preset/save`,
22684
+ `${location.protocol}//${location.host}${isHb$2 ? "/scyxgateway" : ""}/ind-uc-ext-server/manage/ind-index-manage-preset/save`,
22685
22685
  params
22686
22686
  );
22687
22687
  }
22688
22688
  function getUserDefaultUrl() {
22689
22689
  console.log("getUserDefaultUrl begin");
22690
22690
  return axios$3.get(
22691
- `${location.protocol}//${location.host}${isHb$1 ? "/scyxgateway" : ""}/ind-uc-ext-server/manage/hb/getQywxRedirectUrl`
22691
+ `${location.protocol}//${location.host}${isHb$2 ? "/scyxgateway" : ""}/ind-uc-ext-server/manage/hb/getQywxRedirectUrl`
22692
22692
  );
22693
22693
  }
22694
22694
  var render$v = function() {
@@ -31651,9 +31651,11 @@ var directives = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
31651
31651
  __proto__: null,
31652
31652
  permission
31653
31653
  }, Symbol.toStringTag, { value: "Module" }));
31654
+ let isHb$1 = location.pathname.includes("scyxweb");
31654
31655
  const rootRoute = {
31655
31656
  name: config.rootRouteName,
31656
31657
  path: "/",
31658
+ ...isHb$1 ? { redirect: "/home" } : {},
31657
31659
  component: EmptyLayout,
31658
31660
  meta: {
31659
31661
  hideInMenu: true,
@@ -31663,6 +31665,7 @@ const rootRoute = {
31663
31665
  {
31664
31666
  name: config.homeRouteName,
31665
31667
  path: "home",
31668
+ ...!isHb$1 ? { redirect: `/apps?t=${new Date().getTime()}` } : {},
31666
31669
  meta: {
31667
31670
  hideInMenu: true,
31668
31671
  title: "\u9996\u9875",
@@ -33216,7 +33219,7 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
33216
33219
  }
33217
33220
  }
33218
33221
  console.log("typeof window.Code", typeof window.Code);
33219
- async function _renderRoutes() {
33222
+ async function _renderRoutes(targetRouteFromPlugin) {
33220
33223
  var _a, _b, _c;
33221
33224
  if (!store2.state.user.userName) {
33222
33225
  Spin.show();
@@ -33229,6 +33232,10 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
33229
33232
  routerOptionsBak
33230
33233
  });
33231
33234
  console.log("router1");
33235
+ if (targetRouteFromPlugin) {
33236
+ next2({ ...targetRouteFromPlugin, replace: true });
33237
+ return;
33238
+ }
33232
33239
  const wxState = getQueryVariable("state");
33233
33240
  let state = {};
33234
33241
  if (!!wxState && wxState != "null") {
@@ -33261,11 +33268,14 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
33261
33268
  }
33262
33269
  }
33263
33270
  }
33264
- async function tryPluginLogin() {
33271
+ async function tryPluginLogin(to2) {
33265
33272
  try {
33266
- token = await pluginLogin(store2, router);
33267
- store2.dispatch("loginSuccess", token);
33268
- return token;
33273
+ const result = await pluginLogin(store2, router, to2);
33274
+ if (result && result.token) {
33275
+ store2.dispatch("loginSuccess", result.token);
33276
+ return result;
33277
+ }
33278
+ return false;
33269
33279
  } catch (e) {
33270
33280
  console.log("tryPluginLogin error", e);
33271
33281
  return false;
@@ -33274,13 +33284,17 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
33274
33284
  const code2 = getQueryVariable("code");
33275
33285
  if (typeof window.Code != "undefined" || code2 || isHb) {
33276
33286
  if (!token) {
33277
- if (await tryPluginLogin()) {
33278
- await _renderRoutes();
33287
+ const pluginLoginResult = await tryPluginLogin(to);
33288
+ if (pluginLoginResult) {
33289
+ await _renderRoutes(pluginLoginResult.targetRoute);
33290
+ } else {
33291
+ console.log("\u5355\u70B9\u767B\u5F55\u5F02\u5E38\u4E86\uFF1F\uFF01\uFF01");
33279
33292
  }
33280
33293
  } else {
33281
33294
  if (!await checkLogin()) {
33282
- if (await tryPluginLogin()) {
33283
- await _renderRoutes();
33295
+ const pluginLoginResult = await tryPluginLogin(to);
33296
+ if (pluginLoginResult) {
33297
+ await _renderRoutes(pluginLoginResult.targetRoute);
33284
33298
  }
33285
33299
  } else {
33286
33300
  await _renderRoutes();
@@ -33296,8 +33310,9 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
33296
33310
  } else {
33297
33311
  console.log("router8");
33298
33312
  if (!await checkLogin()) {
33299
- if (await tryPluginLogin()) {
33300
- await _renderRoutes();
33313
+ const pluginLoginResult = await tryPluginLogin(to);
33314
+ if (pluginLoginResult) {
33315
+ await _renderRoutes(pluginLoginResult.targetRoute);
33301
33316
  } else {
33302
33317
  console.log("router9");
33303
33318
  }
@@ -33313,14 +33328,14 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
33313
33328
  });
33314
33329
  }
33315
33330
  let singleLoginPromiseMapping = {};
33316
- const pluginLogin = (store2, router) => {
33331
+ const pluginLogin = (store2, router, targetRoute) => {
33317
33332
  let code2 = getQueryVariable("code");
33318
33333
  let singleLoginPromise = singleLoginPromiseMapping[code2];
33319
33334
  if (singleLoginPromise) {
33320
33335
  console.log("\u91CD\u590D\u4F7F\u7528\u4E86code\u521B\u5EFA\u4F1A\u8BDD\uFF01");
33321
33336
  return singleLoginPromise;
33322
33337
  }
33323
- singleLoginPromise = singleLoginPromiseMapping[code2] = new Promise((resolve, reject) => {
33338
+ singleLoginPromise = new Promise((resolve, reject) => {
33324
33339
  sessionStorage.removeItem("lambo-token");
33325
33340
  sessionStorage.removeItem("sso_token");
33326
33341
  sessionStorage.removeItem("userInfo");
@@ -33338,22 +33353,20 @@ const pluginLogin = (store2, router) => {
33338
33353
  localStorage.setItem("v8-token", resp.token);
33339
33354
  sessionStorage.setItem("lambo-token", resp.token);
33340
33355
  setTimeout(() => {
33356
+ if (targetRoute && targetRoute.path && targetRoute.path !== "/") {
33357
+ console.log("===targetRoute===", targetRoute.path, targetRoute.query);
33358
+ resolve({ token: resp.token });
33359
+ return;
33360
+ }
33341
33361
  console.log("before getUserDefaultUrl");
33342
33362
  getUserDefaultUrl().then((resp1) => {
33343
33363
  var _a;
33344
33364
  console.log("getUserDefaultUrl data", resp1);
33345
33365
  if ((_a = resp1.data) == null ? void 0 : _a.includes("home")) {
33346
- router.push({
33347
- name: config.homeRouteName,
33348
- replace: true
33349
- });
33366
+ resolve({ token: resp.token, targetRoute: { name: config.homeRouteName } });
33350
33367
  } else {
33351
- router.push({
33352
- name: "workBench",
33353
- replace: true
33354
- });
33368
+ resolve({ token: resp.token, targetRoute: { name: "workBench" } });
33355
33369
  }
33356
- reject(0);
33357
33370
  console.log("location.href", location.href);
33358
33371
  return;
33359
33372
  });
@@ -33367,7 +33380,7 @@ const pluginLogin = (store2, router) => {
33367
33380
  if (code2) {
33368
33381
  axios$3.get("/ind-uc-ext-server/sso/xtbg/auth/appLogin?code=" + code2).then(async (resp) => {
33369
33382
  setToken(resp.token);
33370
- resolve(resp.token);
33383
+ resolve({ token: resp.token });
33371
33384
  }).catch((e) => {
33372
33385
  console.log("\u83B7\u53D6token\u5F02\u5E38", e);
33373
33386
  Message.error({
@@ -33383,7 +33396,7 @@ const pluginLogin = (store2, router) => {
33383
33396
  console.log("getCode res", res);
33384
33397
  axios$3.get("/ind-uc-ext-server/sso/ssoAppLogin?code=" + res).then(async (resp) => {
33385
33398
  setToken(resp.token);
33386
- resolve(resp.token);
33399
+ resolve({ token: resp.token });
33387
33400
  }).catch((e) => {
33388
33401
  console.log("\u83B7\u53D6token\u5F02\u5E38", e);
33389
33402
  Message.error({
@@ -33397,6 +33410,9 @@ const pluginLogin = (store2, router) => {
33397
33410
  }
33398
33411
  }
33399
33412
  });
33413
+ if (!!code2) {
33414
+ singleLoginPromiseMapping[code2] = singleLoginPromise;
33415
+ }
33400
33416
  return singleLoginPromise;
33401
33417
  };
33402
33418
  window.getQueryVariable = function getQueryVariable2(variable) {
@@ -33453,7 +33469,8 @@ var user = {
33453
33469
  userName: "",
33454
33470
  avatarImgPath: "",
33455
33471
  userManageUnitId: "",
33456
- token: getToken()
33472
+ token: getToken(),
33473
+ defaultHome: ""
33457
33474
  },
33458
33475
  mutations: {
33459
33476
  setAvatar(state, avatarPath) {
@@ -33468,6 +33485,9 @@ var user = {
33468
33485
  setToken(state, token) {
33469
33486
  state.token = token;
33470
33487
  setToken(token);
33488
+ },
33489
+ SET_DEFAULT_HOME(state, payload) {
33490
+ state.defaultHome = payload;
33471
33491
  }
33472
33492
  },
33473
33493
  actions: {