部署修改

xuhongjie
许宏杰 1 month ago
parent 3d73d8b3a8
commit 953f1c0d88

@ -103,7 +103,8 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$store.dispatch('LogOut').then(() => { this.$store.dispatch('LogOut').then(() => {
location.href = '/index'; // location.href = '/index';
this.$router.replace('/login')
}) })
}).catch(() => { }); }).catch(() => { });
}, },
@ -142,7 +143,7 @@ export default {
text-align: left; text-align: left;
font-style: normal; font-style: normal;
text-transform: none; text-transform: none;
} }
.navbarleft{ .navbarleft{
display: flex; display: flex;
@ -241,4 +242,4 @@ export default {
} }
} }
} }
</style> </style>

@ -64,7 +64,8 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$store.dispatch('LogOut').then(() => { this.$store.dispatch('LogOut').then(() => {
location.href = '/index'; // location.href = '/index';
this.$router.replace('/login')
}) })
}).catch(() => { }); }).catch(() => { });
} }

@ -182,7 +182,7 @@ Router.prototype.replace = function push(location) {
}; };
export default new Router({ export default new Router({
mode: "history", // 去掉url中的# // mode: "history", // 去掉url中的#
scrollBehavior: () => ({ y: 0 }), scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes, routes: constantRoutes,
}); });

@ -7,6 +7,8 @@ import { tansParams, blobValidate } from "@/utils/ruoyi";
import cache from '@/plugins/cache' import cache from '@/plugins/cache'
import { saveAs } from 'file-saver' import { saveAs } from 'file-saver'
import router from '@/router'
let downloadLoadingInstance; let downloadLoadingInstance;
// 是否显示重新登录 // 是否显示重新登录
export let isRelogin = { show: false }; export let isRelogin = { show: false };
@ -87,7 +89,8 @@ service.interceptors.response.use(res => {
MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => { MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => {
isRelogin.show = false; isRelogin.show = false;
store.dispatch('LogOut').then(() => { store.dispatch('LogOut').then(() => {
location.href = '/index'; // location.href = '/index';
router.replace('/login')
}) })
}).catch(() => { }).catch(() => {
isRelogin.show = false; isRelogin.show = false;

@ -207,7 +207,7 @@
<script> <script>
import { getBasicInformationById, updateBasicInformation, exportBasicInformation } from '@/api/ManageApi/index'; import { getBasicInformationById, updateBasicInformation, exportBasicInformation } from '@/api/ManageApi/index';
import ImageUpload from '@/components/ImageUpload2/index.vue'; import ImageUpload from '@/components/ImageUpload2/index.vue';
import luotu from '@//views/components/ProjectDetails/luotu.vue' import luotu from '@/views/components/ProjectDetails/luotu.vue'
export default { export default {
components: { components: {
@ -232,8 +232,8 @@ export default {
dialogImageUrl: '', dialogImageUrl: '',
dialogVisibletwo: false, dialogVisibletwo: false,
dialogVisible: false, dialogVisible: false,
mapDialogVisible: false, mapDialogVisible: false,
mapDialogTitle: '地图', mapDialogTitle: '地图',
title: '编辑基本信息', title: '编辑基本信息',
form: { form: {
name: '', name: '',
@ -347,7 +347,7 @@ export default {
this.descriptions = this.formatDescriptions(data); this.descriptions = this.formatDescriptions(data);
this.form = { this.form = {
...data, ...data,
begainTime: [new Date(data.begainTime), new Date(data.endTime)], begainTime: [new Date(data.begainTime), new Date(data.endTime)],
}; };
}) })
.catch(error => { .catch(error => {
@ -611,4 +611,4 @@ export default {
height: auto; height: auto;
padding: 2rem; padding: 2rem;
} }
</style> </style>

@ -84,7 +84,7 @@
import Title from '../components/ProjectDetails/Title.vue'; import Title from '../components/ProjectDetails/Title.vue';
import Basic from '../components/ProjectDetails/Basic.vue'; import Basic from '../components/ProjectDetails/Basic.vue';
import Buildings from '../components/ProjectDetails/Buildings.vue'; import Buildings from '../components/ProjectDetails/Buildings.vue';
import Companyenter from '../components/ProjectDetails/companyenter.vue'; import Companyenter from '../components/ProjectDetails/Companyenter.vue';
import Liver from '../components/ProjectDetails/Liver.vue'; import Liver from '../components/ProjectDetails/Liver.vue';
import Memo from '../components/ProjectDetails/Memo.vue'; import Memo from '../components/ProjectDetails/Memo.vue';
import Models from '../components/ProjectDetails/Models.vue'; import Models from '../components/ProjectDetails/Models.vue';
@ -283,4 +283,4 @@ export default {
padding: 0 0 2rem 0; padding: 0 0 2rem 0;
justify-content: center; justify-content: center;
} }
</style> </style>

@ -18,7 +18,7 @@ module.exports = {
// 部署生产环境和开发环境下的URL。 // 部署生产环境和开发环境下的URL。
// 默认情况下Vue CLI 会假设你的应用是被部署在一个域名的根路径上 // 默认情况下Vue CLI 会假设你的应用是被部署在一个域名的根路径上
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
publicPath: process.env.NODE_ENV === "production" ? "/" : "/", publicPath: process.env.NODE_ENV === "production" ? "/demo/Gyyq-Upstairs" : "/",
// 在npm run build 或 yarn build 时 生成文件的目录名称要和baseUrl的生产环境路径一致默认dist // 在npm run build 或 yarn build 时 生成文件的目录名称要和baseUrl的生产环境路径一致默认dist
outputDir: 'dist', outputDir: 'dist',
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下) // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)

Loading…
Cancel
Save