top.jsx 867 B

123456789101112131415161718192021222324252627282930313233
  1. import React from 'react';
  2. import $ from "jquery/src/ajax";
  3. import './top.less';
  4. import logo from '../../../image/kede.png';
  5. const Bottom = React.createClass({
  6. logOut() {
  7. $.ajax({
  8. method: "get",
  9. dataType: "json",
  10. url: globalConfig.context + "/login",
  11. }).done(function (data) {
  12. window.location.href = globalConfig.context + "/RD/admin/login";
  13. });
  14. },
  15. render() {
  16. return (
  17. <div className="top">
  18. <img className="top-logo" src={logo} alt="" />
  19. 科研中心RD库
  20. <div className='top-rignt'>
  21. <span>{adminData.name || adminData.mobile}</span>
  22. <a onClick={this.logOut} style={{ color: "#fff", marginRight: "30px" }}>[ 退出 ]</a>
  23. <a href={globalConfig.context + "/admin/login"}>前往科德系统</a>
  24. </div>
  25. </div>
  26. );
  27. }
  28. });
  29. export default Bottom;