Merge branch 'main' of http://62.234.3.186:3000/sxyanzhu/YanZhuProject
commit
5d6456022d
|
@ -19,7 +19,7 @@ server:
|
|||
port: 8080
|
||||
servlet:
|
||||
# 应用的访问路径
|
||||
context-path: /
|
||||
context-path: /prjapi
|
||||
tomcat:
|
||||
# tomcat的URI编码
|
||||
uri-encoding: UTF-8
|
||||
|
|
|
@ -5,7 +5,7 @@ VUE_APP_TITLE = 研筑临时项目管理系统
|
|||
ENV = 'development'
|
||||
|
||||
# 研筑临时项目管理系统/开发环境
|
||||
VUE_APP_BASE_API = '/dev-api'
|
||||
VUE_APP_BASE_API = '/prjapi'
|
||||
|
||||
# 路由懒加载
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
|
|
|
@ -5,4 +5,4 @@ VUE_APP_TITLE = 研筑临时项目管理系统
|
|||
ENV = 'production'
|
||||
|
||||
# 研筑临时项目管理系统/生产环境
|
||||
VUE_APP_BASE_API = '/prod-api'
|
||||
VUE_APP_BASE_API = '/prjapi'
|
||||
|
|
|
@ -96,8 +96,8 @@ export default {
|
|||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.href = '/index';
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.href = '#/login';
|
||||
})
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
|
|
@ -255,7 +255,7 @@ Router.prototype.replace = function push(location) {
|
|||
}
|
||||
|
||||
export default new Router({
|
||||
mode: 'history', // 去掉url中的#
|
||||
mode: 'hash', // 去掉url中的#
|
||||
scrollBehavior: () => ({ y: 0 }),
|
||||
routes: constantRoutes
|
||||
})
|
||||
|
|
|
@ -72,8 +72,8 @@ export default {
|
|||
return {
|
||||
codeUrl: "",
|
||||
loginForm: {
|
||||
username: "admin",
|
||||
password: "admin123",
|
||||
username: "",
|
||||
password: "",
|
||||
rememberMe: false,
|
||||
code: "",
|
||||
uuid: ""
|
||||
|
@ -104,6 +104,10 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
if(location.href.indexOf("localhost")>0){
|
||||
this.loginForm.username="admin";
|
||||
this.loginForm.password="admin123";
|
||||
}
|
||||
this.getCode();
|
||||
this.getCookie();
|
||||
},
|
||||
|
|
|
@ -18,7 +18,7 @@ module.exports = {
|
|||
// 部署生产环境和开发环境下的URL。
|
||||
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
|
||||
// 例如 https://www.yanZhu.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.yanZhu.vip/admin/,则设置 baseUrl 为 /admin/。
|
||||
publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
|
||||
publicPath: process.env.NODE_ENV === "production" ? "/prjapp" : "/prjapp",
|
||||
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
|
||||
outputDir: 'dist',
|
||||
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
|
||||
|
@ -35,7 +35,8 @@ module.exports = {
|
|||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: `http://localhost:8080`,
|
||||
//target: `http://localhost:8080${process.env.VUE_APP_BASE_API}`,
|
||||
target: `http://49.235.181.228${process.env.VUE_APP_BASE_API}`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
|
|
Loading…
Reference in New Issue