提交 61dd95da 作者: 毛细亚

123

上级 d695ffbf
......@@ -5,8 +5,6 @@
<script>
import {mapState, mapActions} from 'vuex'
import * as ww from '@wecom/jssdk'
console.log(ww,'ww')
export default {
name: 'HomeView',
// inject: ['authPromise'],
......@@ -20,13 +18,13 @@ export default {
}
},
created(){
console.log(window.location.href,'window.location.href')
},
computed: {
...mapState('user', ['userInfo'])
},
methods: {
getAuthUser() {
this.register()
},
}
}
......
// UnifiedLogin.vue
<template>
<div class="loginContent">
<div>
<div v-if="!showQrCode">
<div>
当前组织:<span class="current-org">{{ currentOrg.name }}</span>
<el-button type="text" @click="showOrgDialog = true">切换组织</el-button>
......@@ -47,6 +47,9 @@
<div v-if="dingUserInfo">钉钉用户:{{ dingUserInfo.name }}</div>
<div v-if="externalUserId">企微外部联系人ID:{{ externalUserId }}</div>
</div>
<div v-if="showQrCode">
跳转中 请稍等...
</div>
</div>
</template>
......@@ -73,6 +76,7 @@ export default {
qrLoading: false, // 控制二维码 loading
redirectUri: process.env.NODE_ENV === 'production' ? 'https://companywx.zwnet.cn/api/api/sidebar_login/ding' : 'https://companywx.zwwlkj03.top/api/api/sidebar_login/ding',
DDTestUrl:'',
showQrCode:false,
}
},
async mounted() {
......@@ -82,6 +86,7 @@ export default {
await this.initOrganization();
// 如果是钉钉扫码回调页面
if ( urlParams.type && urlParams.type === 'ding') {// 钉钉回调
this.showQrCode = true
console.log('进入钉钉回调')
this.handleDingCallback();
}else{
......@@ -229,9 +234,9 @@ export default {
this.DDTestUrl = url
// window.location.href = url;
},
// 7. 钉钉扫码回调页面处理
async handleDingCallback() {
// 在这里处理钉钉扫码成功的回调
const ddParams = getParams();
console.log(ddParams,'ddParams')
await this.getSignature();
......@@ -239,7 +244,6 @@ export default {
this.getCurExternalContact();
}, 2000);
},
// 8. 获取企微外部联系人
getCurExternalContact() {
ww.getCurExternalContact({
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论