Browse Source

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

milestone-20250820-金币兑换Token
宋杰 2 days ago
parent
commit
20f7f5a071
  1. 60
      src/views/homePage.vue

60
src/views/homePage.vue

@ -403,7 +403,12 @@ const throttledSmoothScrollToBottom = _.throttle(smoothScrollToBottom, 300, {
// AiEmotion
const debouncedAiEmotionScrollToBottom = _.debounce(() => {
if (activeTab.value === 'AiEmotion' && isAiEmotionAutoScrollEnabled.value && !isAiEmotionUserScrolling.value && !isChartInteracting.value) {
if (
activeTab.value === "AiEmotion" &&
isAiEmotionAutoScrollEnabled.value &&
!isAiEmotionUserScrolling.value &&
!isChartInteracting.value
) {
const container = tabContentAiEmotion.value;
if (container) {
container.scrollTop = container.scrollHeight - container.offsetHeight;
@ -420,7 +425,11 @@ const startAiEmotionHeightObserver = () => {
// ResizeObserver
aiEmotionHeightObserver.value = new ResizeObserver((entries) => {
if (isAiEmotionAutoScrollEnabled.value && activeTab.value === 'AiEmotion' && !isChartInteracting.value) {
if (
isAiEmotionAutoScrollEnabled.value &&
activeTab.value === "AiEmotion" &&
!isChartInteracting.value
) {
debouncedAiEmotionScrollToBottom();
}
});
@ -450,8 +459,13 @@ const startAiEmotionHeightObserver = () => {
}
}
});
if (shouldScroll && isAiEmotionAutoScrollEnabled.value && activeTab.value === 'AiEmotion' && !isChartInteracting.value) {
if (
shouldScroll &&
isAiEmotionAutoScrollEnabled.value &&
activeTab.value === "AiEmotion" &&
!isChartInteracting.value
) {
debouncedAiEmotionScrollToBottom();
}
});
@ -503,7 +517,7 @@ const handleAiEmotionUserScroll = () => {
const handleChartInteractionStart = () => {
console.log("图表交互开始,临时禁用自动滚动");
isChartInteracting.value = true;
//
if (chartInteractionTimer.value) {
clearTimeout(chartInteractionTimer.value);
@ -515,7 +529,7 @@ const handleChartInteractionEnd = () => {
if (chartInteractionTimer.value) {
clearTimeout(chartInteractionTimer.value);
}
// 1
chartInteractionTimer.value = setTimeout(() => {
isChartInteracting.value = false;
@ -909,12 +923,14 @@ const backToHome = () => {
if (env == "development" || env == "test") {
window.parent.location.href =
"http://121.89.234.155:8807/hljw/homepage?menu=999999991";
} else if (env == "product") {
window.parent.location.href =
"https://web.homilychart.com/product/hljw/homepage?menu=999999991";
} else if (env == "production") {
window.parent.location.href =
"https://web.homilychart.com/hljw/homepage?menu=999999991";
} else {
window.parent.postMessage(
{
type: "NAVIGATE_TO_HOMEPAGE",
menu: "999999991",
},
"*"
);
}
// window.parent.location.href = window.parent.document.referrer
}
@ -1109,17 +1125,17 @@ onUnmounted(() => {
}
// AiEmotion
stopAiEmotionHeightObserver();
//
if (chartInteractionTimer.value) {
clearTimeout(chartInteractionTimer.value);
}
if (window.handleChartInteractionStart) {
delete window.handleChartInteractionStart;
}
if (window.handleChartInteractionEnd) {
delete window.handleChartInteractionEnd;
}
if (chartInteractionTimer.value) {
clearTimeout(chartInteractionTimer.value);
}
if (window.handleChartInteractionStart) {
delete window.handleChartInteractionStart;
}
if (window.handleChartInteractionEnd) {
delete window.handleChartInteractionEnd;
}
});
</script>

Loading…
Cancel
Save