添加评论
This commit is contained in:
parent
80192652ed
commit
2507d7bff7
@ -26,6 +26,10 @@ export default {
|
|||||||
|
|
||||||
console.log(data)
|
console.log(data)
|
||||||
|
|
||||||
|
window.opener.localStorage.visitorToken = data.token
|
||||||
|
window.opener.authSuccess(data)
|
||||||
|
window.close()
|
||||||
|
|
||||||
this.$finishLoad()
|
this.$finishLoad()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -437,7 +437,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
login () {
|
login () {
|
||||||
window.open('https://github.com/login/oauth/authorize?client_id=ce1673a37333e47e482d&redirect_uri=https://www.wyr.me/auth', 'Github授权', 'scrollbars=yes,resizable=yes,status=no,location=yes,toolbar=no,menubar=no,width=800,height=600,left=0,top=0')
|
const newWindow = window.open('https://github.com/login/oauth/authorize?client_id=ce1673a37333e47e482d&redirect_uri=https://www.wyr.me/auth', 'Github授权', 'scrollbars=yes,resizable=yes,status=no,location=yes,toolbar=no,menubar=no,width=800,height=600,left=0,top=0')
|
||||||
|
|
||||||
|
newWindow.onload = function () {
|
||||||
|
// newWindow.location
|
||||||
|
// newWindow.close()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
head () {
|
head () {
|
||||||
|
@ -63,3 +63,7 @@ window.onload = function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
window.Vditor = vditor
|
window.Vditor = vditor
|
||||||
|
|
||||||
|
function authSuccess (data) { // eslint-disable-line
|
||||||
|
console.log('授权成功', data)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user