forked from github/dataease
Merge pull request #4102 from dataease/pr@dev@perf_auto_login
perf(登录): 第三方平台内免登进入DE隐藏登录以及修改密码按钮
This commit is contained in:
commit
6ec988e509
@ -115,6 +115,11 @@ public class XDingtalkServer {
|
|||||||
DeLogUtils.save(SysLogConstants.OPERATE_TYPE.LOGIN, SysLogConstants.SOURCE_TYPE.USER, sysUserEntity.getUserId(), null, null, null);
|
DeLogUtils.save(SysLogConstants.OPERATE_TYPE.LOGIN, SysLogConstants.SOURCE_TYPE.USER, sysUserEntity.getUserId(), null, null, null);
|
||||||
|
|
||||||
Cookie cookie_token = new Cookie("Authorization", token);
|
Cookie cookie_token = new Cookie("Authorization", token);
|
||||||
|
if (withoutLogin) {
|
||||||
|
Cookie platformCookie = new Cookie("inOtherPlatform", "true");
|
||||||
|
platformCookie.setPath("/");
|
||||||
|
response.addCookie(platformCookie);
|
||||||
|
}
|
||||||
cookie_token.setPath("/");
|
cookie_token.setPath("/");
|
||||||
|
|
||||||
response.addCookie(cookie_token);
|
response.addCookie(cookie_token);
|
||||||
|
@ -141,6 +141,11 @@ public class XLarkServer {
|
|||||||
cookie_token.setPath("/");
|
cookie_token.setPath("/");
|
||||||
|
|
||||||
response.addCookie(cookie_token);
|
response.addCookie(cookie_token);
|
||||||
|
if (withoutLogin) {
|
||||||
|
Cookie platformCookie = new Cookie("inOtherPlatform", "true");
|
||||||
|
platformCookie.setPath("/");
|
||||||
|
response.addCookie(platformCookie);
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
||||||
String msg = e.getMessage();
|
String msg = e.getMessage();
|
||||||
|
@ -85,7 +85,10 @@
|
|||||||
<el-dropdown-item>{{ $t('commons.ukey_title') }}</el-dropdown-item>
|
<el-dropdown-item>{{ $t('commons.ukey_title') }}</el-dropdown-item>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|
||||||
<router-link to="/person-pwd/index">
|
<router-link
|
||||||
|
v-if="!isOtherPlatform"
|
||||||
|
to="/person-pwd/index"
|
||||||
|
>
|
||||||
<el-dropdown-item>{{ $t('user.change_password') }}</el-dropdown-item>
|
<el-dropdown-item>{{ $t('user.change_password') }}</el-dropdown-item>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|
||||||
@ -93,6 +96,7 @@
|
|||||||
<el-dropdown-item>{{ $t('commons.about_us') }}</el-dropdown-item>
|
<el-dropdown-item>{{ $t('commons.about_us') }}</el-dropdown-item>
|
||||||
</router-link>
|
</router-link>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
|
v-if="!isOtherPlatform"
|
||||||
divided
|
divided
|
||||||
@click.native="logout"
|
@click.native="logout"
|
||||||
>
|
>
|
||||||
@ -132,8 +136,7 @@ import { getSysUI } from '@/utils/auth'
|
|||||||
import { pluginLoaded } from '@/api/user'
|
import { pluginLoaded } from '@/api/user'
|
||||||
import { initTheme } from '@/utils/ThemeUtil'
|
import { initTheme } from '@/utils/ThemeUtil'
|
||||||
import TemplateMarket from '@/views/panel/templateMarket'
|
import TemplateMarket from '@/views/panel/templateMarket'
|
||||||
import { changeFavicon } from '@/utils/index'
|
import { changeFavicon, inOtherPlatform } from '@/utils/index'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Topbar',
|
name: 'Topbar',
|
||||||
components: {
|
components: {
|
||||||
@ -225,6 +228,9 @@ export default {
|
|||||||
sidebar() {
|
sidebar() {
|
||||||
return this.$store.state.app.sidebar
|
return this.$store.state.app.sidebar
|
||||||
},
|
},
|
||||||
|
isOtherPlatform() {
|
||||||
|
return inOtherPlatform()
|
||||||
|
},
|
||||||
...mapGetters([
|
...mapGetters([
|
||||||
'avatar',
|
'avatar',
|
||||||
'permission_routes',
|
'permission_routes',
|
||||||
|
@ -344,3 +344,11 @@ export const mergeCustomSortOption = (customSortList, sourceList) => {
|
|||||||
const result = [...customSortList, ...sourceList]
|
const result = [...customSortList, ...sourceList]
|
||||||
return [...new Set(result)]
|
return [...new Set(result)]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const inOtherPlatform = () => {
|
||||||
|
const cookieStr = Cookies.get('inOtherPlatform')
|
||||||
|
if (cookieStr && cookieStr === 'true') {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user