当然还有 方法3:
用 wx.request 来访问,但测试发现跨域请求错误,报错的结果,跟高级网络请求关闭跨域访问的错误是一样的:
Failed to load https://pytest.yczxqy.cn/api/bbhappy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://lyl0001-ide.newdaoapp.cn' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
怎么能把这个错误修正呢?您们那个组件是怎么写的?