import React from 'react'; import './portal.less'; // import ajax from 'jquery/src/ajax/xhr.js'; // import $ from 'jquery/src/ajax'; import $ from 'jquery'; import logoImg from '../../../image/logo-2.png'; function navHover () { $('.header_nav_detail .nav_content>li').hover(function () { $(this).siblings('.active').addClass('hideSub'); }, function () { $(this).siblings('.active').removeClass('hideSub'); }) } const LoginTop = React.createClass({ logOut () { $.ajax({ method: "get", dataType: "json", url: globalConfig.context + "/login", }).done(function (data) { if (window.userData.mobile) { window.location.href = globalConfig.context + "/user/login.html" } else if (window.adminData.mobile) { window.location.href = globalConfig.context + "/admin/login.html" }; }); }, componentDidMount () { navHover(); }, render () { return (
欢迎您来到科技认知计算交易平台-公测版
返回首页 {window.userData.mobile || window.adminData.mobile ? {(() => { if (window.userData.mobile) { return 尊敬的 {userData.nickname || userData.number} } else if (window.adminData.mobile) { return 尊敬的 {adminData.name || adminData.mobile} } })()} { this.logOut() }}>退出 : 登录 注册 } 帮助中心
) } }); export default LoginTop;