部署修改

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(() => { });
}, },

@ -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: {

@ -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';

@ -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