|
@@ -7,9 +7,7 @@
|
|
|
<div class="imgBox"> </div>
|
|
|
<div class="loginBox">
|
|
|
<div class="ssoBox">
|
|
|
- <h4>钉钉扫码登录</h4>
|
|
|
<iframe id="iframe" :src="dingCodeLogin" frameborder="0" scrolling="no"></iframe>
|
|
|
- <div v-if="iframeZzcShow" class="iframeZzc"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -25,7 +23,6 @@ const oaLoginTitle = ref(appStore.title)
|
|
|
const dingCodeLogin = ref()
|
|
|
const redirect = ref<string>('')
|
|
|
const { currentRoute, push } = useRouter()
|
|
|
-const iframeZzcShow = ref(true)
|
|
|
import { usePermissionStore } from '@/store/modules/permission'
|
|
|
const permissionStore = usePermissionStore()
|
|
|
const init = async (type) => {
|
|
@@ -37,11 +34,19 @@ const init = async (type) => {
|
|
|
dingCodeLogin.value = res
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+const handleMessage = (event) => {
|
|
|
+ var origin = event.origin
|
|
|
+ let loginBox: any = document.querySelector('.loginBox')
|
|
|
+ loginBox.style = 'width:100%;height:100%;top:0;right:0;margin:0'
|
|
|
+ let iframe: any = document.querySelector('#iframe')
|
|
|
+ iframe.style = 'height:100%'
|
|
|
+}
|
|
|
onMounted(() => {
|
|
|
init(20)
|
|
|
- window.iframeZzc = function () {
|
|
|
- iframeZzcShow.value = false
|
|
|
+ if (typeof window.addEventListener != 'undefined') {
|
|
|
+ window.addEventListener('message', handleMessage, false)
|
|
|
+ } else if (typeof window.attachEvent != 'undefined') {
|
|
|
+ window.attachEvent('onmessage', handleMessage)
|
|
|
}
|
|
|
window.pushWin = function () {
|
|
|
push({ path: redirect.value || '/oaSystem/home' })
|
|
@@ -80,8 +85,8 @@ onMounted(() => {
|
|
|
}
|
|
|
|
|
|
.loginBox {
|
|
|
- width: 432px;
|
|
|
- height: 472px;
|
|
|
+ width: 478px;
|
|
|
+ height: 598px;
|
|
|
background: rgba(255, 255, 255, 0.26);
|
|
|
border-radius: 20px;
|
|
|
opacity: 1;
|
|
@@ -89,12 +94,12 @@ onMounted(() => {
|
|
|
position: absolute;
|
|
|
right: 310px;
|
|
|
top: 50%;
|
|
|
- margin-top: -236px;
|
|
|
+ margin-top: -299px;
|
|
|
padding: 10px;
|
|
|
.ssoBox {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
- background: #f9f9f9;
|
|
|
+ background: #fff;
|
|
|
border-radius: 20px;
|
|
|
opacity: 1;
|
|
|
position: relative;
|
|
@@ -107,19 +112,18 @@ onMounted(() => {
|
|
|
}
|
|
|
#iframe {
|
|
|
width: 100%;
|
|
|
- height: calc(100% - 60px);
|
|
|
+ height: calc(100%);
|
|
|
border-radius: 20px;
|
|
|
- background-color: #f9f9f9;
|
|
|
+ background-color: #ffffff;
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
- top: 60px;
|
|
|
z-index: 0;
|
|
|
}
|
|
|
.iframeZzc {
|
|
|
position: absolute;
|
|
|
width: 100%;
|
|
|
height: calc(100% - 60px);
|
|
|
- border: 24px solid #f9f9f9;
|
|
|
+ border: 24px solid #ffffff;
|
|
|
top: 60px;
|
|
|
left: 0;
|
|
|
border-top-width: 60px;
|