添加评论

This commit is contained in:
yi-ge 2020-07-10 18:01:08 +08:00
parent 80192652ed
commit 2507d7bff7
3 changed files with 14 additions and 1 deletions

View File

@ -26,6 +26,10 @@ export default {
console.log(data)
window.opener.localStorage.visitorToken = data.token
window.opener.authSuccess(data)
window.close()
this.$finishLoad()
},
methods: {

View File

@ -437,7 +437,12 @@ export default {
}
},
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 () {

View File

@ -63,3 +63,7 @@ window.onload = function () {
}
window.Vditor = vditor
function authSuccess (data) { // eslint-disable-line
console.log('授权成功', data)
}