@indfnd/common-mobile 0.0.28 → 0.0.30

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,24 @@
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.30](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.29...v0.0.30) (2024-06-16)
6
+
7
+
8
+ ### Features
9
+
10
+ * 会话 ([a831445](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/a8314450437e65b86de2b8425e3062fbce13478f))
11
+ * init ([c0d2737](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/c0d27373cc7948aa4f7ca9241c47484fd8e8e0ef))
12
+
13
+ ### [0.0.29](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.28...v0.0.29) (2024-06-15)
14
+
15
+ <<<<<<< HEAD
16
+ =======
17
+
18
+ ### Features
19
+
20
+ * 移动端会话补偿 ([2f627eb](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/2f627eb7362d45a41bd0b1c3a537fd22e3fd5784))
21
+
22
+ >>>>>>> 7445f43a11f06ff428d84dd9eae853fe1c47cc2c
5
23
  ### [0.0.28](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.27...v0.0.28) (2024-06-15)
6
24
 
7
25
 
@@ -2,7 +2,7 @@ import { getQuarterNum, getHalfYearNum, getHalfYear, formatDate, useConfig, getL
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.27";
5
+ const version$2 = "0.0.29";
6
6
  const author$1 = "huxuetong";
7
7
  const publishConfig = {
8
8
  registry: "https://registry.npmjs.org/"
@@ -68295,7 +68295,7 @@ const __vue2_script$3 = {
68295
68295
  },
68296
68296
  my_apps() {
68297
68297
  setTimeout(() => {
68298
- this.offsetTop = this.$refs.myapp.clientHeight + 48;
68298
+ this.offsetTop = this.$refs.myapp.clientHeight + 48 + 10 + 4;
68299
68299
  }, 200);
68300
68300
  }
68301
68301
  },
@@ -68752,6 +68752,7 @@ const rootRoute = {
68752
68752
  {
68753
68753
  name: config.homeRouteName,
68754
68754
  path: "home",
68755
+ redirect: "/apps?t=" + new Date().getTime(),
68755
68756
  meta: {
68756
68757
  hideInMenu: true,
68757
68758
  title: "\u9996\u9875",
@@ -70164,11 +70165,18 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
70164
70165
  Debug();
70165
70166
  const LOGIN_PAGE_NAME = config.loginRouteName;
70166
70167
  const routerOptionsBak = _.cloneDeep(router.options);
70167
- window.sessionNotValidHandler = function() {
70168
- if (window.confirm("\u4F1A\u8BDD\u5DF2\u5931\u6548\uFF0C\u662F\u5426\u91CD\u65B0\u767B\u5F55\uFF1F")) {
70169
- router.push({ name: LOGIN_PAGE_NAME }, () => {
70170
- window.location.reload();
70171
- });
70168
+ window.sessionNotValidHandler = async function() {
70169
+ if (typeof window.Code != "undefined") {
70170
+ await pluginLogin(store2);
70171
+ await store2.dispatch("getUserInfo");
70172
+ await store2.dispatch("getAppListData");
70173
+ await store2.dispatch("getPermissionData");
70174
+ } else {
70175
+ if (window.confirm("\u4F1A\u8BDD\u5DF2\u5931\u6548\uFF0C\u662F\u5426\u91CD\u65B0\u767B\u5F55\uFF1F")) {
70176
+ router.push({ name: LOGIN_PAGE_NAME }, () => {
70177
+ window.location.reload();
70178
+ });
70179
+ }
70172
70180
  }
70173
70181
  };
70174
70182
  window.apiErrorHandler = function(msg) {
@@ -70201,8 +70209,10 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
70201
70209
  allowPermissionList,
70202
70210
  routerOptionsBak
70203
70211
  });
70212
+ console.log("router1");
70204
70213
  next2({ ...to, replace: true });
70205
70214
  } catch (error) {
70215
+ console.log("router2");
70206
70216
  next2({ name: LOGIN_PAGE_NAME });
70207
70217
  }
70208
70218
  Spin.hide();
@@ -70210,35 +70220,41 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
70210
70220
  console.log("window?.selectInst?.show", (_a = window == null ? void 0 : window.selectInst) == null ? void 0 : _a.show);
70211
70221
  if ((_b = window == null ? void 0 : window.selectInst) == null ? void 0 : _b.show) {
70212
70222
  window.selectInst.$emit("update:show", false);
70223
+ console.log("router3");
70213
70224
  next2(false);
70214
70225
  } else if ((_c = window == null ? void 0 : window.popupPageInst) == null ? void 0 : _c.value) {
70215
70226
  window.popupPageInst.$emit("input", false);
70227
+ console.log("router4");
70216
70228
  next2(false);
70217
70229
  } else {
70230
+ console.log("router5");
70218
70231
  next2();
70219
70232
  }
70220
70233
  }
70221
70234
  }
70222
70235
  if (typeof window.Code != "undefined") {
70223
70236
  if (!token) {
70224
- token = await pluginLogin();
70237
+ token = await pluginLogin(store2);
70225
70238
  store2.dispatch("loginSuccess", token);
70226
70239
  await _renderRoutes();
70227
70240
  } else {
70228
70241
  if (!await checkLogin()) {
70229
- token = await pluginLogin();
70242
+ token = await pluginLogin(store2);
70230
70243
  store2.dispatch("loginSuccess", token);
70231
70244
  }
70232
70245
  await _renderRoutes();
70233
70246
  }
70234
70247
  } else {
70235
70248
  if (!token && to.name !== LOGIN_PAGE_NAME) {
70249
+ console.log("router6");
70236
70250
  next2({ name: LOGIN_PAGE_NAME });
70237
70251
  } else if (to.name === LOGIN_PAGE_NAME) {
70252
+ console.log("router7");
70238
70253
  next2();
70239
70254
  } else {
70255
+ console.log("router8");
70240
70256
  if (!await checkLogin()) {
70241
- token = await pluginLogin();
70257
+ token = await pluginLogin(store2);
70242
70258
  store2.dispatch("loginSuccess", token);
70243
70259
  }
70244
70260
  await _renderRoutes();
@@ -70250,12 +70266,22 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
70250
70266
  window.scrollTo(0, 0);
70251
70267
  });
70252
70268
  }
70253
- const pluginLogin = () => {
70269
+ const pluginLogin = (store2) => {
70270
+ sessionStorage.removeItem("lambo-token");
70271
+ sessionStorage.removeItem("sso_token");
70272
+ sessionStorage.removeItem("userInfo");
70273
+ localStorage.removeItem("v8-token");
70274
+ localStorage.removeItem("userId");
70275
+ localStorage.removeItem("userInfo");
70276
+ Cookie.set("lambo-sso-key", "", 1);
70277
+ Cookie.set("TOKEN_KEY", "", 1);
70278
+ store2.commit("setUserName", "");
70279
+ store2.commit("setToken", "");
70254
70280
  return new Promise((resolve, reject) => {
70255
70281
  Code.postMessage("");
70256
70282
  window.getCode = function(res) {
70257
70283
  console.log("getCode res", res);
70258
- axios$3.get("/ind-uc-ext-server/sso/ssoAppLogin?code=" + res).then((resp) => {
70284
+ axios$3.get("/ind-uc-ext-server/sso/ssoAppLogin?code=" + res).then(async (resp) => {
70259
70285
  setToken(resp.token);
70260
70286
  resolve(resp.token);
70261
70287
  }).catch((e) => {