Skip to content

Commit cd896eb

Browse files
committed
feat:Add vue agent to use
1 parent 6bcb53a commit cd896eb

File tree

2 files changed

+33
-3
lines changed

2 files changed

+33
-3
lines changed

en_US/Development_Documentation/Front-end_compilation_documentation.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ If you want to run the project on a local browser and change the code to see the
4141
```shell script
4242
npm run serve
4343
````
44-
44+
####Method I
4545
Access the app in a browser (Chrome is recommended) via the link: [http://localhost:8080/](http://localhost:8080/) .
4646

4747
When you run the project in this way, the effect of your code changes will be dynamically reflected on the browser.
@@ -61,4 +61,19 @@ Execute the following command in the terminal command line (you need to replace
6161
6262
```shell script
6363
open -n /Applications/Google\ Chrome.app/ --args --disable-web-security --user-data-dir=/Users/yourname/MyChromeDevUserData/
64-
````
64+
````
65+
####Method Ⅱ
66+
Use the proxy configuration of vue to find vue.config.js in the dss under web packages
67+
```
68+
devServer: {
69+
proxy: {
70+
'/api': {
71+
target: 'http://127.0.0.1:9001', // 写成你的后端地址
72+
changeOrigin: true,
73+
pathRewrite: {
74+
'^/api': '/api'
75+
}
76+
}
77+
}
78+
}
79+
```

zh_CN/开发文档/前端编译文档.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ npm run build
4141
```shell script
4242
npm run serve
4343
```
44-
44+
####方式一
4545
在浏览器中(建议使用 Chrome 浏览器)通过链接访问应用:[http://localhost:8080/](http://localhost:8080/) .
4646

4747
当您使用该方式运行项目时,您对代码的改动产生的效果,会动态体现在浏览器上。
@@ -61,4 +61,19 @@ npm run serve
6161

6262
```shell script
6363
open -n /Applications/Google\ Chrome.app/ --args --disable-web-security --user-data-dir=/Users/yourname/MyChromeDevUserData/
64+
```
65+
####方式二
66+
使用vue的代理配置,找到web的packages下的dss中的vue.config.js中
67+
```
68+
devServer: {
69+
proxy: {
70+
'/api': {
71+
target: 'http://127.0.0.1:9001', // 写成你的后端地址
72+
changeOrigin: true,
73+
pathRewrite: {
74+
'^/api': '/api'
75+
}
76+
}
77+
}
78+
}
6479
```

0 commit comments

Comments
 (0)