|
|
|
@ -11,7 +11,8 @@
|
|
|
|
|
<el-tab-pane label="企业用户登录" name="01"></el-tab-pane>
|
|
|
|
|
<el-tab-pane label="政务用户登录" name="02"></el-tab-pane>
|
|
|
|
|
</el-tabs>
|
|
|
|
|
<el-form-item prop="username">
|
|
|
|
|
<!-- v-show="userType == '02'" -->
|
|
|
|
|
<!-- <el-form-item prop="username">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="loginForm.username"
|
|
|
|
|
type="text"
|
|
|
|
@ -40,7 +41,7 @@
|
|
|
|
|
/>
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item prop="code" v-if="false">
|
|
|
|
|
<el-form-item prop="code" v-if="captchaEnabled">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="loginForm.code"
|
|
|
|
|
auto-complete="off"
|
|
|
|
@ -57,14 +58,14 @@
|
|
|
|
|
<div class="login-code">
|
|
|
|
|
<img :src="codeUrl" @click="getCode" class="login-code-img" />
|
|
|
|
|
</div>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-checkbox
|
|
|
|
|
</el-form-item> -->
|
|
|
|
|
<!-- <el-checkbox
|
|
|
|
|
v-model="loginForm.rememberMe"
|
|
|
|
|
style="margin: 0px 0px 25px 0px"
|
|
|
|
|
>记住密码</el-checkbox
|
|
|
|
|
>
|
|
|
|
|
> -->
|
|
|
|
|
<el-form-item style="width: 100%">
|
|
|
|
|
<el-button
|
|
|
|
|
<!-- <el-button
|
|
|
|
|
:loading="loading"
|
|
|
|
|
size="medium"
|
|
|
|
|
type="primary"
|
|
|
|
@ -73,21 +74,45 @@
|
|
|
|
|
>
|
|
|
|
|
<span v-if="!loading">登 录</span>
|
|
|
|
|
<span v-else>登 录 中...</span>
|
|
|
|
|
</el-button>
|
|
|
|
|
<!-- <el-button
|
|
|
|
|
</el-button> -->
|
|
|
|
|
<el-button
|
|
|
|
|
size="medium"
|
|
|
|
|
type="primary"
|
|
|
|
|
v-if="userType == '02'"
|
|
|
|
|
style="width: 100%;margin-left: 0;margin-top: 20px;"
|
|
|
|
|
@click.native.prevent="changeHttp"
|
|
|
|
|
>
|
|
|
|
|
<span>政务通统一身份认证登录</span>
|
|
|
|
|
</el-button> -->
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
size="medium"
|
|
|
|
|
type="primary"
|
|
|
|
|
v-if="userType == '01'"
|
|
|
|
|
style="width: 100%;margin-left: 0;margin-top: 20px;"
|
|
|
|
|
@click.native.prevent="changeHttp"
|
|
|
|
|
>
|
|
|
|
|
<span>企业统一身份认证登录</span>
|
|
|
|
|
</el-button>
|
|
|
|
|
<div style="float: right" v-if="register">
|
|
|
|
|
<router-link class="link-type" :to="'/register'"
|
|
|
|
|
>立即注册</router-link
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<!-- <el-form-item style="width: 100%" class="enterBtnLogin">
|
|
|
|
|
<div class="wai-box">
|
|
|
|
|
<el-button
|
|
|
|
|
:loading="loading"
|
|
|
|
|
size="medium"
|
|
|
|
|
type="primary"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
@click.native.prevent="handleLogin"
|
|
|
|
|
>
|
|
|
|
|
<span v-if="!loading">企业登录</span>
|
|
|
|
|
<span v-else>登 录 中...</span>
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-form-item> -->
|
|
|
|
|
</el-form>
|
|
|
|
|
<!-- 底部 -->
|
|
|
|
|
<!-- <div class="el-login-footer">
|
|
|
|
@ -213,24 +238,28 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
// 将加密后的字节数组转换为 Base64 编码的字符串
|
|
|
|
|
var encryptedBase64 = forge.util.encode64(encryptedBytes);
|
|
|
|
|
// console.log("加密后数据", encryptedBase64);
|
|
|
|
|
this.$store
|
|
|
|
|
.dispatch("Login", {...this.loginForm,userType:this.userType, password: encryptedBase64})
|
|
|
|
|
.then(() => {
|
|
|
|
|
Cookies.set("newSysLogininfor", 1);
|
|
|
|
|
this.$router.push({ path: this.redirect || "/" }).catch(() => {});
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
// if (this.captchaEnabled) {
|
|
|
|
|
// this.getCode();
|
|
|
|
|
if (this.captchaEnabled) {
|
|
|
|
|
// if(this.userType == "02") {
|
|
|
|
|
this.getCode();
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
changeHttp(){
|
|
|
|
|
if(this.userType == '01') {
|
|
|
|
|
location.href = process.env.VUE_APP_BASE_API + "/system/singlelogin/login"
|
|
|
|
|
} else {
|
|
|
|
|
location.href = "https://qyt.sipac.gov.cn/sipsg-enterprise-mobile-manage/#/login"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
@ -265,7 +294,8 @@ export default {
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
background: #ffffff;
|
|
|
|
|
width: 400px;
|
|
|
|
|
height: 330px;
|
|
|
|
|
height: 200px;
|
|
|
|
|
// height: 420px;
|
|
|
|
|
padding: 25px 25px 5px 25px;
|
|
|
|
|
box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.15);
|
|
|
|
|
.el-input {
|
|
|
|
|