@indfnd/common-mobile 0.0.17 → 0.0.19

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,22 @@
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.19](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.18...v0.0.19) (2024-04-19)
6
+
7
+
8
+ ### Features
9
+
10
+ * 筛选逻辑修改 ([fd017a6](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/fd017a6d2764dfd122a499e3ddc959432cce2356))
11
+
12
+ ### [0.0.18](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.17...v0.0.18) (2024-04-17)
13
+
14
+
15
+ ### Features
16
+
17
+ * 保留小数位数 ([96ab224](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/96ab22400cbdd8532797732359ef21e43e900b39))
18
+ * 升级依赖 ([99fea61](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/99fea61eb47003fbbc82cf21d5d5fd33527d5fe9))
19
+ * 移动端单点登录 ([c9f9344](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/c9f9344e26c378890d75e14aaeda9fd3c2e3c651))
20
+
5
21
  ### [0.0.17](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.16...v0.0.17) (2024-04-13)
6
22
 
7
23
  ### [0.0.16](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.15...v0.0.16) (2024-04-11)
@@ -1,8 +1,8 @@
1
- import { getQuarterNum, getHalfYearNum, getHalfYear, formatDate, checkIdCard, checkVehicleNo, checkPhone, getDictMapApi, axios, useConfig, getLocalStorage, getCaptchaURL, guid, setLocalStorage, clearSessionStorage, cryptor, listComTreeApi, config as config$1, getSessionStorage, getToken, setToken, loginApi, clearUserInfoCache, clearPermissionCache, logoutApi, getUserInfoCache, getUserInfoApi, setUserInfoCache, setSessionStorage, getAppListApi, getPermissionCache, getPermissionApi, setPermissionCache, menuHistoryApi, addMenuCollectApi, removeMenuCollectApi } from "@indfnd/utils";
1
+ import { getQuarterNum, getHalfYearNum, getHalfYear, formatDate, checkIdCard, checkVehicleNo, checkPhone, getDictMapApi, axios, useConfig, getLocalStorage, getCaptchaURL, guid, setLocalStorage, clearSessionStorage, cryptor, listComTreeApi, config as config$1, getSessionStorage, getToken, getUserInfoApi, setToken as setToken$1, loginApi, clearUserInfoCache, clearPermissionCache, logoutApi, getUserInfoCache, setUserInfoCache, setSessionStorage, getAppListApi, getPermissionCache, getPermissionApi, setPermissionCache, menuHistoryApi, addMenuCollectApi, removeMenuCollectApi } from "@indfnd/utils";
2
2
  import { DropdownMenu as DropdownMenu$1, DropdownItem as DropdownItem$1, Message, LoadingBar, Spin } from "view-design";
3
3
  import Vue$1 from "vue";
4
4
  const name = "@indfnd/common-mobile";
5
- const version$1 = "0.0.16";
5
+ const version$1 = "0.0.18";
6
6
  const author = "huxuetong";
