Browse Source

Merge branch 'hongxilin/feature-20250628153758-财神优化:字正确性,一致性等' into milestone-20250710-上线前优化

master
no99 22 hours ago
parent
commit
b4b90609b7
  1. 4
      .env.production
  2. 28
      src/views/AIchat.vue
  3. 88
      src/views/homePage.vue

4
.env.production

@ -2,8 +2,8 @@
VITE_ENV = 'production'
VITE_OUTPUT_DIR = 'dist'
# public path
VITE_PUBLIC_PATH = /aixiaocaishen
# VITE_PUBLIC_PATH = /
# VITE_PUBLIC_PATH = /aixiaocaishen
VITE_PUBLIC_PATH = /
# Whether to open mock
VITE_USE_MOCK = true

28
src/views/AIchat.vue

@ -585,21 +585,21 @@ watch(
market: codeData.value.market,
code: codeData.value.code,
language: "cn", //t.value.suoxie,
// brainPrivilegeState: 1,
// swordPrivilegeState: 1,
// stockForecastPrivilegeState: 1,
// spaceForecastPrivilegeState: 1,
// aibullPrivilegeState: 1,
// aigoldBullPrivilegeState: 1,
// airadarPrivilegeState: 1,
brainPrivilegeState: 1,
swordPrivilegeState: 1,
stockForecastPrivilegeState: 1,
spaceForecastPrivilegeState: 1,
aibullPrivilegeState: 1,
aigoldBullPrivilegeState: 1,
airadarPrivilegeState: 1,
// marketList: 1,
brainPrivilegeState: userStore.brainPerssion,
swordPrivilegeState: userStore.swordPerssion,
stockForecastPrivilegeState: userStore.pricePerssion,
spaceForecastPrivilegeState: userStore.timePerssion,
aibullPrivilegeState: userStore.aibullPerssion,
aigoldBullPrivilegeState: userStore.aiGnbullPerssion,
airadarPrivilegeState: userStore.airadarPerssion,
// brainPrivilegeState: userStore.brainPerssion,
// swordPrivilegeState: userStore.swordPerssion,
// stockForecastPrivilegeState: userStore.pricePerssion,
// spaceForecastPrivilegeState: userStore.timePerssion,
// aibullPrivilegeState: userStore.aibullPerssion,
// aigoldBullPrivilegeState: userStore.aiGnbullPerssion,
// airadarPrivilegeState: userStore.airadarPerssion,
marketList: userStore.aiGoldMarketList,
});

88
src/views/homePage.vue

@ -487,33 +487,29 @@ const onBlur = function () {
}, 200);
};
window.addEventListener("resize", () => {
// iOS
const isIOS = /iPhone|iPad|iPod|ios/i.test(navigator.userAgent);
console.log("是否为iOS设备:", isIOS);
if (!isIOS) {
console.log("窗口大小变化");
const homePage = document.querySelector(".homepage");
homePage.style.height = `${window.innerHeight}px`;
}
});
//
document.addEventListener(
"touchmove",
(e) => {
if (!dataStore.isFeedback) {
//
const isScrollableArea = e.target.closest(".tab-content");
//
if (!isScrollableArea) {
e.preventDefault();
}
// window.addEventListener("resize", () => {
// // iOS
// const isIOS = /iPhone|iPad|iPod|ios/i.test(navigator.userAgent);
// console.log("iOS:", isIOS);
// if (!isIOS) {
// console.log("");
// const homePage = document.querySelector(".homepage");
// homePage.style.height = `${window.innerHeight}px`;
// }
// });
let touchmoveHandlerRef = null;
const touchmoveHandler = (e) => {
if (!dataStore.isFeedback) {
//
const isScrollableArea = e.target.closest(".tab-content");
//
if (!isScrollableArea) {
e.preventDefault();
}
},
{ passive: false }
);
}
};
onMounted(async () => {
// const isPhone =
@ -525,6 +521,13 @@ onMounted(async () => {
// "localToken",
// decodeURIComponent(String(getQueryVariable("token")))
// );
//
touchmoveHandlerRef = touchmoveHandler;
document.addEventListener("touchmove", touchmoveHandlerRef, {
passive: false,
});
setHeight(document.getElementById("testId")); //
//
await chatStore.getUserCount();
@ -533,12 +536,45 @@ onMounted(async () => {
//
throttledHeightListener();
const isAndroid = /Android/i.test(navigator.userAgent);
if (isAndroid) {
window.visualViewport.addEventListener("resize", () => {
const keyboardHeight = window.innerHeight - window.visualViewport.height;
console.log("视口大小变化", keyboardHeight);
// 100px
if (keyboardHeight > 100) {
const footer = document.querySelector(".el-footer");
footer.style.paddingBottom = `${keyboardHeight}px`;
//
setTimeout(() => {
const msgInput = document.querySelector(".msg-input");
if (msgInput) {
msgInput.scrollIntoView({ behavior: "smooth" });
}
}, 300);
} else {
//
const footer = document.querySelector(".el-footer");
footer.style.paddingBottom = "0px";
}
});
}
//
// handleInputFocus();
//
// updateAppHeight();
});
onUnmounted(() => {
if (touchmoveHandlerRef) {
console.log("卸载touchmoveHandlerRef组件");
document.removeEventListener("touchmove", touchmoveHandlerRef);
}
});
</script>
<template>

Loading…
Cancel
Save