|
@@ -58,29 +58,28 @@ export default {
|
|
|
success: res => {
|
|
|
this.isUserInfo = false
|
|
|
this.userInfo = res.userInfo
|
|
|
- let params = {
|
|
|
+ // 验证邀请码
|
|
|
+ this.UserService.userInvitation({
|
|
|
invitationCode: this.invitationCode,
|
|
|
nickName: res.userInfo.nickName,
|
|
|
openid: uni.getStorageSync('openid')
|
|
|
- }
|
|
|
- // 验证邀请码
|
|
|
- this.UserService.userInvitation(params)
|
|
|
- .then(response => {
|
|
|
- console.log(response)
|
|
|
- // 保存用户信息
|
|
|
- this.login(response.data)
|
|
|
- this.$store.commit('updateStatus', response.data)
|
|
|
- // 登录成功提示
|
|
|
- this.$util.msg('登录成功', 1500, false, 'success')
|
|
|
- setTimeout(() => {
|
|
|
- this.$api.navigateTo(`/pages/index/index`)
|
|
|
- }, 1500)
|
|
|
- })
|
|
|
- .catch(error => {
|
|
|
- this.loginMessage = error.msg
|
|
|
- this.isUserInfo = false
|
|
|
- // this.$util.msg(error.msg, 2000)
|
|
|
- })
|
|
|
+ })
|
|
|
+ .then(response => {
|
|
|
+ console.log(response)
|
|
|
+ // 保存用户信息
|
|
|
+ this.login(response.data)
|
|
|
+ this.$store.commit('updateStatus', response.data)
|
|
|
+ // 登录成功提示
|
|
|
+ this.$util.msg('登录成功', 1500, false, 'success')
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$api.navigateTo(`/pages/index/index`)
|
|
|
+ }, 1500)
|
|
|
+ })
|
|
|
+ .catch(error => {
|
|
|
+ this.loginMessage = error.msg
|
|
|
+ this.isUserInfo = false
|
|
|
+ // this.$util.msg(error.msg, 2000)
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -148,7 +147,6 @@ export default {
|
|
|
background-color: #000;
|
|
|
border-radius: 45rpx;
|
|
|
color: #fff;
|
|
|
- box-shadow: 4rpx 4rpx 40rpx rgba(0, 0, 0, 0.2);
|
|
|
margin-top: 40rpx;
|
|
|
}
|
|
|
.login-input {
|