Merge branch 'beta' into xingze

beta-enc
kane 2 years ago
commit e23df71f98
  1. 27
      jianshui-ui/src/views/freedom/login.vue

@ -2,7 +2,7 @@
<div id="a-login"> <div id="a-login">
<h4 style="text-align: center;color: white;background: #00afff;margin: 0px;padding-top: 15px;padding-bottom: 15px; margin-bottom: 40px">自主授权登陆</h4> <h4 style="text-align: center;color: white;background: #00afff;margin: 0px;padding-top: 15px;padding-bottom: 15px; margin-bottom: 40px">自主授权登陆</h4>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm" size="medium" v-if="ruleForm.showone"> <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm" size="medium" v-if="ruleForm.showone" v-loading="loadingone">
<el-form-item label="税号" prop="nsrsbh"> <el-form-item label="税号" prop="nsrsbh">
<el-input v-model="ruleForm.nsrsbh" placeholder="请输入纳税人识别号"></el-input> <el-input v-model="ruleForm.nsrsbh" placeholder="请输入纳税人识别号"></el-input>
</el-form-item> </el-form-item>
@ -166,7 +166,8 @@ export default {
// { type: 'array', required: true, message: '', trigger: 'change' } // { type: 'array', required: true, message: '', trigger: 'change' }
] ]
}, },
loading : false loading : false,
loadingone: false
}; };
}, },
methods: { methods: {
@ -177,16 +178,23 @@ export default {
this.ruleForm.nsrInfo.dlsfmm = this.ruleForm.nsrInfo.gsnsmm; this.ruleForm.nsrInfo.dlsfmm = this.ruleForm.nsrInfo.gsnsmm;
this.ruleForm.nsrInfo.bsryxz = this.ruleForm.nsrInfo.zjh; this.ruleForm.nsrInfo.bsryxz = this.ruleForm.nsrInfo.zjh;
this.ruleForm.nsrInfo.gsnsyhm = this.ruleForm.nsrInfo.zjh; this.ruleForm.nsrInfo.gsnsyhm = this.ruleForm.nsrInfo.zjh;
this.loadingone = true;
login(this.ruleForm).then(res=>{ login(this.ruleForm).then(res=>{
if (res.code == 200){ if (res.code == 200){
this.ruleForm.traceno = res.msg; this.ruleForm.traceno = res.msg;
this.ruleForm.showone = false; let timer = setInterval(() => {
this.ruleForm.showtwo = true; this.fun(timer)
this.ruleForm.showthree = false; }, 5000)
}else { }else {
this.loadingone = false;
this.$alert("<font color='red'>登陆失败,失败原因"+res.msg+"</font>") this.$alert("<font color='red'>登陆失败,失败原因"+res.msg+"</font>")
} }
}).catch(()=>{
this.loadingone = false;
this.ruleForm.showone = true;
this.ruleForm.showtwo = false;
this.ruleForm.showthree = false;
}); });
} else { } else {
console.log('error submit!!'); console.log('error submit!!');
@ -229,6 +237,14 @@ export default {
this.ruleForm.showtwo = false; this.ruleForm.showtwo = false;
this.ruleForm.showthree = true; this.ruleForm.showthree = true;
this.loading = false; this.loading = false;
this.loadingone = false;
clearInterval(timer)
}else if(res.msg == "10011"){
this.ruleForm.showone = false;
this.ruleForm.showtwo = true;
this.ruleForm.showthree = false;
this.loadingone = false;
this.loading = false;
clearInterval(timer) clearInterval(timer)
} }
}).catch(()=>{ }).catch(()=>{
@ -236,6 +252,7 @@ export default {
this.ruleForm.showtwo = true; this.ruleForm.showtwo = true;
this.ruleForm.showthree = false; this.ruleForm.showthree = false;
this.loading = false; this.loading = false;
this.loadingone = false;
clearInterval(timer) clearInterval(timer)
}); });
}, 0) }, 0)

Loading…
Cancel
Save