Commit ca4221cf authored by wxk's avatar wxk

登录注册接口ok

parent 5e5c9fca
...@@ -150,8 +150,7 @@ export default { ...@@ -150,8 +150,7 @@ export default {
return; return;
} }
axios.post(ApiConfig.SendEmailVcode,{"user":Email}).then(res => { axios.post(ApiConfig.SendEmailVcode,{"user":Email}).then(res => {
// console.log(res) if(res.data.code === 200){//发送成功并且注册成功
if(res.status == 200&& res.data == "emailsend success"){//发送成功并且注册成功
//获取验证码倒计时60s //获取验证码倒计时60s
this.count = TIME_COUNT; this.count = TIME_COUNT;
this.show = false; this.show = false;
...@@ -211,8 +210,7 @@ export default { ...@@ -211,8 +210,7 @@ export default {
return; return;
} }
axios.post(ApiConfig.Register,{"user":this.regist_email,"password":this.regist_password,"emailvcode":this.regist_yzm}).then(res => { axios.post(ApiConfig.Register,{"user":this.regist_email,"password":this.regist_password,"emailvcode":this.regist_yzm}).then(res => {
// console.log(res) if(res.data.code === 200){
if(res.data == 'register success'){
this.$notify({ this.$notify({
title: '提示', title: '提示',
message: "注册成功,请返回登陆", message: "注册成功,请返回登陆",
...@@ -227,7 +225,7 @@ export default { ...@@ -227,7 +225,7 @@ export default {
}else{ }else{
this.$notify({ this.$notify({
title: '提示', title: '提示',
message: res.data, message: res.data.msg,
type: 'error', type: 'error',
duration:'2000', duration:'2000',
}); });
...@@ -254,8 +252,7 @@ export default { ...@@ -254,8 +252,7 @@ export default {
return; return;
} }
axios.post(ApiConfig.Login,{"user":this.loginBody.email,"password":this.loginBody.password}).then(res => { axios.post(ApiConfig.Login,{"user":this.loginBody.email,"password":this.loginBody.password}).then(res => {
// console.log(res) if(res.data.code === 200){
if(res.data == "login success"){
this.$notify({ this.$notify({
title: '提示', title: '提示',
message: "登陆成功", message: "登陆成功",
...@@ -293,7 +290,7 @@ export default { ...@@ -293,7 +290,7 @@ export default {
}, },
//记住密码 //记住密码
doAfterlogin(res){ doAfterlogin(res){
if(res.status == 200){ if(res.data.code === 200){
if(this.isSaveLoginInfo){ if(this.isSaveLoginInfo){
localStorage["username"] = this.loginBody.email; localStorage["username"] = this.loginBody.email;
localStorage["password"] = this.loginBody.password; localStorage["password"] = this.loginBody.password;
...@@ -338,7 +335,7 @@ export default { ...@@ -338,7 +335,7 @@ export default {
} }
axios.post(ApiConfig.ResetPassword,{"user":this.forget_email,"password":this.forget_password,"emailvcode":this.forget_yzm}).then(res => { axios.post(ApiConfig.ResetPassword,{"user":this.forget_email,"password":this.forget_password,"emailvcode":this.forget_yzm}).then(res => {
// console.log(res) // console.log(res)
if(res.data == 'reset passwords success'){ if(res.data.code === 200){
this.$notify({ this.$notify({
title: '提示', title: '提示',
message: "重置密码成功,请返回登陆", message: "重置密码成功,请返回登陆",
...@@ -352,7 +349,7 @@ export default { ...@@ -352,7 +349,7 @@ export default {
}else{ }else{
this.$notify({ this.$notify({
title: '提示', title: '提示',
message: res.data, message: res.data.msg,
type: 'error', type: 'error',
duration:'2000', duration:'2000',
}); });
......
...@@ -72,7 +72,6 @@ ...@@ -72,7 +72,6 @@
"abnormal":"", //有profit,coin,base这三种异常类别 可选参数 "abnormal":"", //有profit,coin,base这三种异常类别 可选参数
"platform":[] //交易所种类 可选参数 "platform":[] //交易所种类 可选参数
} }
axios.post(ApiConfig.GetRobotBank,params).then( res => { axios.post(ApiConfig.GetRobotBank,params).then( res => {
// console.log(res.data.data); // console.log(res.data.data);
this.robotBankList = res.data.data this.robotBankList = res.data.data
......
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