如果是HbuildrX的话可以输入ureq来点击自动补全,很方便快捷。
```
mounted() {
this.getData()
},
methods: {
getData() {
uni.request({
url: 'http://api.apiopen.top/getWangYiNews',
method: 'GET',
data: {},
success: res => {
console.log(res)
},
fail: () => {},
complete: () => {}
});
}
},
```