refactor(ai.vue): 简化代码并移除调试日志

移除console.log语句并简化条件判断
注释掉未使用的样式规则
更新dist/index.html中的构建文件引用
This commit is contained in:
DESKTOP-RQ919RC\Pc
2025-08-26 12:27:45 +08:00
parent 752d1cabbf
commit e151b8cf4b
5 changed files with 13 additions and 14 deletions

File diff suppressed because one or more lines are too long

2
dist/index.html vendored
View File

@@ -1,4 +1,4 @@
<!doctype html><html lang=""><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width,initial-scale=1"/><link rel="icon" href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/favicon.ico"/><title>港校租房</title><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/js/chunk-vendors.65a8ec5d.js"></script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/js/app.8f6574be.js"></script><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/css/chunk-vendors.7885d77e.css" rel="stylesheet"><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/css/app.e162f837.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but zufang doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><script src="https://app.gter.net/bottom?tpl=header&menukey=fang"></script><div id="app"></div><div style="display: none;"><script>var _hmt = _hmt || [] <!doctype html><html lang=""><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width,initial-scale=1"/><link rel="icon" href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/favicon.ico"/><title>港校租房</title><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/js/chunk-vendors.65a8ec5d.js"></script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/js/app.7a09fb88.js"></script><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/css/chunk-vendors.7885d77e.css" rel="stylesheet"><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/css/app.e162f837.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but zufang doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><script src="https://app.gter.net/bottom?tpl=header&menukey=fang"></script><div id="app"></div><div style="display: none;"><script>var _hmt = _hmt || []
;(function () { ;(function () {
var hm = document.createElement("script") var hm = document.createElement("script")
hm.src = "//hm.baidu.com/hm.js?4bd66cbe45a640b607fe46c48f658746" hm.src = "//hm.baidu.com/hm.js?4bd66cbe45a640b607fe46c48f658746"

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -68,11 +68,7 @@ onMounted(() => {
// 初始化input-box高度监听 // 初始化input-box高度监听
resizeObserver = new ResizeObserver((entries) => { resizeObserver = new ResizeObserver((entries) => {
const inputBoxHeight = entries[0].contentRect.height; const inputBoxHeight = entries[0].contentRect.height;
console.log("entries", entries[0].contentRect); if (contentRef.value) contentRef.value.style.paddingBottom = `${inputBoxHeight + 32 + 40}px`;
if (contentRef.value) {
contentRef.value.style.paddingBottom = `${inputBoxHeight + 32 + 40}px`;
}
}); });
if (inputBoxRef.value) { if (inputBoxRef.value) {
resizeObserver.observe(inputBoxRef.value); resizeObserver.observe(inputBoxRef.value);
@@ -83,6 +79,9 @@ onMounted(() => {
document.addEventListener("visibilitychange", handleVisibilityChange); document.addEventListener("visibilitychange", handleVisibilityChange);
window.addEventListener("beforeunload", endChat); window.addEventListener("beforeunload", endChat);
window.addEventListener("scroll", handleScrollToTop); window.addEventListener("scroll", handleScrollToTop);
}); });
onBeforeUnmount(() => { onBeforeUnmount(() => {
@@ -835,9 +834,9 @@ const restart = () => {
</style> </style>
<style lang="less"> <style lang="less">
header.page-header, // header.page-header,
section.index-footer, // section.index-footer,
.left-side-bar1 { // .left-side-bar1 {
display: none !important; // display: none !important;
} // }
</style> </style>