rk
16 小时以前 38d111cb6defedff3bf06314ca30d22a01faae22
mini-program/App.vue
@@ -4,10 +4,13 @@
         var that = this
         let href = window.location.href;
         if (this.$dd.env.platform !== 'notInDingTalk') {
            let corpId = href.substring(href.lastIndexOf('?corpid=') + 8, href.length)
            console.log('钉钉授权登录')
            let corpId = href.substring(href.lastIndexOf('?corpid=') + 8, href.lastIndexOf('#'))
            // dingy7xdyzffnegiaszo 正式
            // dingulzemj5bynjciapg 测试
            this.$dd.requestAuthCode({
               corpId: 'dingulzemj5bynjciapg',
               clientId: 'dingulzemj5bynjciapg',
               corpId: corpId,
               clientId: 'dingy7xdyzffnegiaszo',
               onSuccess: function(result) {
                  that.$u.api.ddLogin({
                     code: result.code,
@@ -15,17 +18,18 @@
                  }).then(res => {
                     if (res.code === 200) {
                        that.$store.commit('setToken', res.data.token)
                        this.$isResolve()
                        that.$isResolve()
                     }
                  })
               }
            });
         } else if (href.indexOf('?token') !== -1) {
            let token = href.substring(href.lastIndexOf('?token=') + 7, href.length)
            console.log('token免登')
            let token = href.substring(href.lastIndexOf('?token=') + 7, href.lastIndexOf('#'))
            that.$store.commit('setToken', token)
            this.$isResolve()
            that.$isResolve()
         } else {
            this.$isResolve()
            that.$isResolve()
         }
      },
      onShow: function() {