forked from Gitlink/forgeplus-react
menu_list暂时一直调用
This commit is contained in:
parent
aa71fe1a21
commit
5d6553787d
|
|
@ -449,19 +449,28 @@ class Detail extends Component {
|
|||
// 获取动态导航栏菜单
|
||||
async getBanner(data) {
|
||||
const { projectsId, owner } = this.props.match.params;
|
||||
if (!data) {
|
||||
const url = `/${owner}/${projectsId}/menu_list.json`;
|
||||
const res = await axios.get(url)
|
||||
if (res.data) {
|
||||
data = res.data
|
||||
const url = `/${owner}/${projectsId}/menu_list.json`;
|
||||
axios.get(url).then(res=>{
|
||||
if(res && res.data){
|
||||
this.setState({
|
||||
bannerList: res.data
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if (data) {
|
||||
this.setState({
|
||||
bannerList: data
|
||||
})
|
||||
}
|
||||
})
|
||||
// if (!data) {
|
||||
// const url = `/${owner}/${projectsId}/menu_list.json`;
|
||||
// axios.get(url).then(res=>{
|
||||
// if(res && res.data){
|
||||
// this.setState({
|
||||
// bannerList: res.data
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// }else{
|
||||
// this.setState({
|
||||
// bannerList: data
|
||||
// })
|
||||
// }
|
||||
}
|
||||
|
||||
// 关注和取消关注
|
||||
|
|
|
|||
Loading…
Reference in New Issue