bug处理

This commit is contained in:
2026-07-16 18:36:40 +08:00
parent 15971bffd9
commit 5f4aab8d04
7 changed files with 61 additions and 10 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 211 KiB

+1 -1
View File
@@ -344,7 +344,7 @@
&__quote-avatar { &__quote-avatar {
width: 0.38rem; width: 0.38rem;
height: 0.38rem; height: 0.38rem;
background: #D9E3EA; //background: #D9E3EA;
border-radius: 50%; border-radius: 50%;
flex-shrink: 0; flex-shrink: 0;
} }
+1 -1
View File
@@ -445,7 +445,7 @@
} }
.login-view__sms-status--error { .login-view__sms-status--error {
color: #E85635; color: #EF4444;
} }
/* ==================== 状态按钮(步骤二) ==================== */ /* ==================== 状态按钮(步骤二) ==================== */
+7
View File
@@ -92,6 +92,13 @@
&:hover { &:hover {
background: #EDF9FA; background: #EDF9FA;
} }
// 小屏(视口宽度 < 1440px)只显示第一个标签
@media (max-width: 1439px) {
& ~ & {
display: none;
}
}
} }
// 搜索框 // 搜索框
+44 -2
View File
@@ -99,7 +99,7 @@
"真没想到校招居然可以这么轻松高效!一周就收到了3个面试邀约。" "真没想到校招居然可以这么轻松高效!一周就收到了3个面试邀约。"
</p> </p>
<div class="home-mobile__quote-author"> <div class="home-mobile__quote-author">
<div class="home-mobile__quote-avatar"></div> <div class="home-mobile__quote-avatar"><img class="w45 h45 " src="@/assets/images/home/student-avatar-0.png" alt=""></div>
<div class="home-mobile__quote-info"> <div class="home-mobile__quote-info">
<span class="home-mobile__quote-name">李同学</span> <span class="home-mobile__quote-name">李同学</span>
<span class="home-mobile__quote-school">西安交通大学</span> <span class="home-mobile__quote-school">西安交通大学</span>
@@ -170,9 +170,51 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue' import { ref, onMounted, onUnmounted } from 'vue'
import { getDailyJobCount } from '@/utils/dailyJobCount' import { getDailyJobCount } from '@/utils/dailyJobCount'
// ==================== 移动端缩放重置 ====================
/**
* 确保 HomeMobile 页面不受全局 transform scale 缩放影响
* 部分浏览器中 remAdapt 插件的 recalc 在路由切换后未及时重新执行,
* 导致 body 上仍残留 PC 端 scale 样式,这里在组件挂载时主动重置
*/
function resetMobileScale() {
const docEl = document.documentElement
const body = document.body
const clientWidth = docEl.clientWidth || window.innerWidth
// 移动端首页 1rem = 视口宽度 / 3.90(设计稿 390px
const mobileFontSize = clientWidth / 3.90
docEl.style.fontSize = mobileFontSize + 'px'
// 清除 scale 缩放相关样式
body.style.width = ''
body.style.height = ''
body.style.minHeight = ''
body.style.overflowY = ''
body.style.transform = ''
body.style.transformOrigin = ''
docEl.style.height = ''
docEl.style.overflow = ''
docEl.style.setProperty('--app-height', '100vh')
docEl.style.setProperty('--chat-width', '100%')
}
/** 窗口 resize 时重新执行重置 */
function onResize() {
resetMobileScale()
}
onMounted(() => {
resetMobileScale()
window.addEventListener('resize', onResize)
window.addEventListener('orientationchange', onResize)
})
onUnmounted(() => {
window.removeEventListener('resize', onResize)
window.removeEventListener('orientationchange', onResize)
})
// 声明友盟统计 _czc 对象 // 声明友盟统计 _czc 对象
const _czc: any[] = (window as any)._czc || []; const _czc: any[] = (window as any)._czc || [];
(window as any)._czc = _czc; (window as any)._czc = _czc;
+7 -4
View File
@@ -60,7 +60,7 @@
<input v-model="phone" type="tel" class="login-view__phone-input" placeholder="请输入手机号码" maxlength="11" /> <input v-model="phone" type="tel" class="login-view__phone-input" placeholder="请输入手机号码" maxlength="11" />
</div> </div>
<!-- 发送验证码按钮 --> <!-- 发送验证码按钮 -->
<button class="login-view__send-btn" :disabled="!canSend" @click="handleSendCode">发送验证码</button> <button class="login-view__send-btn " :disabled="!canSend" @click="handleSendCode">发送验证码</button>
</template> </template>
<!-- 步骤二输入验证码登录 --> <!-- 步骤二输入验证码登录 -->
@@ -76,7 +76,7 @@
<span v-else-if="idx === otpValue.length && !isLoggingIn" class="login-view__otp-cursor"></span> <span v-else-if="idx === otpValue.length && !isLoggingIn" class="login-view__otp-cursor"></span>
</div> </div>
</div> </div>
<p v-if="smsStatusMsg" class="login-view__sms-status" :class="{ 'login-view__sms-status--error': smsStatusIsError }">{{ smsStatusMsg }}</p> <p v-if="smsStatusMsg" class="login-view__sms-status tal" :class="{ 'login-view__sms-status--error': smsStatusIsError }">{{ smsStatusMsg }}</p>
<button class="login-view__status-btn" :disabled="isLoggingIn || countdown > 0" @click="handleResendCode"> <button class="login-view__status-btn" :disabled="isLoggingIn || countdown > 0" @click="handleResendCode">
<template v-if="isLoggingIn"><span class="login-view__spinner"></span><span>登录中</span></template> <template v-if="isLoggingIn"><span class="login-view__spinner"></span><span>登录中</span></template>
<template v-else-if="countdown > 0">{{ countdown }} 秒后可继续发送</template> <template v-else-if="countdown > 0">{{ countdown }} 秒后可继续发送</template>
@@ -513,7 +513,9 @@ async function handleLogin() {
try { try {
const res = await smsLogin(phone.value, otpValue.value) const res = await smsLogin(phone.value, otpValue.value)
if (res.code !== '0') { if (res.code !== '0') {
ElMessage.error('登录失败请核对验证码') // 验证码错误或已过期 — 显示行内错误提示
smsStatusMsg.value = '验证码有误,请重新输入'
smsStatusIsError.value = true
otpValue.value = '' otpValue.value = ''
isLoggingIn.value = false isLoggingIn.value = false
nextTick(() => focusOtpInput()) nextTick(() => focusOtpInput())
@@ -546,7 +548,8 @@ async function handleLogin() {
// 有个人资料,直接跳转 // 有个人资料,直接跳转
router.replace(loginRedirect) router.replace(loginRedirect)
} catch { } catch {
ElMessage.error('登录失败请核对验证码') smsStatusMsg.value = '验证码有误,请重新输入'
smsStatusIsError.value = true
otpValue.value = '' otpValue.value = ''
isLoggingIn.value = false isLoggingIn.value = false
nextTick(() => focusOtpInput()) nextTick(() => focusOtpInput())
+1 -2
View File
@@ -12,7 +12,6 @@
<!-- <span class="mentor-page__title-icon"></span>--> <!-- <span class="mentor-page__title-icon"></span>-->
<div class=" "> <div class=" ">
<div class="mentor-page__title dib mr10">导师推荐</div> <div class="mentor-page__title dib mr10">导师推荐</div>
<div class="mentor-page__subtitle dib">自有合作导师真实在职身份全部实名认证</div>
</div> </div>
</div> </div>
<div class="dflex-end aliite-c flex-warp"> <div class="dflex-end aliite-c flex-warp">
@@ -20,7 +19,7 @@
<div class="mentor-page__quick-tags"> <div class="mentor-page__quick-tags">
<span class="mentor-page__quick-label">推荐搜索</span> <span class="mentor-page__quick-label">推荐搜索</span>
<span <span
v-for="tag in quickSearchTags" v-for="(tag,index) in quickSearchTags"
:key="tag" :key="tag"
class="mentor-page__quick-tag" class="mentor-page__quick-tag"
@click="handleQuickSearch(tag)" @click="handleQuickSearch(tag)"