Changes to be committed:

modified:   app_sb/src/main/resources/application.yml
	new file:   app_vue/.env.development
	modified:   app_vue/src/components/GetToken_1.vue
	modified:   app_vue/vue.config.js
This commit is contained in:
monjack
2025-06-20 21:49:37 +08:00
parent 0245ac40fa
commit e64718a811
4 changed files with 13 additions and 20 deletions

8
app_vue/.env.development Normal file
View File

@ -0,0 +1,8 @@
# 下面填写 VPS spring vue port 替换53600
VUE_APP_PORT = 53600
# 下面填写 浏览器URL栏中 http://[考试服务器地址]:[端口号] 例如 http://10.128.192.1:8022替换http://10.128.128.249:8022
SERVER_URL = http://10.128.128.249:8022
# 下面填写 你的学号替换202241401022
VUE_APP_STUDENT_ID = 202241401022
# 下面填写 VPS spring boot port替换53300
SPRINGBOOT_PORT= 53300

View File

@ -11,7 +11,7 @@
proxy:"/examServer",
url:"/public_api/v1/api_for_vue_exam_1?student_id=",
token:"no token",
student_id: "202241401015"
student_id: process.env.VUE_APP_STUDENT_ID
}
},
methods:{

View File

@ -4,11 +4,11 @@ module.exports = defineConfig({
})
module.exports={
devServer:{
port:58610,
port: process.env.VUE_APP_PORT,
allowedHosts:"all",
proxy: {
'/examServer': {
target: "http://10.128.128.249:8022",
target: process.env.SERVER_URL,
secure: false,
changeOrigin: true,
pathRewrite: {
@ -16,7 +16,7 @@ module.exports={
}
},
'/springbootServer': {
target: "http://localhost:58310",
target: `http://localhost:${process.env.SPRINGBOOT_PORT}`,
secure: false,
changeOrigin: true,
pathRewrite: {