7
7
  const publishConfig = {
8
8
  registry: "https://registry.npmjs.org/"
@@ -6590,7 +6590,7 @@ var FormImpl = {
6590
6590
  props: {
6591
6591
  placeholder: `\u8BF7\u8F93\u5165\u6570\u5B57`,
6592
6592
  ...d.props,
6593
- value: this.form[d.formKey],
6593
+ value: text,
6594
6594
  disabled,
6595
6595
  type: "number"
6596
6596
  },
@@ -44551,9 +44551,11 @@ const __vue2_script$h = {
44551
44551
  let datas;
44552
44552
  if (this.searchVal) {
44553
44553
  datas = _.filter(this.rows, (d) => {
44554
- return _.some(this.formFieldList, (dd) => {
44555
- return _.includes(d[dd.formKey], this.searchVal);
44556
- });
44554
+ var _a;
44555
+ let titleKey = (_a = _.find(this.formFieldList, (d2) => {
44556
+ return !!d2.isTitle;
44557
+ })) == null ? void 0 : _a.formKey;
44558
+ return titleKey ? _.includes(d[titleKey], this.searchVal) : false;
44557
44559
  }) || [];
44558
44560
  } else {
44559
44561
  datas = this.rows || [];
@@ -68970,27 +68972,47 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
68970
68972
  }
68971
68973
  }
68972
68974
  }
68973
- if (!token && to.name !== LOGIN_PAGE_NAME) {
68974
- next2({ name: LOGIN_PAGE_NAME });
68975
- } else if (to.name === LOGIN_PAGE_NAME) {
68976
- next2();
68977
- } else if (!store2.state.user.userName) {
68978
- Spin.show();
68979
- try {
68980
- await renderRoutes({
68981
- router,
68982
- store: store2,
68983
- microType,
68984
- allowPermissionList,
68985
- routerOptionsBak
68986
- });
68987
- next2({ ...to, replace: true });
68988
- } catch (error) {
68989
- next2({ name: LOGIN_PAGE_NAME });
68975
+ console.log("typeof window.Code", typeof window.Code);
68976
+ async function _renderRoutes() {
68977
+ if (!store2.state.user.userName) {
68978
+ Spin.show();
68979
+ try {
68980
+ await renderRoutes({
68981
+ router,
68982
+ store: store2,
68983
+ microType,
68984
+ allowPermissionList,
68985
+ routerOptionsBak
68986
+ });
68987
+ next2({ ...to, replace: true });
68988
+ } catch (error) {
68989
+ next2({ name: LOGIN_PAGE_NAME });
68990
+ }
68991
+ Spin.hide();
68992
+ } else {
68993
+ next2();
68994
+ }
68995
+ }
68996
+ if (typeof window.Code != "undefined") {
68997
+ if (!token) {
68998
+ token = await pluginLogin();
68999
+ store2.dispatch("loginSuccess", token);
69000
+ await _renderRoutes();
69001
+ } else {
69002
+ if (!await checkLogin()) {
69003
+ token = await pluginLogin();
69004
+ store2.dispatch("loginSuccess", token);
69005
+ }
69006
+ await _renderRoutes();
68990
69007
  }
68991
- Spin.hide();
68992
69008
  } else {
68993
- next2();
69009
+ if (!token && to.name !== LOGIN_PAGE_NAME) {
69010
+ next2({ name: LOGIN_PAGE_NAME });
69011
+ } else if (to.name === LOGIN_PAGE_NAME) {
69012
+ next2();
69013
+ } else {
69014
+ await _renderRoutes();
69015
+ }
68994
69016
  }
68995
69017
  });
68996
69018
  router.afterEach((to) => {
@@ -68998,6 +69020,30 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
68998
69020
  window.scrollTo(0, 0);
68999
69021
  });
69000
69022
  }
69023
+ const pluginLogin = () => {
69024
+ return new Promise((resolve, reject) => {
69025
+ Code.postMessage("");
69026
+ window.getCode = function(res) {
69027
+ console.log("getCode res", res);
69028
+ axios.get("/ind-uc-ext-server/sso/ssoAppLogin?code=" + res).then((resp) => {
69029
+ setToken(resp.token);
69030
+ resolve(resp.token);
69031
+ }).catch((e) => {
69032
+ console.log("\u83B7\u53D6token\u5F02\u5E38", e);
69033
+ reject(0);
69034
+ });
69035
+ };
69036
+ });
69037
+ };
69038
+ const checkLogin = async () => {
69039
+ try {
69040
+ const resp = await getUserInfoApi();
69041
+ return resp.code == 1;
69042
+ } catch (e) {
69043
+ console.log("getLoginData e", e);
69044
+ return false;
69045
+ }
69046
+ };
69001
69047
  const routerOptions = {
69002
69048
  mode: "history",
69003
69049
  base: "ind-mobile"
@@ -69021,7 +69067,7 @@ var user = {
69021
69067
  },
69022
69068
  setToken(state, token) {
69023
69069
  state.token = token;
69024
- setToken(token);
69070
+ setToken$1(token);
69025
69071
  }
69026
69072
  },
69027
69073
  actions: {