添加微信登录
This commit is contained in:
parent
20345ae9ce
commit
f4da5d9455
@ -17,7 +17,21 @@ export default {
|
|||||||
if (!code) { this.notice = '<p style="color: #999">非法访问,缺少授权参数"code"。<p><br><br> <a href="https://www.wyr.me" target="_blank">返回首页<a>'; this.$finishLoad(); return }
|
if (!code) { this.notice = '<p style="color: #999">非法访问,缺少授权参数"code"。<p><br><br> <a href="https://www.wyr.me" target="_blank">返回首页<a>'; this.$finishLoad(); return }
|
||||||
|
|
||||||
if (type === 'weixin') {
|
if (type === 'weixin') {
|
||||||
|
const { data } = await this.$axios.post(`${process.env.baseURL}/visitor/user/weixin`, {
|
||||||
|
code,
|
||||||
|
app: 'wx9d5e677f533d1e84'
|
||||||
|
})
|
||||||
|
|
||||||
|
if (data.status !== 1) {
|
||||||
|
this.$toasted.show('微信登录失败,请重试或换用其它登录方式。', {
|
||||||
|
position: 'top-center',
|
||||||
|
duration: 5000
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
window.authSuccess(data)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const { data } = await this.$axios.post('/visitor/user/auth', {
|
const { data } = await this.$axios.post('/visitor/user/auth', {
|
||||||
|
Loading…
Reference in New Issue
Block a user