wendux / flyio-issues

flyio issues
0 stars 0 forks source link

微信小程序中用Fly 出现错误,不在以下 request 合法域名列表中,怎么解决呢? #24

Open x478328818 opened 5 years ago

x478328818 commented 5 years ago

var Fly = require("../wx/wx") var fly = new Fly fly.interceptors.request.use((config, promise) => { //给所有请求添加自定义header config.headers["X-Tag"] = "flyio"; return config; }) fly.config.baseURL = "https://wendux.github.io/" Page({ bindViewTap: function() { //调用 fly.get("http://10.10.180.81/doris/1/1.0.0/user/login", { xx: 6 }).then((d) => { //输出请求数据 console.log(d.data) //输出响应头 console.log(d.header) }).catch(err => { console.log(err.status, err.message) }) } })