|
@@ -5,7 +5,7 @@
|
|
|
<div class="title2">茂名智慧应急一张图</div>
|
|
|
<div class="login-box">
|
|
|
<div class="login-tabs">
|
|
|
- <div v-for="(item, index) in tabs" :key="index" :class="tabActive === index ? 'login-tab tab-active' : 'login-tab'">{{ item }}</div>
|
|
|
+ <div v-for="(item, index) in tabs" :key="index" :class="tabActive === index ? 'login-tab tab-active' : 'login-tab'" @click="handleTab(index)">{{ item }}</div>
|
|
|
</div>
|
|
|
<el-form-item prop="username">
|
|
|
<el-input v-model="loginForm.username" type="text" size="large" auto-complete="off" placeholder="账号">
|
|
@@ -75,7 +75,7 @@ const userStore = useUserStore();
|
|
|
const router = useRouter();
|
|
|
const tabActive = ref(0);
|
|
|
// '粤政易扫码登录',
|
|
|
-const tabs = reactive(['账号密码登录']);
|
|
|
+const tabs = reactive(['账号密码登录', '粤政易登录']);
|
|
|
const loginForm = ref<LoginData>({
|
|
|
tenantId: '000000',
|
|
|
username: 'admin',
|
|
@@ -205,6 +205,17 @@ const doSocialLogin = (type: string) => {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+
|
|
|
+const handleTab = (tab) => {
|
|
|
+ if(tab == 1) {
|
|
|
+ // const redirect_uri = encodeURIComponent(import.meta.env.YZY_REDIRECT_URI);
|
|
|
+ // const tyrz_url = import.meta.env.YZY_TYRZ_URL + redirect_uri;
|
|
|
+ const redirect_uri = encodeURIComponent("http://19.155.220.206:8086/tyrz/login?src=yjdp&redirect="+redirect.value);
|
|
|
+ const tyrz_url = "https://xtbg.digitalgd.com.cn/zwrz/rz/sso/oauth/authorize?response_type=code&scope=all&client_id=zwrz_mmzhyj&redirect_uri="+redirect_uri;
|
|
|
+ window.location.href = tyrz_url;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
getCode();
|
|
|
initTenantList();
|
|
@@ -303,6 +314,7 @@ onMounted(() => {
|
|
|
border-bottom: 1px solid #eeeeee;
|
|
|
margin-bottom: 15px;
|
|
|
.login-tab {
|
|
|
+ padding: 0 10px;
|
|
|
}
|
|
|
.tab-active {
|
|
|
color: #5695eb;
|