'));
}
if ($('#header-if > .wf-header-shadow').is(':visible')) {
$('#header-if > .wf-header-shadow').fadeOut();
} else {
$('.wf-header-shadow').fadeIn();
if(window.__logo_theme_name) {
document.getElementsByClassName('wf-header')[0].style.background = '#e66145'
}
}
}
// function hideHeaderShadow() {
// $('#header-if > .wf-header-shadow').fadeOut();
// }
//反馈
$('#feedback').click(function (e) {
window._czc && window._czc.push(['_trackEvent', '个人版首页-【侧边栏-反馈】', '点击', '']);
e.stopPropagation(); // 阻止事件冒泡到文档层面
handleSuggestionFormVisible(e);
showHeaderShadow();
})
// 客户支持弹窗
var showSuggestionNew = true;
function handleSuggestionFormVisible() {
var content = $('#suggestionForm').html();
if (content.length === 0 && showSuggestionNew) {
$.ajax({
url: 'https://my.wanfangdata.com.cn/user/suggestion/suggestionForm',
beforeSend: function () {
showSuggestionNew = false;
},
success: function (result) {
if(result) {
$('#suggestionForm').html('' + result);
}
showSuggestionNew = true;
},
error: function (data) {
showSuggestionNew = true;
},
});
}
$('#suggestionForm').fadeToggle();
}
// 客户支持弹窗关闭按钮点击事件
$(document).on('click', '#suggestionFormClose', function (e) {
$('#suggestionForm').fadeOut();
$('.wf-header-shadow').fadeOut();
})
// 智妍弹框跳转入口
$('#zhiyanButton').click(function() {
let accountIds = window.__userContext.context.accountIds
let isPersonLogin = accountIds.some(function(item){return item.includes('Person')})
if(isPersonLogin) {
window.open("");
} else {
window.open('https://my.wanfangdata.com.cn/auth/user/login.do?service=' + encodeURIComponent(""));
}
})
// 关闭弹框
$('#zhiyanClose').click(function() {
$('#zhiyanDialog').hide()
})