fix 电子税局登录功能调整

jianshui-ui
zhaoxingchang.sd 1 year ago
parent f6e77745e1
commit 138287b1d4
  1. 2
      jianshui-ui/src/permission.js
  2. 123
      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 })
const whiteList = ['/login', '/auth-redirect', '/bind', '/taxBureauLogin'
const whiteList = ['/login', '/auth-redirect', '/bind', '/taxBureauLogin','/authNew'
, '/register', '/auth', '/XA', '/sdFile/*']
router.beforeEach((to, from, next) => {

@ -1,5 +1,5 @@
<template>
<div>
<div>
<el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
<el-menu-item index="1">账号登录</el-menu-item>
<el-menu-item index="2">身份认证</el-menu-item>
@ -33,7 +33,10 @@
<el-option v-for="item in dzsjList" :key="item.id" :label="item.yhm" :value="item"></el-option>
</el-select>
</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 class="qrcode" ref="qrCodeUrl"></div>
<div class="qrcodetext" v-show="qrcodeShow">可将二维码图片发给认证人员进行身份认证手机端完成认证后自动同步认证结果开展后续数电业务操作</div>
@ -86,7 +89,7 @@
</span>
</el-dialog>
</div>
</div>
</template>
<script>
import QRCode from 'qrcodejs2'
@ -116,6 +119,7 @@ export default {
yzm:''
},
zrrList:[],
countdown:0,
zzrdialogVisible:false,
dxyzm:'',
zzrlx:'',
@ -124,7 +128,7 @@ export default {
rzid:'',
anewLoginBtnLoading:false,
getyzmBtnloading:false,
getQrCodeBtnloading:false
isCountingDown:false
};
},
methods: {
@ -166,7 +170,9 @@ export default {
});
}
if(data.hxff === "1"){
this.postLogin()
this.dxyzm = data.dxyzm
this.smsFrom.zh = this.form.name.yhm;
this.dialogVisible = true;
}
if(data.hxff === "2"){
let list = [];
@ -180,9 +186,10 @@ export default {
this.zzrdialogVisible = true;
}
if(data.hxff === "3"){
this.dxyzm = data.dxyzm
this.smsFrom.zh = this.form.name.yhm;
this.dialogVisible = true;
this.$message({
message: '验证码发送成功',
type: 'success'
});
}
}).finally(()=>{
this.anewLoginBtnLoading = false;
@ -222,7 +229,20 @@ export default {
},
//
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})=>{
this.$refs.qrCodeUrl.innerHTML = '';
let qrcode = new QRCode(this.$refs.qrCodeUrl, {
@ -239,28 +259,30 @@ export default {
}).finally(()=>{
this.getQrCodeBtnloading = false;
})
}
}, 1000);
},
polling(){
postRpaAuthStatusApi({rzid:this.rzid,yhm:this.formQr.name.yhm}).then(({data})=>{
window.clearInterval(this.timer);
this.timer = null
if(data.slzt === '1' ){
this.timer = window.setInterval( ()=>{ this.polling() },3000)
}
if(data.slzt === '2' ){
if(data.slzt === '2' ) {
window.clearInterval(this.timer);
this.timer = null
this.$message({
message: '当前账号已认证通过',
type: 'success'
});
this.$nextTick(()=>{
this.$nextTick(() => {
this.$refs.qrCodeUrl.innerHTML = '';
this.qrcodeShow = false;
})
}
if(data.slzt === '3' ){
if (data.slzt === '3') {
this.$message({
message: '扫码失败',
type: 'success'
@ -275,14 +297,14 @@ export default {
let searchParams = new URLSearchParams(window.location.search);
this.loginKey.id = searchParams.get('id')
this.loginKey.key = searchParams.get('key')
this.$store.commit('SET_AUTH_STATUS',this.loginKey)
this.$store.commit('SET_AUTH_STATUS', this.loginKey)
},
mounted() {
if(this.loginKey.id !== '' && this.loginKey.key !== ''){
if (this.loginKey.id !== '' && this.loginKey.key !== '') {
this.getRpaAuthStatus()
}
},
beforeDestroy(){
beforeDestroy() {
window.clearInterval(this.timer);
this.timer = null
}
@ -290,64 +312,76 @@ export default {
}
</script>
<style scoped lang="scss">
.menu_body{
.menu_body {
::v-deep.el-input--suffix .el-input__inner {
//height: 30px;
width: 100%;
}
width: 100%;
height: calc(75vh);
margin-top: 150px;
display: flex;
justify-content: center;
#accountLogin{
#accountLogin {
width: 400px;
height: 400px;
//background-color: #6c5656;
.menu_body_text{
.menu_body_text {
text-align: center;
font-size: 20px;
font-weight: 500;
}
.form{
.form {
margin: 12% 0;
}
.button{
.button {
display: flex;
justify-content: center;
}
}
#authentication{
#authentication {
margin-top: -100px;
width: 500px;
height: 400px;
.at_title{
.at_title {
text-align: center;
}
.qrcode{
.qrcode {
width: 100px;
height: 100px;
margin: auto;
margin-top: 40px;
}
.qrcodetext{
.qrcodetext {
padding-top: 70px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666;
}
.at_input{
.at_input {
margin-top: 40px;
.at_labe{
.at_labe {
line-height: 30px;
width: 120px;
}
display: flex;
height: 40px;
justify-items: center;
.select{
.select {
margin: 0 10px;
}
}
@ -355,55 +389,64 @@ export default {
}
.dialog{
.dialog_title{
.dialog {
.dialog_title {
padding: 10px 10px 0 10px;
width: 460px;
display: flex;
margin: auto;
background: #fff4e3;
border: 1px solid #e6a23c;
.dialog_text{
.dialog_text {
margin-left: 10px;
width: 450px;
height: 70px;
}
}
.dialog_body{
.dialog_body_zh{
.dialog_body {
.dialog_body_zh {
height: 40px;
display: flex;
align-items: center;
margin: 20px 0 0 25px;
height: 40px;
.label{
.label {
width: 90px;
}
.zh{
.zh {
padding-top: 3px;
}
}
.dialog_body_yzm{
.dialog_body_yzm {
height: 40px;
margin: 20px 0 0 25px;
display: flex;
align-items: center;
height: 40px;
.label{
.label {
width: 90px;
}
.input{
.input {
margin-right: 20px;
}
}
}
.zzr{
.zzr {
margin-left: 40px;
}
}
}
</style>

@ -56,7 +56,10 @@
<div class="dialog_body_yzm">
<div class="label">验证码:</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>
<span slot="footer" class="dialog-footer">
@ -124,7 +127,9 @@ export default {
rzid:'',
anewLoginBtnLoading:false,
getyzmBtnloading:false,
getQrCodeBtnloading:false
getQrCodeBtnloading:false,
countdown:60,
timec: null, //
};
},
methods: {
@ -164,9 +169,13 @@ export default {
message: '登录成功',
type: 'success'
});
this.dialogVisible = false;
}
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"){
let list = [];
@ -179,22 +188,40 @@ export default {
}
this.zzrdialogVisible = true;
}
if(data.hxff === "3"){
this.dxyzm = data.dxyzm
this.smsFrom.zh = this.form.name.yhm;
this.dialogVisible = true;
}
}).finally(()=>{
this.anewLoginBtnLoading = false;
})
},
//
getyzmBtn(){
this.getyzmBtnloading = true;
async getyzmBtn(){
if (this.getyzmBtnloading) {
return; //
}
//
this.ffm = '1'
rpaLoginApi({yhm:this.form.name.yhm,mm:this.form.name.mm,ffm:this.ffm}).finally(()=>{
this.getyzmBtnloading = false;
await rpaLoginApi({yhm:this.form.name.yhm,mm:this.form.name.mm,ffm:this.ffm}).then(({data})=>{
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(){
if(!this.dxyzm){
@ -204,7 +231,6 @@ export default {
});
}else {
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 // 端口
// 'http://dev.goldentaxcloud.com:8081'
const url = process.env.NODE_ENV === 'development' ? 'http://dev.goldentaxcloud.com:8081' : 'http://dev.goldentaxcloud.com:8081'
// www.goldentaxcloud.com:8080
// 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 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions

Loading…
Cancel
Save