|
@@ -31,10 +31,7 @@
|
|
|
</div>
|
|
|
<div class="vongi-btn vongi-login-btn">
|
|
|
<button class="mui-btn mui-btn-primary" @click="nextStep">
|
|
|
- 登录
|
|
|
- </button>
|
|
|
- <button type="button" class="mui-btn mui-btn-primary mui-btn-outlined" @click="register">
|
|
|
- 申请加入
|
|
|
+ 注册/登录
|
|
|
</button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -102,11 +99,11 @@
|
|
|
if (this.checkForm()) {
|
|
|
this.isLoading = true;
|
|
|
API_Person.findByNameAndPhone(this.subForm).then(response => {
|
|
|
-
|
|
|
- this.personId = response;
|
|
|
this.isLoading = false;
|
|
|
|
|
|
+ this.personId = response;
|
|
|
this.sendMsg();
|
|
|
+
|
|
|
}).catch(error => {
|
|
|
this.isLoading = false;
|
|
|
mui.toast(error);
|
|
@@ -117,7 +114,8 @@
|
|
|
sendMsg() {
|
|
|
this.isLoading = true;
|
|
|
API_Common.sendMsg({
|
|
|
- personId: this.personId
|
|
|
+ personId: this.personId,
|
|
|
+ telephone: this.subForm.phone,
|
|
|
}).then(response => {
|
|
|
//倒计时
|
|
|
this.msgTimeInterval();
|
|
@@ -150,22 +148,27 @@
|
|
|
API_Person.validateCode({
|
|
|
personId: this.personId,
|
|
|
verifyCode: this.verifyCode,
|
|
|
- openId: this.openId
|
|
|
+ openId: this.openId,
|
|
|
+ telephone: this.subForm.phone,
|
|
|
}).then(response => {
|
|
|
-
|
|
|
- this.set_token(response.token);
|
|
|
- if (response.personInfo.faceImageUrl) {
|
|
|
- //跳转到项目主页上去
|
|
|
- window.location.href = '../' + this.$route.query.project + '/#/master';
|
|
|
+ if (response.token) {
|
|
|
+ this.set_token(response.token);
|
|
|
+ if (response.personInfo.faceImageUrl) {
|
|
|
+ //跳转到项目主页上去
|
|
|
+ window.location.href = '../' + this.$route.query.project + '/#/master';
|
|
|
+ } else {
|
|
|
+ //上传头像
|
|
|
+ this.$router.push({
|
|
|
+ name: 'UserUploadPhoto',
|
|
|
+ query: {
|
|
|
+ personId: this.personId,
|
|
|
+ project: this.$route.query.project
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
} else {
|
|
|
- //上传头像
|
|
|
- this.$router.push({
|
|
|
- name: 'UserUploadPhoto',
|
|
|
- query: {
|
|
|
- personId: this.personId,
|
|
|
- project: this.$route.query.project
|
|
|
- }
|
|
|
- })
|
|
|
+ //注册
|
|
|
+ this.confirmRegister();
|
|
|
}
|
|
|
|
|
|
this.isLoading = false;
|
|
@@ -176,6 +179,18 @@
|
|
|
}
|
|
|
},
|
|
|
//注册
|
|
|
+ confirmRegister() {
|
|
|
+ var btnArray = ['否', '是'];
|
|
|
+ mui.confirm('当前用户不存在,是否立即注册?', '提示', btnArray, function(e) {
|
|
|
+ if (e.index == 1) {
|
|
|
+ this.$router.push({
|
|
|
+ name: 'RegisterHome',
|
|
|
+ query: {}
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //注册
|
|
|
register() {
|
|
|
this.$router.push({
|
|
|
name: 'RegisterHome',
|