钉钉免登针对手机端优化
This commit is contained in:
parent
7d969e53b6
commit
cde0495ef5
@ -43,11 +43,20 @@ export default {
|
||||
},
|
||||
mounted () {
|
||||
if(this.isDingtalk()){
|
||||
|
||||
console.log('走钉钉免登流程')
|
||||
this.dingtalkLogin()
|
||||
this.checkDingTalkLogin()
|
||||
if(typeof this.$route.query.code == 'undefined'){
|
||||
console.log('走钉钉免登流程')
|
||||
this.dingtalkLogin()
|
||||
this.checkDingTalkLogin()
|
||||
} else {
|
||||
this.loginJump()
|
||||
}
|
||||
} else {
|
||||
|
||||
this.loginJump()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loginJump () {
|
||||
this.dataForm.verify = '验证中'
|
||||
console.log(this.$route.query)
|
||||
this.req.code = this.$route.query.code
|
||||
@ -68,10 +77,7 @@ export default {
|
||||
}
|
||||
this.hasSendCode = false;
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
},
|
||||
checkDingTalkLogin () {
|
||||
if(dingCode === null){
|
||||
if(this.tick < 30){
|
||||
@ -97,7 +103,7 @@ export default {
|
||||
},
|
||||
dingtalkLogin () {
|
||||
dd.runtime.permission.requestAuthCode({
|
||||
corpId: 'ding267474e759bbca1c35c2f4657eb6378f',
|
||||
corpId: 'ding02853c26606ba7d4a1320dcb25e91351',
|
||||
onSuccess(result){
|
||||
|
||||
dingCode = result
|
||||
@ -133,4 +139,3 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user