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