From 9a82bce9cf0ed4a51c1b0b0669eaa38cedbace07 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 16 七月 2020 16:35:58 +0800 Subject: [PATCH] 2020-07-16 --- src/components/header/index.jsx | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/src/components/header/index.jsx b/src/components/header/index.jsx index d373b64..c34965b 100644 --- a/src/components/header/index.jsx +++ b/src/components/header/index.jsx @@ -633,6 +633,16 @@ return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState)) } + gotoDoc = () => { + if (options.sysType === 'local' && window.GLOB.mainSystemApi) { + let ssodomain = window.GLOB.mainSystemApi.replace('/webapi/dostars', '') + let url = `${ssodomain}/doc/index.html#?appkey=${window.GLOB.appkey}&LoginUID=${sessionStorage.getItem('LoginUID')}` + window.open(url) + } else if (options.sysType === 'SSO' || options.sysType === 'cloud') { + window.open(`${window.location.href.replace(/\/index.html(.*)|\/#(.*)/ig, '')}/doc/index.html#?appkey=${window.GLOB.appkey}&LoginUID=${sessionStorage.getItem('LoginUID')}`) + } + } + render () { const { thdMenuList, searchkey } = this.state @@ -648,7 +658,8 @@ <Menu.Item className="header-subSystem" key={'sub' + index} onClick={() => {this.changeSystem(system)}}> {system.AppName} </Menu.Item> ))} </Menu.SubMenu> : null} */} - <Menu.Item key="2" onClick={this.logout}>{this.state.dict['main.logout']}</Menu.Item> + <Menu.Item key="2" onClick={this.gotoDoc}>{this.state.dict['main.doc']}</Menu.Item> + <Menu.Item key="3" onClick={this.logout}>{this.state.dict['main.logout']}</Menu.Item> </Menu> ) -- Gitblit v1.8.0