Commit 5710aac2 authored by Facius's avatar Facius

chore: 注释

parent 7f51e4bf
...@@ -83,6 +83,7 @@ export default { ...@@ -83,6 +83,7 @@ export default {
const userInfo = user.userInfo const userInfo = user.userInfo
this.$u.vuex('userInfo', userInfo) this.$u.vuex('userInfo', userInfo)
this.uniLogin((code) => { this.uniLogin((code) => {
// 登录
const data = { const data = {
code: code, code: code,
avatar: userInfo.avatarUrl, avatar: userInfo.avatarUrl,
...@@ -107,7 +108,17 @@ export default { ...@@ -107,7 +108,17 @@ export default {
uni.hideLoading() uni.hideLoading()
this.$u.vuex('vuex_token', res.token) this.$u.vuex('vuex_token', res.token)
this.$u.vuex('openId', res.openId) this.$u.vuex('openId', res.openId)
// 如果已经绑定了手机号
if (res.phoneNumber) { if (res.phoneNumber) {
// 更新手机号码
// this.$u.api
// .updateUserInfo({
// phoneNumber: res.phoneNumber,
// })
// .then((ret) => {})
// 跳转到特定页面
if (this.returnUrl) { if (this.returnUrl) {
if (this.returnUrl === 'pages/learn/selectCategory') { if (this.returnUrl === 'pages/learn/selectCategory') {
this.queryMyQuestionWarehouseDetail() this.queryMyQuestionWarehouseDetail()
...@@ -124,6 +135,7 @@ export default { ...@@ -124,6 +135,7 @@ export default {
}) })
} }
} else { } else {
// 还没有绑定郭手机号
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '授权成功', title: '授权成功',
type: 'success', type: 'success',
...@@ -145,6 +157,7 @@ export default { ...@@ -145,6 +157,7 @@ export default {
}) })
} else if (e.detail.encryptedData && e.detail.iv) { } else if (e.detail.encryptedData && e.detail.iv) {
this.uniLogin((code) => { this.uniLogin((code) => {
// 登录
const data = { const data = {
code: code, code: code,
avatar: this.userInfo.avatarUrl, avatar: this.userInfo.avatarUrl,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment