Browse Source

Merge branch 'milestone-20250710-上线前优化' of http://39.101.133.168:8807/hongxilin/AIxiaocaishen into milestone-20250710-上线前优化

dev
宋杰 6 days ago
parent
commit
cdf992af38
  1. 941
      src/views/AIchat.vue
  2. 934
      src/views/Feedback.vue
  3. 48
      src/views/homePage.vue

941
src/views/AIchat.vue
File diff suppressed because it is too large
View File

934
src/views/Feedback.vue
File diff suppressed because it is too large
View File

48
src/views/homePage.vue

@ -1,6 +1,6 @@
<script setup>
//
import { ref, computed, onMounted, watch, nextTick, onUnmounted } from "vue";
import { ref, computed, onMounted, watch, nextTick, onUnmounted, h } from "vue";
import { setHeight } from "../utils/setHeight";
import { getUserCountAPI } from "../api/AIxiaocaishen";
import { ElMessage } from "element-plus";
@ -427,46 +427,32 @@ const goToRecharge = () => {
};
const adjustFooterPosition = (height) => {
console.log("调整底部位置", height);
const footer = document.querySelector(".el-footer");
const main = document.querySelector(".el-main");
const homePage = document.querySelector(".homepage");
const app = document.getElementById("app");
// Footer 60px // Footer
// footer.style.bottom = `${keyboardHeight}px`;
// Main Footer +
homePage.style.height = `${height}px`;
// app.style.height = `${height}px`;
void homePage.offsetHeight;
const html = document.querySelector("html");
const body = document.querySelector("body");
html.style.height = `${height}px`;
body.style.height = `${height}px`;
const isAndroid = /Android/i.test(navigator.userAgent);
if (isAndroid) {
console.log("是安卓设备");
console.log("window.visualViewport", window.visualViewport.height);
const homePage = document.querySelector(".homepage");
homePage.style.height = `${height}px`;
// homePage.style.height = `460px`;
html.scrollTop = 0;
html.scrollTop = 0;
} else {
console.log("非安卓设备");
console.log("调整底部位置", height);
const homePage = document.querySelector(".homepage");
homePage.style.height = `${height}px`;
html.scrollTop = 0;
}
setTimeout(() => {
//
html.style.overflow = "hidden";
body.style.overflow = "hidden";
}, 200);
// console.log(html.offsetHeight, 'html')
// console.log(html.clientHeight, 'html')
// console.log(html.scrollHeight, 'htmlScrollHeight')
// console.log(body.clientHeight, 'body')
// console.log(body.scrollHeight, 'bodyScrollHeight')
// console.log(homePage.offsetHeight, 'homePage')
// console.log(homePage.clientHeight, 'homePageClientHeight')
// console.log(homePage.scrollHeight, 'homePageScrollHeight')
// console.log(window.innerHeight, 'window.innerHeight')
// console.log(window.visualViewport.height, 'window.visualViewport.height')
// console.log(main.offsetHeight, 'main')
// console.log(main.clientHeight, 'mainClientHeight')
// console.log(main.scrollHeight, 'mainScrollHeight')
};
const onFocus = function () {

Loading…
Cancel
Save