Commit 923658e1 authored by zhangyanni's avatar zhangyanni

登录注册

parent d9d74af8
<template> <template>
<div class="wrapper"> <div class="wrapper" element-loading-background="rgba(0, 0, 0, 0.8)">
<p>{{$t('completeInfo.title')}}</p> <p>{{$t('completeInfo.title')}}</p>
<el-form :model="infoForm" :rules="rules" ref="infoForm" <el-form :model="infoForm" :rules="rules" ref="infoForm"
class="demo-loginForm"> class="demo-loginForm">
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<vue-select :options="options" maxHeight="200px" v-model.trim="infoForm.name" :placeholder="$t('completeInfo.placeholderReferName')"></vue-select> <vue-select :options="options" maxHeight="200px" v-model.trim="infoForm.name" :placeholder="$t('completeInfo.placeholderReferName')"></vue-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" class="loginButton" :disabled="disabledFlag>0" @click="handleRegister('infoForm')">{{$t("commonTips.completeRegister")}} <el-button type="primary" class="loginButton" :disabled="disabledFlag>0" @click="handleRegister('infoForm')" v-loading.fullscreen="fullscreenLoading">{{$t("commonTips.completeRegister")}}
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -143,6 +143,7 @@ ...@@ -143,6 +143,7 @@
}], }],
disabledFlag:0, disabledFlag:0,
flagClassName:"china", flagClassName:"china",
fullscreenLoading:false
} }
}, },
methods:{ methods:{
...@@ -190,7 +191,9 @@ ...@@ -190,7 +191,9 @@
//提交完善资料 //提交完善资料
submitCompleteInfo(params){ submitCompleteInfo(params){
let that =this; let that =this;
this.fullscreenLoading = true;
api.postCompleteInfoAxios(params).then((res)=>{ api.postCompleteInfoAxios(params).then((res)=>{
this.fullscreenLoading = false;
if(res.code==0){ if(res.code==0){
that.$router.replace("/successCmpt"); that.$router.replace("/successCmpt");
window.localStorage.setItem("userInfo",that.Base64.encode(JSON.stringify(res.result))); window.localStorage.setItem("userInfo",that.Base64.encode(JSON.stringify(res.result)));
......
<template> <template>
<div class="wrapper"> <div class="wrapper" element-loading-background="rgba(0, 0, 0, 0.8)">
<p>{{$t('register.title')}}</p> <p>{{$t('register.title')}}</p>
<el-tabs v-model.trim="activeName"> <el-tabs v-model.trim="activeName">
<el-tab-pane :label="$t('register.registerEmail')" name="first"> <el-tab-pane :label="$t('register.registerEmail')" name="first">
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
</el-checkbox> </el-checkbox>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" class="loginButton" :disabled="flag>0" @click="handleRegister('registerForm')">{{$t("topNav.register")}} <el-button type="primary" class="loginButton" :disabled="flag>0" @click="handleRegister('registerForm')" v-loading.fullscreen="fullscreenLoading">{{$t("topNav.register")}}
</el-button> </el-button>
</el-form-item> </el-form-item>
<el-form-item class="registerButton"> <el-form-item class="registerButton">
...@@ -112,6 +112,7 @@ ...@@ -112,6 +112,7 @@
message:null message:null
}, },
showMessageInfo:false, showMessageInfo:false,
fullscreenLoading:false
} }
}, },
methods: { methods: {
...@@ -140,7 +141,9 @@ ...@@ -140,7 +141,9 @@
submitRegisterFormFunc(){ submitRegisterFormFunc(){
let that =this; let that =this;
this.registerForm.password = this.$md5(this.registerForm.password); this.registerForm.password = this.$md5(this.registerForm.password);
this.fullscreenLoading = true;
api.postEmailRegisterAxios(this.registerForm).then((res)=>{ api.postEmailRegisterAxios(this.registerForm).then((res)=>{
this.fullscreenLoading = false;
if(res.code==0){ if(res.code==0){
window.localStorage.setItem("userInfo",this.Base64.encode(JSON.stringify(res.result))); window.localStorage.setItem("userInfo",this.Base64.encode(JSON.stringify(res.result)));
that.$router.replace({path:"/completeInfoCmpt"}); that.$router.replace({path:"/completeInfoCmpt"});
......
<template> <template>
<div class="wrapper"> <div class="wrapper" element-loading-background="rgba(0, 0, 0, 0.8)">
<p>{{$t('findPassword.title')}}</p> <p>{{$t('findPassword.title')}}</p>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" <el-form :model="ruleForm" :rules="rules" ref="ruleForm"
class="demo-loginForm"> class="demo-loginForm">
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<sliderCmpt @sendVerification="getVerification"></sliderCmpt> <sliderCmpt @sendVerification="getVerification"></sliderCmpt>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" class="loginButton" :disabled="flag>0" @click="handleSubmit('ruleForm')">{{$t("findPassword.confirm")}} <el-button type="primary" class="loginButton" :disabled="flag>0" @click="handleSubmit('ruleForm')" v-loading.fullscreen="fullscreenLoading">{{$t("findPassword.confirm")}}
</el-button> </el-button>
</el-form-item> </el-form-item>
<el-form-item class="registerButton"> <el-form-item class="registerButton">
...@@ -77,7 +77,8 @@ ...@@ -77,7 +77,8 @@
timer:null, timer:null,
showCount:true, showCount:true,
count:'', count:'',
flag:0 flag:0,
fullscreenLoading:false
} }
}, },
methods:{ methods:{
...@@ -118,7 +119,9 @@ ...@@ -118,7 +119,9 @@
account:this.lang==1?this.ruleForm.phone:this.ruleForm.email, account:this.lang==1?this.ruleForm.phone:this.ruleForm.email,
code:this.lang==1?this.ruleForm.code:this.ruleForm.emailCode code:this.lang==1?this.ruleForm.code:this.ruleForm.emailCode
},that =this; },that =this;
this.fullscreenLoading = true;
api.getModifyCodeAxios(params).then((res)=>{ api.getModifyCodeAxios(params).then((res)=>{
this.fullscreenLoading = false;
if(res.code==0){ if(res.code==0){
that.$router.replace("/modifyPasswordCmpt"); that.$router.replace("/modifyPasswordCmpt");
setTimeout(function(){ setTimeout(function(){
......
<template> <template>
<div class="wrapper"> <div class="wrapper" element-loading-background="rgba(0, 0, 0, 0.8)">
<p>{{$t('register.title')}}</p> <p>{{$t('register.title')}}</p>
<el-tabs v-model.trim="activeName"> <el-tabs v-model.trim="activeName">
<el-tab-pane :label="$t('register.registerByPhone')" name="first"> <el-tab-pane :label="$t('register.registerByPhone')" name="first">
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
</el-checkbox> </el-checkbox>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" class="loginButton" :disabled="flag>0" @click="handleRegister('registerForm')">{{$t("topNav.register")}} <el-button type="primary" class="loginButton" :disabled="flag>0" @click="handleRegister('registerForm')" v-loading.fullscreen="fullscreenLoading">{{$t("topNav.register")}}
</el-button> </el-button>
</el-form-item> </el-form-item>
<el-form-item class="registerButton"> <el-form-item class="registerButton">
...@@ -112,6 +112,7 @@ ...@@ -112,6 +112,7 @@
message:null message:null
}, },
showMessageInfo:false, showMessageInfo:false,
fullscreenLoading:false
} }
}, },
methods: { methods: {
...@@ -141,7 +142,9 @@ ...@@ -141,7 +142,9 @@
submitRegisterFormFunc(){ submitRegisterFormFunc(){
let that =this; let that =this;
this.registerForm.password = this.$md5(this.registerForm.password); this.registerForm.password = this.$md5(this.registerForm.password);
this.fullscreenLoading = true;
api.postPhoneRegisterAxios(this.registerForm).then((res)=>{ api.postPhoneRegisterAxios(this.registerForm).then((res)=>{
this.fullscreenLoading = false;
if(res.code==0){ if(res.code==0){
window.localStorage.setItem("userInfo",this.Base64.encode(JSON.stringify(res.result))); window.localStorage.setItem("userInfo",this.Base64.encode(JSON.stringify(res.result)));
that.$router.replace("/completeInfoCmpt"); that.$router.replace("/completeInfoCmpt");
......
<template> <template>
<div class="wrapper"> <div class="wrapper" element-loading-background="rgba(0, 0, 0, 0.8)">
<p>{{$t('findPassword.modifyTitle')}}</p> <p>{{$t('findPassword.modifyTitle')}}</p>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" <el-form :model="ruleForm" :rules="rules" ref="ruleForm"
class="demo-ruleForm"> class="demo-ruleForm">
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
autocomplete></el-input> autocomplete></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" class="loginButton" @click="handleSubmit('ruleForm')" :disabled="flag>0">{{$t('findPassword.confirmModify')}} <el-button type="primary" class="loginButton" @click="handleSubmit('ruleForm')" :disabled="flag>0" v-loading.fullscreen="fullscreenLoading">{{$t('findPassword.confirmModify')}}
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -42,7 +42,8 @@ ...@@ -42,7 +42,8 @@
{required: true, validator:this.checkConfirmPass, trigger: 'blur'} {required: true, validator:this.checkConfirmPass, trigger: 'blur'}
] ]
}, },
flag:0 flag:0,
fullscreenLoading:false
} }
}, },
methods:{ methods:{
...@@ -87,7 +88,9 @@ ...@@ -87,7 +88,9 @@
let params = { let params = {
newPwd:this.$md5(this.ruleForm.pass) newPwd:this.$md5(this.ruleForm.pass)
},that = this; },that = this;
this.fullscreenLoading = true;
api.modifyPassAxios(params).then((res)=>{ api.modifyPassAxios(params).then((res)=>{
this.fullscreenLoading = false;
if(res.code==0){ if(res.code==0){
window.localStorage.setItem("userInfo",this.Base64.encode(JSON.stringify(res.result))); window.localStorage.setItem("userInfo",this.Base64.encode(JSON.stringify(res.result)));
that.$router.replace("/passSuccessCmpt"); that.$router.replace("/passSuccessCmpt");
......
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