This commit is contained in:
徐哼唧L
2022-12-09 16:18:12 +08:00
parent dc4d87a990
commit 5ed3073b6e
130 changed files with 41608 additions and 2013 deletions

View File

@@ -5,6 +5,7 @@ import ElementUI, { TabPane } from 'element-ui';
import VueI18n from 'vue-i18n';
import { messages } from './components/common/i18n';
import 'element-ui/lib/theme-chalk/index.css'; // 默认主题
import locale from 'element-ui/lib/locale/lang/en.js'; // 中英文
// import './assets/css/theme-green/index.css'; // 浅绿色主题
import './assets/css/icon.css';
import './components/common/directives';
@@ -12,6 +13,21 @@ import 'babel-polyfill';
import api from './api/index.js';
import Common from './components/common/common'
// 引入富文本编辑器
import VueQuillEditor from 'vue-quill-editor'
// 富文本编辑器对应的样式
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
// 注册富文本编辑器组件为全局组件
Vue.use(VueQuillEditor)
// 引入wps文档编辑
import mammoth from "mammoth";
Vue.prototype.Common = Common;
// 使用 ES Module
@@ -24,7 +40,8 @@ Vue.prototype.$api = api
Vue.config.productionTip = false;
Vue.use(VueI18n);
Vue.use(ElementUI, {
size: 'small'
size: 'small',
locale
});
const i18n = new VueI18n({
locale: localStorage.getItem('langs')||'en',
@@ -35,7 +52,7 @@ router.beforeEach((to, from, next) => {
document.title = `${to.meta.title} | Traditional Medicine Research`;
const role = localStorage.getItem('U_name');
const userrole = localStorage.getItem('U_status');
if (!role && to.path!='/register'&&to.path!=='/submission'&&to.path!=='/orcidLink'&&to.path!=='/img'&& to.path !=='/reviewer'&&to.path !=='/thanks' &&to.path !== '/login' &&to.path !== '/refuse' &&to.path !== '/managing'&&to.path.search(/retrieve/i)<0 ) {
if (!role && to.path!='/register'&&to.path!=='/submission'&&to.path!=='/verification'&&to.path!=='/orcidLink'&&to.path!=='/img'&& to.path !=='/reviewer'&&to.path !=='/thanks' &&to.path !== '/login' &&to.path !== '/refuse' &&to.path !== '/managing'&&to.path.search(/retrieve/i)<0 ) {
next('/login');
// } else if (to.meta.permission) {
// // 如果是管理员权限则可进入,这里只是简单的模拟管理员权限而已