https://open.weibo.com
<meta property="wb:webmaster" content="your appkey" />
<script src="http://tjs.sjs.sinajs.cn/open/api/js/wb.js?appkey=your appkey &debug=true" type="text/javascript" charset="utf-8"></script>
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')
// }
// }
// })
// })