Commit da003db4 authored by huangjie's avatar huangjie

*

parent f8bf9176
...@@ -268,7 +268,6 @@ ...@@ -268,7 +268,6 @@
}, },
getsms(){ getsms(){
logincaptchaSms(this.dxform).then(res=>{ logincaptchaSms(this.dxform).then(res=>{
console.log(res)
if(res.code == 200){ if(res.code == 200){
this.$message.success('已发送短信!') this.$message.success('已发送短信!')
let _this = this let _this = this
...@@ -325,16 +324,22 @@ ...@@ -325,16 +324,22 @@
froms.phonenumber = this.dxform.phonenumber froms.phonenumber = this.dxform.phonenumber
froms.smsCode = this.dxform.smsCode froms.smsCode = this.dxform.smsCode
smsLogin(JSON.stringify(froms)).then(res => { smsLogin(JSON.stringify(froms)).then(res => {
setToken(res.data.token) if(res.code == 200) {
store.commit('SET_TOKEN', res.data.token) setToken(res.data.token)
setTenantid(res.data.tenantId) store.commit('SET_TOKEN', res.data.token)
defaultTenantid().then(res=>{ setTenantid(res.data.tenantId)
if(res.data.tenantId == "" || res.data.tenantId == null){//无默认企业id defaultTenantid().then(res => {
this.goin() if (res.data.tenantId == "" || res.data.tenantId == null) {//无默认企业id
}else{ this.goin()
this.$router.push({ path: this.redirect || "/" }).catch(()=>{}); } else {
} this.$router.push({ path: this.redirect || "/" }).catch(() => {
}) });
}
})
}else{
this.getCode()
this.showcode = true
}
}) })
} }
}) })
......
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