需求反馈跳转到论坛
This commit is contained in:
parent
0d11b95492
commit
1a3b4fee43
|
|
@ -22,7 +22,10 @@ $(window).scroll(function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
function SiderBar(props) {
|
function SiderBar(props) {
|
||||||
const {location, history,user} = props;
|
const {location, history,user, mygetHelmetapi= {}} = props;
|
||||||
|
const {navbar=[]} = mygetHelmetapi;
|
||||||
|
const forumsList = navbar.filter(item=>item.link && item.link.includes("/forums"))
|
||||||
|
const forumsUrl = forumsList[0] && forumsList[0].link;
|
||||||
const {search, pathname} = location;
|
const {search, pathname} = location;
|
||||||
const [ data , setData ] = useState([]);
|
const [ data , setData ] = useState([]);
|
||||||
const [ visible , setVisible ] = useState(false);
|
const [ visible , setVisible ] = useState(false);
|
||||||
|
|
@ -83,6 +86,9 @@ function SiderBar(props) {
|
||||||
// 意见反馈按钮点击事件
|
// 意见反馈按钮点击事件
|
||||||
function feedBackClick(){
|
function feedBackClick(){
|
||||||
if(login){
|
if(login){
|
||||||
|
if(forumsUrl){
|
||||||
|
return window.location.href=forumsUrl;
|
||||||
|
}
|
||||||
setFeedBackModal(true);
|
setFeedBackModal(true);
|
||||||
}else{
|
}else{
|
||||||
history.push(`/login?go_page=${pathname}?feedback`);
|
history.push(`/login?go_page=${pathname}?feedback`);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue