File tree Expand file tree Collapse file tree 2 files changed +33
-3
lines changed
en_US/Development_Documentation Expand file tree Collapse file tree 2 files changed +33
-3
lines changed Original file line number Diff line number Diff 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
4242npm run serve
4343````
44-
44+ # ###Method I
4545Access the app in a browser (Chrome is recommended) via the link: [http://localhost:8080/](http://localhost:8080/) .
4646
4747When 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
6363open -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+ ` ` `
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ npm run build
4141``` shell script
4242npm 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
6363open -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```
You can’t perform that action at this time.
0 commit comments