fix: 禁用调试控制台并修复图片错误处理
禁用调试控制台以提高生产环境安全性,移除图片错误处理中的默认占位符以简化逻辑,同时清理路由守卫中未使用的变量
Showing
3 changed files
with
3 additions
and
5 deletions
| 1 | /* | 1 | /* |
| 2 | * @Date: 2025-03-20 20:36:36 | 2 | * @Date: 2025-03-20 20:36:36 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2025-03-26 12:34:44 | 4 | + * @LastEditTime: 2025-03-26 13:50:07 |
| 5 | * @FilePath: /mlaj/src/router/guards.js | 5 | * @FilePath: /mlaj/src/router/guards.js |
| 6 | * @Description: 路由守卫逻辑 | 6 | * @Description: 路由守卫逻辑 |
| 7 | */ | 7 | */ |
| 8 | import { getAuthInfoAPI } from '@/api/auth' | 8 | import { getAuthInfoAPI } from '@/api/auth' |
| 9 | import { wxInfo } from "@/utils/tools" | 9 | import { wxInfo } from "@/utils/tools" |
| 10 | -import { useRoute } from 'vue-router' | ||
| 11 | 10 | ||
| 12 | -const $route = useRoute(); | ||
| 13 | // 需要登录才能访问的路由 | 11 | // 需要登录才能访问的路由 |
| 14 | export const authRequiredRoutes = [ | 12 | export const authRequiredRoutes = [ |
| 15 | { | 13 | { | ... | ... |
| ... | @@ -324,7 +324,7 @@ const curriculumItems = [ | ... | @@ -324,7 +324,7 @@ const curriculumItems = [ |
| 324 | 324 | ||
| 325 | // Handle image error | 325 | // Handle image error |
| 326 | const handleImageError = (e) => { | 326 | const handleImageError = (e) => { |
| 327 | - e.target.src = 'https://via.placeholder.com/150?text=Teacher' | 327 | + e.target.src = '' |
| 328 | } | 328 | } |
| 329 | 329 | ||
| 330 | // Right content component | 330 | // Right content component | ... | ... |
-
Please register or login to post a comment