import React from 'react';
import $ from "jquery/src/ajax";
import './top.less';
import logo from '../../../image/kede.png';

const Bottom = React.createClass({

  logOut() {
    $.ajax({
      method: "get",
      dataType: "json",
      url: globalConfig.context + "/login",
    }).done(function (data) {
      window.location.href = globalConfig.context + "/RD/admin/login";
    });
  },

  render() {
    return (
      <div className="top">
        <img className="top-logo" src={logo} alt="" />
        科研中心RD库
        <div className='top-rignt'>
          <span>{adminData.name || adminData.mobile}</span>
          <a onClick={this.logOut} style={{ color: "#fff", marginRight: "30px" }}>[ 退出 ]</a>
          <a href={globalConfig.context + "/admin/login"}>前往科德系统</a>
        </div>
      </div>
    );
  }
});

export default Bottom;