| | |
| | | var that = this |
| | | let href = window.location.href; |
| | | if (this.$dd.env.platform !== 'notInDingTalk') { |
| | | console.log(href) |
| | | console.log('钉钉授权登录') |
| | | let corpId = href.substring(href.lastIndexOf('?corpid=') + 8, href.lastIndexOf('#')) |
| | | console.log(corpId) |
| | | // dingy7xdyzffnegiaszo 正式 |
| | | // dingulzemj5bynjciapg 测试 |
| | | this.$dd.requestAuthCode({ |
| | | corpId: corpId, |
| | | clientId: 'dingulzemj5bynjciapg', |
| | | clientId: 'dingy7xdyzffnegiaszo', |
| | | onSuccess: function(result) { |
| | | that.$u.api.ddLogin({ |
| | | code: result.code, |
| | |
| | | } |
| | | }); |
| | | } else if (href.indexOf('?token') !== -1) { |
| | | console.log('token免登') |
| | | let token = href.substring(href.lastIndexOf('?token=') + 7, href.lastIndexOf('#')) |
| | | that.$store.commit('setToken', token) |
| | | that.$isResolve() |