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