This commit is contained in:
2022-04-24 00:21:35 +08:00
parent cb66c74b79
commit 147debd5cc
2 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -36,5 +36,6 @@
"last 1 firefox version",
"last 1 safari version"
]
}
},
"proxy": "https://api.github.com/"
}
+3 -2
View File
@@ -1,7 +1,7 @@
/*
* @Author: chenxuan
* @Date: 2022-02-16 00:13:00
* @LastEditTime: 2022-04-20 22:41:04
* @LastEditTime: 2022-04-24 00:19:29
* @LastEditors: chenxuan
*/
@@ -16,7 +16,8 @@ export default class Search extends Component {
//发送请求前通知List更新状态
PubSub.publish('atguigu',{isFirst:false,isLoading:true})
//发送网络请求
axios.get(`/api/search/users?q=${keyWord}`).then(
// https://api.github.com/search/users?q=xxxxx get
axios.get(`search/users?q=${keyWord}`).then(
response => {
//请求成功后通知List更新状态
PubSub.publish('atguigu',{isLoading:false,users:response.data.items})