不同环境登录页不同

lijinlong
吕天方 3 months ago
parent 3ffc4127aa
commit dfc7d661e1

@ -5,9 +5,9 @@ VUE_APP_TITLE = 金鸡湖现代服务业品牌管理系统
ENV = 'development'
# 金鸡湖现代服务业品牌管理系统/开发环境
VUE_APP_BASE_API = 'http://192.168.0.116:9040'
# VUE_APP_BASE_API = 'http://192.168.0.116:9040'
# 测试环境数据库
# VUE_APP_BASE_API = 'http://39.101.188.84:9040'
VUE_APP_BASE_API = 'http://39.101.188.84:9040'
# 脱敏三方测试用数据库
# VUE_APP_BASE_API = 'http://39.101.188.84:9031'
# 正式环境数据库

@ -1,6 +1,6 @@
{
"name": "ruoyi",
"version": "1.0.202411221033",
"version": "1.0.202411290932",
"description": "金鸡湖现代服务业品牌管理系统",
"author": "若依",
"license": "MIT",

@ -43,8 +43,8 @@ export const constantRoutes = [
},
{
path: "/login",
component: () => import("@/views/login"),
// component: () => import("@/views/login_v1"), // 三方测试脱敏登录页
// component: () => import("@/views/login"), // 测试环境登录页
component: () => import("@/views/login_v1"), // 正式环境登录页
hidden: true,
},
{

@ -294,6 +294,7 @@ export default {
border-radius: 6px;
background: #ffffff;
width: 400px;
// height: 200px;
height: 420px;
padding: 25px 25px 5px 25px;
box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.15);

@ -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 {

Loading…
Cancel
Save