Commit 59a11919 authored by liyang's avatar liyang

refactor: 优化文件上传实现,更新生产环境配置

parent 8c8fa7f1
...@@ -96,7 +96,7 @@ Router.prototype.replace = function push(location) { ...@@ -96,7 +96,7 @@ Router.prototype.replace = function push(location) {
} }
export default new Router({ export default new Router({
mode: 'history', mode: 'hash',
scrollBehavior: () => ({ y: 0 }), scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes routes: constantRoutes
}) })
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
import PortalLayout from '@/components/PortalLayout'
export const constantRoutes = [
{
path: '/portal',
component: PortalLayout,
redirect: '/portal/home',
children: [
{
path: 'home',
name: 'PortalHome',
component: () => import('@/views/portal/Home'),
meta: { title: '首页' }
},
{
path: 'about',
name: 'PortalAbout',
component: () => import('@/views/portal/AboutSTS'),
meta: { title: '关于STS' }
},
{
path: 'science-plan',
name: 'PortalSciencePlan',
component: () => import('@/views/portal/SciencePlan'),
meta: { title: '科学计划与国际合作' }
},
{
path: 'progress',
name: 'PortalProgress',
component: () => import('@/views/portal/Progress'),
meta: { title: '计划进展' }
},
{
path: 'achievement',
name: 'PortalAchievement',
component: () => import('@/views/portal/Achievement'),
meta: { title: '科研成果' }
},
{
path: 'sdgsat1-achievements',
name: 'PortalSdgsat1Achievements',
component: () => import('@/views/portal/Sdgsat1Achievements'),
meta: { title: 'SDGSAT-1卫星科学成果' }
},
{
path: 'achievement/detail',
name: 'PortalAchievementDetail',
component: () => import('@/views/portal/AchievementDetail'),
meta: { title: '成果详情' }
},
{
path: 'application',
name: 'PortalApplication',
component: () => import('@/views/portal/Application'),
meta: { title: '应用与示范' }
},
{
path: 'sdgsat1',
name: 'PortalSDGSAT1',
component: () => import('@/views/portal/SDGSAT1'),
meta: { title: 'SDGSAT-1专区' }
},
{
path: 'sdgsat1/case/detail',
name: 'PortalSDGSAT1CaseDetail',
component: () => import('@/views/portal/SDGSAT1CaseDetail'),
meta: { title: '数据开放与应用 - 案例详情' }
},
{
path: 'notice',
name: 'PortalNotice',
component: () => import('@/views/portal/Notice'),
meta: { title: '通知公告' }
}
]
},
{
path: '/404',
component: () => import('@/views/error/404'),
hidden: true
}
]
let routerPush = Router.prototype.push
let routerReplace = Router.prototype.replace
Router.prototype.push = function push(location) {
return routerPush.call(this, location).catch(err => err)
}
Router.prototype.replace = function push(location) {
return routerReplace.call(this, location).catch(err => err)
}
export default new Router({
mode: 'hash',
scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes
})
...@@ -74,5 +74,5 @@ referer: ...@@ -74,5 +74,5 @@ referer:
# 文件路径 # 文件路径
ruoyi: ruoyi:
profile: F:/project/国际大科学计划网站/international-science-program-website/uploadPath profile: /home/changfa/sts/upload
addressEnabled: true addressEnabled: true
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment