fix 电子税局登录功能调整

jianshui-ui
zhaoxingchang.sd 1 year ago
parent f6e77745e1
commit 138287b1d4
  1. 2
      jianshui-ui/src/permission.js
  2. 59
      jianshui-ui/src/views/digital/taxBureauLogin/index.vue
  3. 52
      jianshui-ui/src/views/freedom/taxBureauLogin/index.vue
  4. 6
      jianshui-ui/vue.config.js

@ -7,7 +7,7 @@ import { getToken } from '@/utils/auth'
NProgress.configure({ showSpinner: false }) NProgress.configure({ showSpinner: false })
const whiteList = ['/login', '/auth-redirect', '/bind', '/taxBureauLogin' const whiteList = ['/login', '/auth-redirect', '/bind', '/taxBureauLogin','/authNew'
, '/register', '/auth', '/XA', '/sdFile/*'] , '/register', '/auth', '/XA', '/sdFile/*']
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {

@ -33,7 +33,10 @@
<el-option v-for="item in dzsjList" :key="item.id" :label="item.yhm" :value="item"></el-option> <el-option v-for="item in dzsjList" :key="item.id" :label="item.yhm" :value="item"></el-option>
</el-select> </el-select>
</div> </div>
<div class="button"><el-button :loading="getQrCodeBtnloading" @click="getQrCodeBtn()" type="primary">获取认证二维码</el-button></div> <div class="button"><el-button :disabled="isCountingDown" @click="getQrCodeBtn()" type="primary">
<span v-if="isCountingDown">获取认证二维码</span>
<span v-else>{{ countdown }}<span>s</span></span>
</el-button></div>
</div> </div>
<div class="qrcode" ref="qrCodeUrl"></div> <div class="qrcode" ref="qrCodeUrl"></div>
<div class="qrcodetext" v-show="qrcodeShow">可将二维码图片发给认证人员进行身份认证手机端完成认证后自动同步认证结果开展后续数电业务操作</div> <div class="qrcodetext" v-show="qrcodeShow">可将二维码图片发给认证人员进行身份认证手机端完成认证后自动同步认证结果开展后续数电业务操作</div>
@ -116,6 +119,7 @@ export default {
yzm:'' yzm:''
}, },
zrrList:[], zrrList:[],
countdown:0,
zzrdialogVisible:false, zzrdialogVisible:false,
dxyzm:'', dxyzm:'',
zzrlx:'', zzrlx:'',
@ -124,7 +128,7 @@ export default {
rzid:'', rzid:'',
anewLoginBtnLoading:false, anewLoginBtnLoading:false,
getyzmBtnloading:false, getyzmBtnloading:false,
getQrCodeBtnloading:false isCountingDown:false
}; };
}, },
methods: { methods: {
@ -166,7 +170,9 @@ export default {
}); });
} }
if(data.hxff === "1"){ if(data.hxff === "1"){
this.postLogin() this.dxyzm = data.dxyzm
this.smsFrom.zh = this.form.name.yhm;
this.dialogVisible = true;
} }
if(data.hxff === "2"){ if(data.hxff === "2"){
let list = []; let list = [];
@ -180,9 +186,10 @@ export default {
this.zzrdialogVisible = true; this.zzrdialogVisible = true;
} }
if(data.hxff === "3"){ if(data.hxff === "3"){
this.dxyzm = data.dxyzm this.$message({
this.smsFrom.zh = this.form.name.yhm; message: '验证码发送成功',
this.dialogVisible = true; type: 'success'
});
} }
}).finally(()=>{ }).finally(()=>{
this.anewLoginBtnLoading = false; this.anewLoginBtnLoading = false;
@ -222,7 +229,20 @@ export default {
}, },
// //
getQrCodeBtn(){ getQrCodeBtn(){
this.getQrCodeBtnloading = true; if (this.isCountingDown) {
return; //
}
//
//
this.isCountingDown = true;
this.timer = setInterval(() => {
if (this.countdown > 0) {
this.countdown--;
} else {
//
this.isCountingDown = false;
this.countdown = 120;
clearInterval(this.timer); //
getRpaQrCodeApi({yhm: this.formQr.name.yhm}).then(({data})=>{ getRpaQrCodeApi({yhm: this.formQr.name.yhm}).then(({data})=>{
this.$refs.qrCodeUrl.innerHTML = ''; this.$refs.qrCodeUrl.innerHTML = '';
let qrcode = new QRCode(this.$refs.qrCodeUrl, { let qrcode = new QRCode(this.$refs.qrCodeUrl, {
@ -239,13 +259,15 @@ export default {
}).finally(()=>{ }).finally(()=>{
this.getQrCodeBtnloading = false; this.getQrCodeBtnloading = false;
}) })
}
}, 1000);
}, },
polling(){ polling(){
postRpaAuthStatusApi({rzid:this.rzid,yhm:this.formQr.name.yhm}).then(({data})=>{ postRpaAuthStatusApi({rzid:this.rzid,yhm:this.formQr.name.yhm}).then(({data})=>{
window.clearInterval(this.timer); window.clearInterval(this.timer);
this.timer = null this.timer = null
if(data.slzt === '1' ){ if(data.slzt === '1' ){
this.timer = window.setInterval( ()=>{ this.polling() },3000) this.timer = window.setInterval( ()=>{ this.polling() },3000)
} }
if(data.slzt === '2' ) { if(data.slzt === '2' ) {
@ -295,11 +317,13 @@ export default {
//height: 30px; //height: 30px;
width: 100%; width: 100%;
} }
width: 100%; width: 100%;
height: calc(75vh); height: calc(75vh);
margin-top: 150px; margin-top: 150px;
display: flex; display: flex;
justify-content: center; justify-content: center;
#accountLogin { #accountLogin {
width: 400px; width: 400px;
height: 400px; height: 400px;
@ -309,28 +333,34 @@ export default {
font-size: 20px; font-size: 20px;
font-weight: 500; font-weight: 500;
} }
.form { .form {
margin: 12% 0; margin: 12% 0;
} }
.button { .button {
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
} }
#authentication { #authentication {
margin-top: -100px; margin-top: -100px;
width: 500px; width: 500px;
height: 400px; height: 400px;
.at_title { .at_title {
text-align: center; text-align: center;
} }
.qrcode { .qrcode {
width: 100px; width: 100px;
height: 100px; height: 100px;
margin: auto; margin: auto;
margin-top: 40px; margin-top: 40px;
} }
.qrcodetext { .qrcodetext {
padding-top: 70px; padding-top: 70px;
font-size: 12px; font-size: 12px;
@ -338,15 +368,19 @@ export default {
font-weight: 400; font-weight: 400;
color: #666; color: #666;
} }
.at_input { .at_input {
margin-top: 40px; margin-top: 40px;
.at_labe { .at_labe {
line-height: 30px; line-height: 30px;
width: 120px; width: 120px;
} }
display: flex; display: flex;
height: 40px; height: 40px;
justify-items: center; justify-items: center;
.select { .select {
margin: 0 10px; margin: 0 10px;
} }
@ -355,6 +389,7 @@ export default {
} }
.dialog { .dialog {
.dialog_title { .dialog_title {
@ -364,6 +399,7 @@ export default {
margin: auto; margin: auto;
background: #fff4e3; background: #fff4e3;
border: 1px solid #e6a23c; border: 1px solid #e6a23c;
.dialog_text { .dialog_text {
margin-left: 10px; margin-left: 10px;
@ -371,6 +407,7 @@ export default {
height: 70px; height: 70px;
} }
} }
.dialog_body { .dialog_body {
.dialog_body_zh { .dialog_body_zh {
@ -379,28 +416,34 @@ export default {
align-items: center; align-items: center;
margin: 20px 0 0 25px; margin: 20px 0 0 25px;
height: 40px; height: 40px;
.label { .label {
width: 90px; width: 90px;
} }
.zh { .zh {
padding-top: 3px; padding-top: 3px;
} }
} }
.dialog_body_yzm { .dialog_body_yzm {
height: 40px; height: 40px;
margin: 20px 0 0 25px; margin: 20px 0 0 25px;
display: flex; display: flex;
align-items: center; align-items: center;
height: 40px; height: 40px;
.label { .label {
width: 90px; width: 90px;
} }
.input { .input {
margin-right: 20px; margin-right: 20px;
} }
} }
} }
.zzr { .zzr {
margin-left: 40px; margin-left: 40px;
} }

@ -56,7 +56,10 @@
<div class="dialog_body_yzm"> <div class="dialog_body_yzm">
<div class="label">验证码:</div> <div class="label">验证码:</div>
<div class="input"><el-input v-model="dxyzm" placeholder="请输入验证码"></el-input></div> <div class="input"><el-input v-model="dxyzm" placeholder="请输入验证码"></el-input></div>
<div><el-button :loading="getyzmBtnloading" @click="getyzmBtn()" type="primary">获取验证码</el-button></div> <div><el-button :disabled="getyzmBtnloading" @click="getyzmBtn()" type="primary">
<span v-if="!getyzmBtnloading">获取验证码</span>
<span v-else>{{countdown}} <span> s</span></span>
</el-button></div>
</div> </div>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -124,7 +127,9 @@ export default {
rzid:'', rzid:'',
anewLoginBtnLoading:false, anewLoginBtnLoading:false,
getyzmBtnloading:false, getyzmBtnloading:false,
getQrCodeBtnloading:false getQrCodeBtnloading:false,
countdown:60,
timec: null, //
}; };
}, },
methods: { methods: {
@ -164,9 +169,13 @@ export default {
message: '登录成功', message: '登录成功',
type: 'success' type: 'success'
}); });
this.dialogVisible = false;
} }
if(data.hxff === "1"){ if(data.hxff === "1"){
this.postLogin() this.dxyzm = data.dxyzm
this.ffm = '3'
this.smsFrom.zh = this.form.name.yhm;
this.dialogVisible = true;
} }
if(data.hxff === "2"){ if(data.hxff === "2"){
let list = []; let list = [];
@ -179,22 +188,40 @@ export default {
} }
this.zzrdialogVisible = true; this.zzrdialogVisible = true;
} }
if(data.hxff === "3"){
this.dxyzm = data.dxyzm
this.smsFrom.zh = this.form.name.yhm;
this.dialogVisible = true;
}
}).finally(()=>{ }).finally(()=>{
this.anewLoginBtnLoading = false; this.anewLoginBtnLoading = false;
}) })
}, },
// //
getyzmBtn(){ async getyzmBtn(){
this.getyzmBtnloading = true; if (this.getyzmBtnloading) {
return; //
}
//
this.ffm = '1' this.ffm = '1'
rpaLoginApi({yhm:this.form.name.yhm,mm:this.form.name.mm,ffm:this.ffm}).finally(()=>{ await rpaLoginApi({yhm:this.form.name.yhm,mm:this.form.name.mm,ffm:this.ffm}).then(({data})=>{
this.getyzmBtnloading = false; if(data.hxff === "3"){
this.ffm = data.hxff
this.$message({
message: '验证码发送成功',
type: 'success'
});
}
}) })
//
this.getyzmBtnloading = true;
this.timec = setInterval(() => {
if (this.countdown > 0) {
this.countdown--;
} else {
//
this.getyzmBtnloading = false;
this.countdown = 60;
clearInterval(this.timec); //
}
}, 1000);
}, },
yzmloginBtn(){ yzmloginBtn(){
if(!this.dxyzm){ if(!this.dxyzm){
@ -204,7 +231,6 @@ export default {
}); });
}else { }else {
this.postLogin() this.postLogin()
this.dialogVisible = false;
} }
}, },

@ -10,8 +10,10 @@ const name = process.env.VUE_APP_TITLE || '简税平台管理系统' // 网页
const port = process.env.port || process.env.npm_config_port || 8088 // 端口 const port = process.env.port || process.env.npm_config_port || 8088 // 端口
// 'http://dev.goldentaxcloud.com:8081' // 'http://dev.goldentaxcloud.com:8081'
// www.goldentaxcloud.com:8080
const url = process.env.NODE_ENV === 'development' ? 'http://dev.goldentaxcloud.com:8081' : 'http://dev.goldentaxcloud.com:8081' // let development = 'http://dev.goldentaxcloud.com:8081'
let development = 'www.goldentaxcloud.com:8080'
const url = process.env.NODE_ENV === 'development' ? development : development
// vue.config.js 配置说明 // vue.config.js 配置说明
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions //官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions

Loading…
Cancel
Save