top.jsx 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. import React from 'react';
  2. import './portal.less';
  3. // import ajax from 'jquery/src/ajax/xhr.js';
  4. // import $ from 'jquery/src/ajax';
  5. import $ from 'jquery';
  6. import logoImg from '../../../image/logo-2.png';
  7. function navHover () {
  8. $('.header_nav_detail .nav_content>li').hover(function () {
  9. $(this).siblings('.active').addClass('hideSub');
  10. }, function () {
  11. $(this).siblings('.active').removeClass('hideSub');
  12. })
  13. }
  14. const LoginTop = React.createClass({
  15. logOut () {
  16. $.ajax({
  17. method: "get",
  18. dataType: "json",
  19. url: globalConfig.context + "/login",
  20. }).done(function (data) {
  21. if (window.userData.mobile) {
  22. window.location.href = globalConfig.context + "/user/login.html"
  23. } else if (window.adminData.mobile) {
  24. window.location.href = globalConfig.context + "/admin/login.html"
  25. };
  26. });
  27. },
  28. componentDidMount () {
  29. navHover();
  30. },
  31. render () {
  32. return (
  33. <div className="portal-header">
  34. <div className="portal-top">
  35. <div className="clearfix">
  36. <div className="top-welcomeText">欢迎您来到科技认知计算交易平台-公测版</div>
  37. <div className="top-alink">
  38. <a href={globalConfig.context + "/portal/index.html"}>返回首页</a>
  39. {window.userData.mobile || window.adminData.mobile ?
  40. <span>
  41. {(() => {
  42. if (window.userData.mobile) {
  43. return <a href={globalConfig.context + "/user/account/index"}>尊敬的 {userData.nickname || userData.number}</a>
  44. } else if (window.adminData.mobile) {
  45. return <a href={globalConfig.context + "/admin/index"}>尊敬的 {adminData.name || adminData.mobile}</a>
  46. }
  47. })()}
  48. <a onClick={() => { this.logOut() }}>退出</a>
  49. </span>
  50. : <span>
  51. <a href={globalConfig.context + "/user/login.html"}>登录</a>
  52. <a href={globalConfig.context + "/user/signIn.html"}>注册</a>
  53. </span>}
  54. <a href="./index.html">帮助中心</a>
  55. </div>
  56. </div>
  57. </div>
  58. <div className="header_nav_detail">
  59. <div className="container clearfix">
  60. <div className="col-md-3 logo">
  61. <a href={globalConfig.context + '/portal/index.html'}>
  62. <img src={logoImg} alt="" />
  63. </a>
  64. </div>
  65. <div className="col-md-9">
  66. <ul className="nav_content">
  67. <li className="home"><a href={globalConfig.context + "/portal/index.html"}>首页</a> </li>
  68. <li className="active">
  69. <a href={globalConfig.context + '/portal/search/achievement.html'}>技术交易</a>
  70. <ul className="secondary_navigation_nav" style={{ 'width': (4 * 75) + 'px', left: '-' + (4 * 75 / 2 - 74.25 / 2) + 'px' }}>
  71. <li className={this.props.active == 'demand' ? 'active' : ''}><a href={globalConfig.context + '/portal/search/demand.html'}>需求谷</a></li>
  72. <li className={this.props.active == 'achievement' ? 'active' : ''} ><a href={globalConfig.context + '/portal/search/achievement.html'}>技术海</a></li>
  73. <li className={this.props.active == 'subscriberOrg' ? 'active' : ''}><a href={globalConfig.context + '/portal/search/subscriberOrg.html'}>伙伴</a></li>
  74. <li className={this.props.active == 'subscriberUser' ? 'active' : ''}><a href={globalConfig.context + '/portal/search/subscriberUser.html'}>行家</a></li>
  75. </ul>
  76. </li>
  77. <li>
  78. <a href={globalConfig.context + '/portal/scienceTechnology/bigShot.html'}>大咖说</a>
  79. <ul className="secondary_navigation_nav" style={{ 'width': (2 * 75) + 'px', left: '-' + (2 * 75 / 2 - 74.25 / 2) + 'px' }}>
  80. <li><a href={globalConfig.context + '/portal/scienceTechnology/star.html'}>科技明星</a></li>
  81. <li><a href={globalConfig.context + '/portal/scienceTechnology/lecture.html'}>科技讲堂</a></li>
  82. </ul>
  83. </li>
  84. <li>
  85. <a href={globalConfig.context + '/portal/activity/activityIndex.html'}>活动圈</a>
  86. <ul className="secondary_navigation_nav" style={{ 'width': (2 * 75) + 'px', left: '-' + (2 * 75 / 2 - 74.25 / 2) + 'px' }}>
  87. <li><a href={globalConfig.context + '/portal/activity/activityList.html?type=0'}>在线直播</a></li>
  88. <li><a href={globalConfig.context + '/portal/activity/activityList.html?type=1'}>线下现场</a></li>
  89. </ul>
  90. </li >
  91. <li>
  92. <a href={globalConfig.context + '/portal/websiteBuild/websiteBuildIndex.html'}>建设兵团</a>
  93. <ul className="secondary_navigation_nav" style={{ 'width': (3 * 75) + 'px', left: '-' + (3 * 75 / 2 - 74.25 / 2) + 'px' }}>
  94. <li><a href={globalConfig.context + '/portal/websiteBuild/websiteBuildIndex.html#customized'}>平台定制</a></li>
  95. <li><a href={globalConfig.context + '/portal/websiteBuild/websiteBuildIndex.html#operates'}>平台运营</a></li>
  96. <li><a href={globalConfig.context + '/portal/websiteBuild/websiteBuildIndex.html#event_planning'}>活动筹划</a></li>
  97. </ul>
  98. </li>
  99. <li>
  100. <a href={globalConfig.context + '/portal/international/internationalIndex.html'}>国际业务</a>
  101. <ul className="secondary_navigation_nav" style={{ 'width': (3 * 75) + 'px', left: '-' + (3 * 75 / 2 - 74.25 / 2) + 'px' }}>
  102. <li><a href={globalConfig.context + '/portal/international/internationalIndex.html#internationalTechnology'}>国际技术</a></li>
  103. <li><a href={globalConfig.context + '/portal/international/internationalIndex.html#internationalPartner'}>国际伙伴</a></li>
  104. <li><a href={globalConfig.context + '/portal/international/internationalIndex.html#internationalExpert'}>国际专家</a></li>
  105. </ul>
  106. </li>
  107. <li>
  108. <a href={globalConfig.context + '/portal/service/serviceIndex.html'}>服务汇</a>
  109. <ul className="secondary_navigation_nav" style={{ 'width': (3 * 75) + 'px', left: '-' + (3 * 75 / 2 - 74.25 / 2) + 'px' }}>
  110. <li ><a href={globalConfig.context + '/portal/highTech/authentication.html'}>高企认定</a></li>
  111. <li ><a href={globalConfig.context + '/portal/ipr/service.html'}>知识产权</a></li >
  112. <li ><a href={globalConfig.context + '/portal/evaluation/index.html'}>技术评估</a></li>
  113. </ul>
  114. </li>
  115. <li>
  116. <a href={globalConfig.context + '/portal/news/newsIndex.html'}>策源地</a>
  117. <ul className="secondary_navigation_nav" style={{ 'width': (4 * 75) + 'px', left: '-' + (4 * 75 / 2 - 74.25 / 2) + 'px' }}>
  118. <li><a href={globalConfig.context + '/portal/news/newsDetails.html?type=1'}>新闻快讯</a></li>
  119. <li><a href={globalConfig.context + '/portal/news/newsDetails.html?type=3'}>技淘新闻</a></li>
  120. <li><a href={globalConfig.context + '/portal/news/newsDetails.html?type=4'}>科技政策</a></li>
  121. <li><a href={globalConfig.context + '/portal/news/newsDetails.html?type=2'}>政府往来</a></li>
  122. </ul>
  123. </li>
  124. <li>
  125. <a href={globalConfig.context + '/portal/entrepreneurship/entrepreneurshipIndex.html'}>创业圈</a>
  126. <ul className="secondary_navigation_nav" style={{ 'width': (3 * 75) + 'px', left: '-' + (3 * 75 / 2 - 74.25 / 2) + 'px' }}>
  127. <li><a href={globalConfig.context + '/portal/entrepreneurship/entrepreneurshipIndex.html'}>项目圈</a></li>
  128. <li><a href={globalConfig.context + '/portal/entrepreneurship/entrepreneurshipIndex.html#chuangke'}>创客圈</a></li>
  129. <li><a href={globalConfig.context + '/portal/entrepreneurship/entrepreneurshipIndex.html#jieyi'}>结义园</a></li>
  130. </ul>
  131. </li>
  132. <li>
  133. <a href={globalConfig.context + '/portal/financial/financialIndex.html'}>金融圈</a>
  134. <ul className="secondary_navigation_nav" style={{ 'width': (1 * 75) + 'px', left: '-' + (1 * 75 / 2 - 74.25 / 2) + 'px' }}>
  135. <li ><a href={globalConfig.context + '/portal/financial/financialIndex.html'}>金融街</a></li>
  136. </ul>
  137. </li>
  138. <li>
  139. <a href={globalConfig.context + '/portal/residentIntegration/index.html'}>军民融合</a>
  140. </li>
  141. </ul>
  142. </div>
  143. </div>
  144. <div className="secondary_navigation"></div>
  145. </div>
  146. </div>
  147. )
  148. }
  149. });
  150. export default LoginTop;