|
@@ -1,9 +1,9 @@
|
|
-import Vue from "vue";
|
|
|
|
-import App from "./App.vue";
|
|
|
|
-import router from "./router";
|
|
|
|
-import ElementUI from "element-ui";
|
|
|
|
-import "element-ui/lib/theme-chalk/index.css";
|
|
|
|
-import { getUser } from "./utils/tool";
|
|
|
|
|
|
+import Vue from 'vue';
|
|
|
|
+import App from './App.vue';
|
|
|
|
+import router from './router';
|
|
|
|
+import ElementUI from 'element-ui';
|
|
|
|
+import 'element-ui/lib/theme-chalk/index.css';
|
|
|
|
+import { getUser } from './utils/tool';
|
|
|
|
|
|
Vue.use(ElementUI);
|
|
Vue.use(ElementUI);
|
|
|
|
|
|
@@ -16,14 +16,25 @@ router.beforeEach((to, from, next) => {
|
|
const Calendar = /^\/Calendar/g.test(to.path);
|
|
const Calendar = /^\/Calendar/g.test(to.path);
|
|
const SilkRoadData = /^\/SilkRoadData/g.test(to.path);
|
|
const SilkRoadData = /^\/SilkRoadData/g.test(to.path);
|
|
const SilkRoadDetail = /^\/SilkRoadDetail/g.test(to.path);
|
|
const SilkRoadDetail = /^\/SilkRoadDetail/g.test(to.path);
|
|
- if (traditional || advertisement || Mobile || menuDiet1 || Calendar || SilkRoadData || SilkRoadDetail) return next();
|
|
|
|
|
|
+ const UpExcelSlcw = /^\/UpExcelSlcw/g.test(to.path);
|
|
|
|
+ if (
|
|
|
|
+ traditional ||
|
|
|
|
+ advertisement ||
|
|
|
|
+ Mobile ||
|
|
|
|
+ menuDiet1 ||
|
|
|
|
+ Calendar ||
|
|
|
|
+ SilkRoadData ||
|
|
|
|
+ SilkRoadDetail ||
|
|
|
|
+ UpExcelSlcw
|
|
|
|
+ )
|
|
|
|
+ return next();
|
|
if (!localStorage.user) {
|
|
if (!localStorage.user) {
|
|
// apply 必须拿到oa用户数据
|
|
// apply 必须拿到oa用户数据
|
|
- getUser(() => next())
|
|
|
|
|
|
+ getUser(() => next());
|
|
} else next();
|
|
} else next();
|
|
});
|
|
});
|
|
|
|
|
|
new Vue({
|
|
new Vue({
|
|
router,
|
|
router,
|
|
render: h => h(App),
|
|
render: h => h(App),
|
|
-}).$mount("#app");
|
|
|
|
|
|
+}).$mount('#app');
|