@okiss/oms 0.0.20 → 0.0.21
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 +8 -9
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -22,11 +22,11 @@ import { ElConfigProvider, ElBreadcrumbItem, ElBreadcrumb, ElRow, ElMain, ElAsid
|
|
|
22
22
|
import "element-plus/es/components/config-provider/style/css";
|
|
23
23
|
import locale from "element-plus/lib/locale/lang/zh-cn";
|
|
24
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";
|
|
26
25
|
import Mock from "mockjs";
|
|
27
26
|
import _, { cloneDeep, merge, get, unset } from "lodash";
|
|
28
27
|
import axios from "axios";
|
|
29
28
|
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,6 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
79
79
|
__name: "App",
|
|
80
80
|
setup(__props) {
|
|
81
81
|
var _a, _b, _c, _d;
|
|
82
|
-
console.log(12, useStore());
|
|
83
82
|
onBeforeMount(() => {
|
|
84
83
|
const loading = document.getElementById("preloader");
|
|
85
84
|
if (loading !== null) {
|
|
@@ -1190,10 +1189,10 @@ const baseRequestInterceptor = {
|
|
|
1190
1189
|
};
|
|
1191
1190
|
const baseResponseInterceptor = {
|
|
1192
1191
|
onFulfilled(response) {
|
|
1193
|
-
var _a, _b, _c, _d, _e;
|
|
1194
|
-
const notHoldApiErr = response.config.notHoldApiErr !== void 0 && response.config.notHoldApiErr === true;
|
|
1192
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
1193
|
+
const notHoldApiErr = ((_a = response.config) == null ? void 0 : _a.notHoldApiErr) !== void 0 && ((_b = response.config) == null ? void 0 : _b.notHoldApiErr) === true;
|
|
1195
1194
|
if (!notHoldApiErr && response.data.code !== 0) {
|
|
1196
|
-
const message = response.data.message || `\u63A5\u53E3\u8BF7\u6C42\u9519\u8BEF ${response.config.method}::${(
|
|
1195
|
+
const message = response.data.message || `\u63A5\u53E3\u8BF7\u6C42\u9519\u8BEF ${response.config.method}::${(_c = response.config.url) == null ? void 0 : _c.split("?")[0]}`;
|
|
1197
1196
|
if (response.data.code === 401) {
|
|
1198
1197
|
MessageBox.alert("\u767B\u5F55\u4FE1\u606F\u5DF2\u8FC7\u671F\u6216\u672A\u767B\u5F55, \u662F\u5426\u8DF3\u8F6C\u767B\u5F55", "\u64CD\u4F5C\u63D0\u9192", {
|
|
1199
1198
|
showClose: false,
|
|
@@ -1218,11 +1217,11 @@ const baseResponseInterceptor = {
|
|
|
1218
1217
|
}
|
|
1219
1218
|
return Promise.reject(message);
|
|
1220
1219
|
}
|
|
1221
|
-
let _message_box = (
|
|
1220
|
+
let _message_box = (_e = (_d = response.data) == null ? void 0 : _d.data) == null ? void 0 : _e._message_box;
|
|
1222
1221
|
if (_message_box !== void 0) {
|
|
1223
1222
|
if (isString(_message_box)) {
|
|
1224
1223
|
_message_box = {
|
|
1225
|
-
message: (
|
|
1224
|
+
message: (_g = (_f = response.data) == null ? void 0 : _f.data) == null ? void 0 : _g._message_box
|
|
1226
1225
|
};
|
|
1227
1226
|
}
|
|
1228
1227
|
MessageBox(__spreadValues({
|
|
@@ -4810,8 +4809,9 @@ const router = createRouter({
|
|
|
4810
4809
|
});
|
|
4811
4810
|
NProgress.configure({ showSpinner: false });
|
|
4812
4811
|
function nprogress(router2) {
|
|
4813
|
-
router2.beforeEach((to,
|
|
4812
|
+
router2.beforeEach((to, from, next) => {
|
|
4814
4813
|
NProgress.start();
|
|
4814
|
+
to.preHash = location.hash.replace("#", "");
|
|
4815
4815
|
next();
|
|
4816
4816
|
});
|
|
4817
4817
|
router2.afterEach((to) => {
|
|
@@ -6015,7 +6015,6 @@ function createAdmin(omsOptions) {
|
|
|
6015
6015
|
store.dispatch("settings/updateSettings", omsOptions == null ? void 0 : omsOptions.settings).then();
|
|
6016
6016
|
app2.config.globalProperties.$http = http;
|
|
6017
6017
|
app2.config.globalProperties.$router = router;
|
|
6018
|
-
app2.provide("axios", app2.config.globalProperties.$http);
|
|
6019
6018
|
window.App = app2;
|
|
6020
6019
|
window.OmsOptions = options;
|
|
6021
6020
|
setUploadHeaderHandle(() => {
|