@okiss/oms 0.0.9 → 0.0.12

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/dist/index.es.js CHANGED
@@ -21,12 +21,12 @@ import { defineComponent, onBeforeMount, provide, resolveComponent, openBlock, c
21
21
  import { ElConfigProvider, ElBreadcrumbItem, ElBreadcrumb, ElRow, ElMain, ElAside, ElContainer, ElDivider, ElButton, ElOption, ElSelect, ElFormItem, ElForm, ElCol, ElDrawer, ElDropdownItem, ElDropdownMenu, ElDropdown, ElMenuItem, ElSubMenu, ElOptionGroup, ElMenu, ElScrollbar, ElBacktop, ElMessage as ElMessage$1, ElAlert, ElTree, ElCard } from "element-plus/es";
22
22
  import "element-plus/es/components/config-provider/style/css";
23
23
  import locale from "element-plus/lib/locale/lang/zh-cn";
24
- import { globalVariables, addNewStyle, addNewStyleTag, queryParams, logGroup, isString, compactObject, showEleByClassName, Cache, isExternal, getQueryParam, strVarReplace, createIFrame, obj2Param, isObject, effectDataTrans, isArray } from "@okiss/utils";
24
+ import { addNewStyle, addNewStyleTag, queryParams, logGroup, isString, compactObject, showEleByClassName, Cache, isExternal, getQueryParam, strVarReplace, createIFrame, obj2Param, isObject, effectDataTrans, isArray } from "@okiss/utils";
25
+ import { useStore, createStore, mapGetters } from "vuex";
25
26
  import Mock from "mockjs";
26
27
  import _, { cloneDeep, merge, get, unset } from "lodash";
27
28
  import axios from "axios";
28
29
  import Cookies from "js-cookie";
29
- import { createStore, useStore, mapGetters } from "vuex";
30
30
  import ElementPlus, { ElMessage, ElMessageBox } from "element-plus";
31
31
  import "element-plus/dist/index.css";
32
32
  import "dayjs/locale/zh-cn";
@@ -79,7 +79,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
79
79
  __name: "App",
80
80
  setup(__props) {
81
81
  var _a, _b, _c, _d;
82
- console.log(123, globalVariables());
82
+ console.log(12, useStore());
83
83
  onBeforeMount(() => {
84
84
  const loading = document.getElementById("preloader");
85
85
  if (loading !== null) {
@@ -782,7 +782,7 @@ const defaultSettings = {
782
782
  title: "oms",
783
783
  fixedHeader: false,
784
784
  sidebarLogo: true,
785
- logo: "https://gitee.com/daodao97/asset/raw/master/imgs/logo.png",
785
+ logo: "http://assest.daodao.run/logo.png",
786
786
  closeNavNotice: false,
787
787
  navBarNotice: "",
788
788
  hasNewMessage: true,
@@ -797,7 +797,7 @@ const defaultSettings = {
797
797
  nav: [],
798
798
  whiteRoutes: ["/login"],
799
799
  tokenExpire: 7 * 24 * 60 * 60 * 1e3,
800
- defaultAvatar: "https://gitee.com/daodao97/asset/raw/master/imgs/U0u4Ko.jpg"
800
+ defaultAvatar: "http://assest.daodao.run/avatar.jpg"
801
801
  };
802
802
  const defaultOptions = {
803
803
  axios: defaultAxios,
@@ -3735,7 +3735,7 @@ const _sfc_main$m = {
3735
3735
  const show = ref(false);
3736
3736
  const key = ref(1);
3737
3737
  const direction = "rtl";
3738
- const route = useRoute();
3738
+ const route = useRoute$1();
3739
3739
  const pageSchema = computed(() => {
3740
3740
  return store.state.app.pages[route.path];
3741
3741
  });
@@ -4834,13 +4834,18 @@ function getToken() {
4834
4834
  }
4835
4835
  function permission(router2) {
4836
4836
  router2.beforeEach(async (to, form2, next) => {
4837
+ var _a, _b;
4837
4838
  if (getWhiteRoutes().indexOf(to.path) !== -1) {
4838
4839
  next();
4839
4840
  return;
4840
4841
  }
4841
4842
  const token = getToken();
4842
4843
  if (token) {
4843
- next();
4844
+ if ((_a = to.query) == null ? void 0 : _a.redirect) {
4845
+ next((_b = to.query) == null ? void 0 : _b.redirect);
4846
+ } else {
4847
+ next();
4848
+ }
4844
4849
  return;
4845
4850
  }
4846
4851
  const redirect = to.query.redirect || to.path;