|
@@ -20,7 +20,11 @@ const LoginTop = React.createClass({
|
|
|
dataType: "json",
|
|
|
url: globalConfig.context + "/login",
|
|
|
}).done(function (data) {
|
|
|
- window.location.href = globalConfig.context + "/user/login.html"
|
|
|
+ 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() {
|
|
@@ -34,10 +38,16 @@ const LoginTop = React.createClass({
|
|
|
<div className="top-welcomeText">欢迎您来到科技认知计算交易平台-公测版</div>
|
|
|
<div className="top-alink">
|
|
|
<a href={globalConfig.context + "/portal/index.html"}>返回首页</a>
|
|
|
- {window.userData.number ?
|
|
|
+ {window.userData.mobile || window.adminData.mobile ?
|
|
|
<span>
|
|
|
- <a href={globalConfig.context + "/user/account/index"}>尊敬的{userData.nickname || userData.number}</a>
|
|
|
- <a onClick={this.logOut}>退出</a>
|
|
|
+ {(() => {
|
|
|
+ if (window.userData.mobile) {
|
|
|
+ return <a href={globalConfig.context + "/user/account/index"}>尊敬的 {userData.nickname || userData.number}</a>
|
|
|
+ } else if (window.adminData.mobile) {
|
|
|
+ return <a href={globalConfig.context + "/admin/index"}>尊敬的 {adminData.name || adminData.mobile}</a>
|
|
|
+ }
|
|
|
+ })()}
|
|
|
+ <a onClick={() => { this.logOut() }}>退出</a>
|
|
|
</span>
|
|
|
: <span>
|
|
|
<a href={globalConfig.context + "/user/login.html"}>登录</a>
|