Browse Source

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

dev
宋杰 4 days ago
parent
commit
71df42d399
  1. 6
      src/views/components/HistoryRecord.vue
  2. 132
      src/views/homePage.vue

6
src/views/components/HistoryRecord.vue

@ -418,8 +418,8 @@ const categoryHistory = ref([]);
const getHistoryList = async (params) => {
try {
const result = await getHistoryListAPI(params);
historyRecords.value = result.data.list;
let remainingRecords = result.data.list; //
historyRecords.value = result.data;
let remainingRecords = result.data; //
// 1.
let topList = remainingRecords.filter((record) => record.isTop === 1);
@ -477,7 +477,7 @@ const getHistoryList = async (params) => {
return !recordDate.isAfter(thirtyDaysAgo);
});
historyRecords.value = result.data.list;
historyRecords.value = result.data;
categoryHistory.value = [
{

132
src/views/homePage.vue

@ -267,19 +267,19 @@ const enableInput = () => {
//
const handleHistorySelect = (stockData) => {
console.log('接收到历史记录数据:', stockData);
console.log("接收到历史记录数据:", stockData);
// AiEmotionAiEmotion
// if (activeTab.value !== 'AiEmotion') {
// setActiveTab('AiEmotion', 1);
// }
// addStock
nextTick(() => {
if (aiEmotionRef.value && aiEmotionRef.value.addStock) {
aiEmotionRef.value.addStock(stockData);
} else {
console.error('AiEmotion组件或addStock方法不可用');
console.error("AiEmotion组件或addStock方法不可用");
}
});
};
@ -631,6 +631,40 @@ const expandHistory = () => {
}
};
const backToHome = () => {
if (isMobile.value) {
console.log("用户是移动端");
//
uni.postMessage({
data: {
val: {
name: "JWopenView",
extra: {
data: {
type: 3,
},
},
},
},
});
} else {
console.log("用户是pc端");
const env = import.meta.env.VITE_ENV;
console.log("当前的环境为:", env);
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";
}
// window.parent.location.href = window.parent.document.referrer
}
};
onMounted(async () => {
throttledJudgeDevice();
//
@ -716,6 +750,14 @@ onUnmounted(() => {
<div class="count-number">{{ UserCount }}</div>
<div class="clickGetCount">点击获取次数</div>
</div>
<div class="backToHomeBtn" @click="backToHome()">
<img
src="https://d31zlh4on95l9h.cloudfront.net/images/d8b388e461423f79087ddbe016002217.png"
alt="返回首页"
class="backImg"
/>
<div class="backContent">返回首页</div>
</div>
<!-- <img
:src="announcementBtn"
class="announcement-btn action-btn"
@ -750,12 +792,21 @@ onUnmounted(() => {
>
<span>{{ tab.label }}</span>
</div>
<div v-if="!isMobile" class="pc-count-badge" @click="showCount">
<div class="pc-action-btn">
<div class="pc-count-number">{{ UserCount }}</div>
<div v-if="!isMobile" class="pc-count-badge">
<div class="pc-countBtn" @click="showCount">
<div class="pc-action-btn">
<div class="pc-count-number">{{ UserCount }}</div>
</div>
<div class="pc-clickGetCount">点击获取次数</div>
</div>
<div class="pc-backToHomeBtn" @click="backToHome()">
<img
src="https://d31zlh4on95l9h.cloudfront.net/images/d8b388e461423f79087ddbe016002217.png"
alt="返回首页"
class="pc-backImg"
/>
<div class="pc-backContent">返回首页</div>
</div>
<div class="pc-clickGetCount">点击获取次数</div>
</div>
</div>
</section>
@ -880,6 +931,14 @@ onUnmounted(() => {
<div class="count-number">{{ UserCount }}</div>
<div class="clickGetCount">点击获取次数</div>
</div>
<div class="backToHomeBtn" @click="backToHome()">
<img
src="https://d31zlh4on95l9h.cloudfront.net/images/d8b388e461423f79087ddbe016002217.png"
alt="返回首页"
class="backImg"
/>
<div class="backContent">返回首页</div>
</div>
<!-- <img
:src="announcementBtn"
class="announcement-btn action-btn"
@ -1178,16 +1237,41 @@ body {
font-size: 12px;
}
.backToHomeBtn {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.backImg {
width: 100%;
height: auto;
}
.backContent {
width: 100%;
text-align: center;
color: white;
font-size: 12px;
white-space: nowrap;
}
.pc-count-badge {
width: 120px;
width: 200px;
height: 100%;
margin-left: auto;
margin-right: 20px;
position: absolute;
right: 20px;
display: flex;
}
.pc-count-badge:hover {
.pc-countBtn {
width: 65%;
height: 100%;
position: relative;
}
.pc-countBtn:hover {
transform: scale(1.05);
}
@ -1217,6 +1301,28 @@ body {
font-size: 12px;
}
.pc-backToHomeBtn {
width: 35%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
.pc-backImg {
width: auto;
height: 70%;
}
.pc-backContent {
width: 100%;
text-align: center;
color: white;
font-size: 12px;
}
.pc-backToHomeBtn:hover {
transform: scale(1.05);
}
.homepage-right-group .announcement-btn {
cursor: pointer;
transition: transform 0.3s;

Loading…
Cancel
Save