码迷,mamicode.com
首页 > Web开发 > 详细

微博第三方js-sdk登录

时间:2019-03-20 20:50:33      阅读:352      评论:0      收藏:0      [点我收藏+]

标签:back   his   any   check   llb   sha   csharp   第三方   callback   

weiboLogin() {
      const _this = this
      WB2.login(function() { // 登录授权
        if (WB2.checkLogin()) {
          let params = ‘‘
          params = _this.getdescookie(‘weibojs_4039494981‘)
          request.get(‘你的后端接口?‘ + params).then((res) => {
          })
          // WB2.anyWhere(function(W) {
          //   W.parseCMD(‘/account/get_uid.json‘, function(oResult1, bStatus) {
          //     console.log(_this.getdescookie(‘weibojs_4039494981‘))
          //     debugger
          //     if (bStatus) {
          //       console.log(_this.getdescookie(‘weibojs_4039494981‘))
          //       debugger
          //       W.parseCMD(‘/users/show.json‘, function(oResult2, bStatus) {
          //         if (bStatus) {
          //           console.log(_this.getdescookie(‘weibojs_4039494981‘))
          //           debugger
          //           let params = ‘‘
          //           params = _this.getdescookie(‘weibojs_4039494981‘)
          //           request.get(‘http://10.30.0.146:8000/auth/login/weibo?‘ + params).then((res) => {
          //           })
          //         }
          //       }, { uid: oResult1.uid }, { method: ‘get‘, cache_time: 30 })
          //     }
          //   }, {}, { method: ‘get‘, cache_time: 30 })
          // })
        }
      })
    },

  

 

 

 

weiboLogin() {
      const _this = this
      WB2.login(function() { // 登录授权
        if (WB2.checkLogin()) {
          let params = ‘‘
          params = _this.getdescookie(‘weibojs_4039494981‘)
          request.get(‘http://10.30.0.146:8000/auth/login/weibo?‘ + params).then((res) => {
          })
        }
      })
    },

 

// const _this = this
    // WB2.anyWhere(function(W) {
    //   W.widget.connectButton({
    //     id: ‘wb_connect_btn‘,
    //     type: ‘3,2‘,
    //     callback: {
    //       login: function(o) {
    //         let params = ‘‘
    //         params = _this.getdescookie(‘weibojs_4039494981‘)
    //         console.log(params)
    //         request.get(‘http://10.30.0.146:8000/auth/login/weibo?‘ + params).then((res) => {
    //         })
    //       },
    //       logout: function() {
    //         alert(‘logout‘)
    //       }
    //     }
    //   })
    // })

  

  

微博第三方js-sdk登录

标签:back   his   any   check   llb   sha   csharp   第三方   callback   

原文地址:https://www.cnblogs.com/cina33blogs/p/10567349.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!