From 6cd1d790d0a55b8f763de8d1d129cca2772393e4 Mon Sep 17 00:00:00 2001
From: 李凌 <344137771@qq.com>
Date: Mon, 22 Dec 2025 18:37:14 +0800
Subject: [PATCH] 1
---
src/views/login/index.vue | 57 +++++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 49 insertions(+), 8 deletions(-)
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 5dd7b2e..82bdaa4 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -1,6 +1,8 @@
<template>
<div class="login">
- <div class="top" @click="onRoute('/homePage/index')"><img src="../../assets/image/icon-close.png" alt="" />
+ <div class="top flex justify-between items-center">
+ <img src="../../assets/image/icon-close.png" alt="" @click="onRoute('/homePage/index')" />
+ <div @click="onRoute('/customerService')">{{ $t('onLineService') }}</div>
</div>
<!-- <div class="divider mt-10"></div> -->
@@ -11,11 +13,20 @@
</span>
</div>
+ <div class="flex re-tab">
+ <div class="textColor1" :class="activeIndex == 1 ? 'active' : ''" @click="changeIndex(1)">
+ {{ $t('电子邮箱') }}
+ </div>
+ <div class="textColor1" :class="activeIndex == 2 ? 'active' : ''" @click="changeIndex(2)">
+ {{ $t('手机号码') }}
+ </div>
+ </div>
+
<ExInput style="padding-bottom:16px !important;" :placeholderText="getRegType(activeIndex, false)"
v-model="username" :dialCode="dialCode" @selectArea="onSelectArea" :area="isArea" :icon="icon"
@pressEnter="verifyLogin" />
- <ExInput style="padding-bottom:0 !important;" :placeholderText="$t('entryPassword')" v-model="password"
+ <ExInput style="padding-bottom:0 !important;" :placeholderText="$t('请输入登录密码')" v-model="password"
typeText="password" @pressEnter="verifyLogin" />
<div class="forget colorMain" @click="$router.push('/forget')">{{ $t('forgetPassword') }}</div>
@@ -42,21 +53,30 @@
import { useRouter } from 'vue-router';
import { showToast } from "vant";
import store from '@/store/store'
-import { LOGO } from "@/config";
+import { LOGO, customerServiceUrl } from "@/config";
const { t } = useI18n()
+const customer_service_url = ref(customerServiceUrl) // 客服链接,有值的话就会跳转到客服外链
const router = useRouter()
const onRoute = (path) => {
if (path == 'back') {
router.go(-1)
} else {
- router.push(path)
+ if (path == '/customerService') {
+ if (customer_service_url.value) {
+ window.location.href = customer_service_url.value;
+ } else {
+ router.push(path)
+ }
+ } else {
+ router.push(path)
+ }
}
}
let username = ref('')
let password = ref('')
-let activeIndex = ref(0)
+let activeIndex = ref(1)
let isArea = ref(false)
let dialCode = ref(0)
let icon = ref('')
@@ -67,9 +87,9 @@
case 0:
return bFlag ? t('account') : t('entryAccount');
case 1:
- return bFlag ? t('email') : t('entryEmail');
+ return bFlag ? t('电子邮箱') : t('entryEmail');
case 2:
- return bFlag ? t('phoneNum') : t('entryPhone');
+ return bFlag ? t('手机号码') : t('请输入手机号码');
}
}
const controlChildRef = ref(null)
@@ -148,7 +168,8 @@
_loginUser({
userName: (activeIndex.value == 0 || activeIndex.value == 1) ? username.value : `${dialCode.value}${username.value}`,
passWord: password.value,
- type: type.value
+ // type: type.value
+ type: '3' // 写死, 算所有的登录都是账户登录
}).then((res) => {
userStore[GET_USERINFO](res)
store.commit('user/SET_USERINFO', res)
@@ -168,6 +189,26 @@
background: $mainbgWhiteColor;
min-height: 100vh;
+ .re-tab {
+ margin-bottom: 22px;
+
+ div {
+ padding: 0 18px;
+ height: 34px;
+ line-height: 34px;
+ text-align: center;
+ border-radius: 4px;
+ margin-right: 10px;
+ }
+
+ .active {
+ // background: $US_tabActice_background;
+ background: $bg_yellow;
+ // color: $color_main;
+ color: $text_color4;
+ }
+ }
+
:deep(.textColor) {
color: $log-c;
}
--
Gitblit v1.9.3