|
@@ -82,7 +82,12 @@ Page({
|
|
|
var data = {
|
|
|
code: res.code
|
|
|
}
|
|
|
+ wx.showLoading({
|
|
|
+ title: '登录中...',
|
|
|
+ mask: true
|
|
|
+ })
|
|
|
ittLogin(data).then(loginRes => {
|
|
|
+ wx.hideLoading()
|
|
|
app.globalData.accessToken = loginRes.data.accessToken
|
|
|
that.setData({
|
|
|
isNeedPhone: loginRes.data.isNeedPhone,
|
|
@@ -116,7 +121,12 @@ Page({
|
|
|
}
|
|
|
}
|
|
|
}).catch(e => {
|
|
|
- console.log(e, 'ittlogin');
|
|
|
+ wx.hideLoading()
|
|
|
+ wx.showModal({
|
|
|
+ content: e,
|
|
|
+ confirmColor: '#333',
|
|
|
+ showCancel: false
|
|
|
+ })
|
|
|
})
|
|
|
}
|
|
|
}
|
|
@@ -146,10 +156,20 @@ Page({
|
|
|
let data = {
|
|
|
code: res.code
|
|
|
}
|
|
|
+ wx.showLoading({
|
|
|
+ title: '登录中...',
|
|
|
+ mask: true
|
|
|
+ })
|
|
|
ittLogin(data).then(ittLoginRes => {
|
|
|
+ wx.hideLoading()
|
|
|
that.bindMobileFn(phoneCode, ittLoginRes)
|
|
|
}).catch(e => {
|
|
|
- console.log(e, 'ittlogin');
|
|
|
+ wx.hideLoading()
|
|
|
+ wx.showModal({
|
|
|
+ content: e,
|
|
|
+ confirmColor: '#333',
|
|
|
+ showCancel: false
|
|
|
+ })
|
|
|
})
|
|
|
}
|
|
|
}
|
|
@@ -162,7 +182,12 @@ Page({
|
|
|
var data = {
|
|
|
mobileCode: phoneCode
|
|
|
}
|
|
|
+ wx.showLoading({
|
|
|
+ title: '加载中...',
|
|
|
+ mask: true
|
|
|
+ })
|
|
|
bindMobile(data).then(res => {
|
|
|
+ wx.hideLoading()
|
|
|
app.globalData.userInfo.phoneNumber = res.data
|
|
|
if (that.data.isRegister) {
|
|
|
that.setData({
|
|
@@ -184,6 +209,13 @@ Page({
|
|
|
app.globalData.userInfo.headImg = ittLoginRes.data.headImg
|
|
|
app.globalData.userInfo.userName = ittLoginRes.data.userName
|
|
|
}
|
|
|
+ }).catch(e => {
|
|
|
+ wx.hideLoading()
|
|
|
+ wx.showModal({
|
|
|
+ content: e,
|
|
|
+ confirmColor: '#333',
|
|
|
+ showCancel: false
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
bindNickNameInput (e) {
|
|
@@ -198,7 +230,12 @@ Page({
|
|
|
avatarUrl: that.data.avatarUrl,
|
|
|
nickName: that.data.nickname
|
|
|
}
|
|
|
+ wx.showLoading({
|
|
|
+ title: '加载中...',
|
|
|
+ mask: true
|
|
|
+ })
|
|
|
bindBaseInfo(data).then(res => {
|
|
|
+ wx.hideLoading()
|
|
|
app.globalData.userInfo.login = true
|
|
|
that.setData({
|
|
|
pageLogin: true,
|
|
@@ -208,6 +245,13 @@ Page({
|
|
|
})
|
|
|
app.globalData.userInfo.headImg = that.data.confirmAvatarUrl
|
|
|
app.globalData.userInfo.userName = that.data.confirmNickname
|
|
|
+ }).catch(e => {
|
|
|
+ wx.hideLoading()
|
|
|
+ wx.showModal({
|
|
|
+ content: e,
|
|
|
+ confirmColor: '#333',
|
|
|
+ showCancel: false
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
/**
|