uni-app捣鼓之路---------跨域解决

在uni-app开发,首先解决的是如何跨域,解决很简单,在manifest.json配置文件配置即可,配置如下

/* h5特有相关 */
	"h5": {
	        "devServer": {
	            "port": 8080,
	            "disableHostCheck": true,
	            "proxy": {
	                "/*": {
	                    "target": "http://localhost:8080",
	                    "changeOrigin": true,
						"ws": false,
	                    "secure": false
	                }
	            }
	        }
	    },
posted @ 2020-02-11 17:10  孙振光  阅读(52)  评论(0编辑  收藏  举报