Browse Source

Merge branch 'milestone-20250909-周更新分支' into dev

dev
宋杰 2 weeks ago
parent
commit
41232fe189
  1. 19
      src/views/components/BackToHomeButton.vue
  2. 49
      src/views/components/HistoryRecord.vue
  3. 22
      src/views/components/emotionDecod.vue
  4. 54
      src/views/components/marketTemperature.vue
  5. 94
      src/views/homePage.vue

19
src/views/components/BackToHomeButton.vue

@ -1,11 +1,8 @@
<template> <template>
<div class="backToHomeBtn" @click="backToHome"> <div class="backToHomeBtn" @click="backToHome">
<img
src="https://d31zlh4on95l9h.cloudfront.net/images/9cbc5b2eb2327bd04d015c19d8c3f1f9.png"
alt="返回首页"
class="backImg"
/>
<div class="backContent">返回首页</div>
<img src="https://d31zlh4on95l9h.cloudfront.net/images/6ee30e4fcbbd9558b4dc7e49c3ec0e0d.png" alt="返回首页"
class="backImg" />
<!-- <div class="backContent">返回首页</div> -->
</div> </div>
</template> </template>
@ -88,8 +85,14 @@ const backToHome = () => {
@media (max-width: 768px) { @media (max-width: 768px) {
.backToHomeBtn { .backToHomeBtn {
top: 0px;
right: 0px;
top: 15px;
right: -50px;
}
.backImg {
width: 30%;
height: auto;
;
} }
} }
</style> </style>

49
src/views/components/HistoryRecord.vue

@ -10,13 +10,19 @@
<div v-if="isCollapsed" class="collapsed-container"> <div v-if="isCollapsed" class="collapsed-container">
<img <img
class="collapsed-icon" class="collapsed-icon"
src="https://d31zlh4on95l9h.cloudfront.net/images/74430a4ebbb67aefc713bf694147fb2a.png"
src="https://d31zlh4on95l9h.cloudfront.net/images/985a70c1fb0296e4b2b9e05d2dfdc22c.png"
alt="icon" alt="icon"
/> />
<img <img
class="god-icon"
src="https://d31zlh4on95l9h.cloudfront.net/images/759eabdc1a040be4583a358c0a7a6bf2.png"
alt="icon"
title="AI小财神"
/>
<img
class="collapsed-toggle-btn" class="collapsed-toggle-btn"
@click="openHistory" @click="openHistory"
src="https://d31zlh4on95l9h.cloudfront.net/images/815e7ebfb1963eadca9435e82c3c4a8d.png"
src="https://d31zlh4on95l9h.cloudfront.net/images/cba6816917b00287565f3bed84ced7dd.png"
alt="icon" alt="icon"
title="打开边栏" title="打开边栏"
/> />
@ -30,7 +36,7 @@
> >
<img <img
class="collapsed-bottom-announcement" class="collapsed-bottom-announcement"
src="https://d31zlh4on95l9h.cloudfront.net/images/172be9b9c4d936f2f6b182ef7a4bed10.png"
src=" https://d31zlh4on95l9h.cloudfront.net/images/3f7a1cb3dd6c5f9d4163fab4d26b4f4f.png"
alt="icon" alt="icon"
/> />
</div> </div>
@ -41,7 +47,7 @@
> >
<img <img
class="collapsed-bottom-feedback" class="collapsed-bottom-feedback"
src="https://d31zlh4on95l9h.cloudfront.net/images/ed88a0a7095c3cd1e0b51ffcca7f4068.png"
src="https://d31zlh4on95l9h.cloudfront.net/images/90c933dba4b36edae3775f9fd34a2e6c.png"
alt="icon" alt="icon"
/> />
</div> </div>
@ -62,7 +68,7 @@
<img <img
class="toggle-btn" class="toggle-btn"
@click="closeHistory" @click="closeHistory"
src="https://d31zlh4on95l9h.cloudfront.net/images/815e7ebfb1963eadca9435e82c3c4a8d.png"
src="https://d31zlh4on95l9h.cloudfront.net/images/cba6816917b00287565f3bed84ced7dd.png"
alt="icon" alt="icon"
title="收起边栏" title="收起边栏"
/> />
@ -187,19 +193,21 @@
</div> </div>
<div class="bottom-container"> <div class="bottom-container">
<div class="bottom-btn" @click="handleAnnouncementClick" title="公告">
<div class="bottom-btn" @click="handleAnnouncementClick">
<img <img
class="bottom-announcement" class="bottom-announcement"
src="https://d31zlh4on95l9h.cloudfront.net/images/172be9b9c4d936f2f6b182ef7a4bed10.png"
src="https://d31zlh4on95l9h.cloudfront.net/images/3f7a1cb3dd6c5f9d4163fab4d26b4f4f.png"
alt="icon" alt="icon"
/> />
<div style="color: aliceblue;">公告</div>
</div> </div>
<div class="bottom-btn" @click="handleFeedbackClick" title="用户反馈">
<div class="bottom-btn" @click="handleFeedbackClick">
<img <img
class="bottom-feedback" class="bottom-feedback"
src="https://d31zlh4on95l9h.cloudfront.net/images/ed88a0a7095c3cd1e0b51ffcca7f4068.png"
src="https://d31zlh4on95l9h.cloudfront.net/images/90c933dba4b36edae3775f9fd34a2e6c.png"
alt="icon" alt="icon"
/> />
<div style="color: aliceblue;">用户反馈</div>
</div> </div>
</div> </div>
</div> </div>
@ -358,7 +366,7 @@
> >
<img <img
class="mobile-bottom-announcement" class="mobile-bottom-announcement"
src="https://d31zlh4on95l9h.cloudfront.net/images/172be9b9c4d936f2f6b182ef7a4bed10.png"
src="https://d31zlh4on95l9h.cloudfront.net/images/3f7a1cb3dd6c5f9d4163fab4d26b4f4f.png"
alt="icon" alt="icon"
/> />
<div class="mobile-bottom-text">公告</div> <div class="mobile-bottom-text">公告</div>
@ -370,7 +378,7 @@
> >
<img <img
class="mobile-bottom-feedback" class="mobile-bottom-feedback"
src="https://d31zlh4on95l9h.cloudfront.net/images/ed88a0a7095c3cd1e0b51ffcca7f4068.png"
src="https://d31zlh4on95l9h.cloudfront.net/images/90c933dba4b36edae3775f9fd34a2e6c.png"
alt="icon" alt="icon"
/> />
<div class="mobile-bottom-text">用户反馈</div> <div class="mobile-bottom-text">用户反馈</div>
@ -924,6 +932,9 @@ onMounted(() => {
border-color: rgba(255, 255, 255, 0.3); border-color: rgba(255, 255, 255, 0.3);
} }
.god-icon {
width: 100%;
}
.collapsed-bottom-container { .collapsed-bottom-container {
width: 100%; width: 100%;
height: 16%; height: 16%;
@ -1216,10 +1227,14 @@ onMounted(() => {
.bottom-btn { .bottom-btn {
width: 50%; width: 50%;
display: flex; display: flex;
flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
cursor: pointer; cursor: pointer;
} }
.bottom-btn:hover {
transform: scale(1.2);
}
.mobile-bottom-btn { .mobile-bottom-btn {
width: 100%; width: 100%;
@ -1229,7 +1244,7 @@ onMounted(() => {
} }
.bottom-feedback { .bottom-feedback {
width: 30%;
width: 35%;
height: auto; height: auto;
} }
@ -1239,12 +1254,12 @@ onMounted(() => {
width: auto; width: auto;
} }
.bottom-feedback:hover {
/* .bottom-feedback:hover {
transform: scale(1.2); transform: scale(1.2);
}
} */
.bottom-announcement { .bottom-announcement {
width: 30%;
width: 35%;
height: auto; height: auto;
} }
@ -1260,9 +1275,9 @@ onMounted(() => {
font-size: 1.1rem; font-size: 1.1rem;
} }
.bottom-announcement:hover {
/* .bottom-announcement:hover {
transform: scale(1.2); transform: scale(1.2);
}
} */
/* 移动端适配 */ /* 移动端适配 */
@media (max-width: 768px) { @media (max-width: 768px) {

22
src/views/components/emotionDecod.vue

@ -72,10 +72,30 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
confine: true, // tooltip confine: true, // tooltip
axisPointer: { axisPointer: {
type: 'cross', // type: 'cross', //
lineStyle: {
color: 'grey',
width: 1,
type: 'dashed'
},
crossStyle: { crossStyle: {
color: '#999' color: '#999'
},
label: {
backgroundColor: 'rgba(0, 0, 0, 0.8)',
color: '#fff',
borderColor: '#fff',
borderWidth: 1
} }
}, },
backgroundColor: 'rgba(232, 232, 242, 0.87)',
borderColor: '#fff',
borderWidth: 1,
borderRadius: 8,
padding: 10,
textStyle: {
color: 'black',
fontSize: 12
},
formatter: function (params) { formatter: function (params) {
if (!params || params.length === 0) return '' if (!params || params.length === 0) return ''
@ -89,7 +109,7 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
const close = klineParam.data[2] const close = klineParam.data[2]
const low = klineParam.data[3] const low = klineParam.data[3]
const high = klineParam.data[4] const high = klineParam.data[4]
return `日期: ${date}<br/>开盘价: ${open}<br/>收盘价: ${close}<br/>最低价: ${low}<br/>最高价: ${high}`
return `<span style="color:black;font-weight:bold;">日期: ${date}</span><br/><span style="color:black;">开盘价: ${open}</span><br/><span style="color:black;">收盘价: ${close}</span><br/><span style="color:black;">最低价: ${low}</span><br/><span style="color:black;">最高价: ${high}</span>`
} }
}, },

54
src/views/components/marketTemperature.vue

@ -423,23 +423,25 @@ function initChart(raw, klineDataRawValue, WDRLValue) {
axisPointer: { axisPointer: {
type: "cross", type: "cross",
crossStyle: { crossStyle: {
color: "#999",
width: 1,
type: "dashed",
color: '#999'
}, },
lineStyle: { lineStyle: {
color: "#999",
width: 1,
type: "dashed",
type: 'dashed' // 线
}, },
link: [
{
xAxisIndex: [0, 1, 2]
}
]
}, },
backgroundColor: '#646E71',
backgroundColor: 'rgba(232, 232, 242, 0.87)',
borderColor: '#fff', borderColor: '#fff',
borderWidth: 1, borderWidth: 1,
padding: [8, 12],
borderRadius: 8,
padding: 10,
textStyle: { textStyle: {
color: '#fff',
fontSize: window.innerWidth <= 768 ? 10 : 12 // 使
color: '#555555',
fontSize: 12
}, },
extraCssText: window.innerWidth <= 768 ? extraCssText: window.innerWidth <= 768 ?
'max-width: 280px; word-wrap: break-word; white-space: normal; box-shadow: 0 2px 8px rgba(0,0,0,0.3);' : 'max-width: 280px; word-wrap: break-word; white-space: normal; box-shadow: 0 2px 8px rgba(0,0,0,0.3);' :
@ -451,7 +453,7 @@ function initChart(raw, klineDataRawValue, WDRLValue) {
const lineHeight = isMobile ? '1.3' : '1.5'; const lineHeight = isMobile ? '1.3' : '1.5';
const marginBottom = isMobile ? '4px' : '6px'; const marginBottom = isMobile ? '4px' : '6px';
let result = `<div style="font-weight: bold; color: #fff; margin-bottom: ${marginBottom}; font-size: ${fontSize}; line-height: ${lineHeight};">日期: ${params[0].name}</div>`;
let result = `<div style="font-weight: bold; color: black; margin-bottom: ${marginBottom}; font-size: ${fontSize}; line-height: ${lineHeight};">日期: ${params[0].name}</div>`;
params.forEach((param) => { params.forEach((param) => {
if (param.seriesType === "candlestick") { if (param.seriesType === "candlestick") {
@ -463,24 +465,31 @@ function initChart(raw, klineDataRawValue, WDRLValue) {
if (isMobile) { if (isMobile) {
// //
result += `<div style="margin-bottom: ${marginBottom}; font-size: ${fontSize}; line-height: ${lineHeight};">`; result += `<div style="margin-bottom: ${marginBottom}; font-size: ${fontSize}; line-height: ${lineHeight};">`;
result += `<div style="color: #fff; font-weight: bold; margin-bottom: 2px;">${param.seriesName}</div>`;
result += `<div style="color: #fff; display: flex; justify-content: space-between;"><span>开盘价:</span><span>${open}</span></div>`;
result += `<div style="color: #fff; display: flex; justify-content: space-between;"><span>收盘价:</span><span>${close}</span></div>`;
result += `<div style="color: #fff; display: flex; justify-content: space-between;"><span>最低价:</span><span>${low}</span></div>`;
result += `<div style="color: #fff; display: flex; justify-content: space-between;"><span>最高价:</span><span>${high}</span></div>`;
result += `<div style="color: black; font-weight: bold; margin-bottom: 2px;">${param.seriesName}</div>`;
result += `<div style="color: black; display: flex; justify-content: space-between;"><span>开盘价:</span><span>${open}</span></div>`;
result += `<div style="color: black; display: flex; justify-content: space-between;"><span>收盘价:</span><span>${close}</span></div>`;
result += `<div style="color: black; display: flex; justify-content: space-between;"><span>最低价:</span><span>${low}</span></div>`;
result += `<div style="color: black; display: flex; justify-content: space-between;"><span>最高价:</span><span>${high}</span></div>`;
result += `</div>`; result += `</div>`;
} else { } else {
// //
result += `<div style="margin-bottom: ${marginBottom}; font-size: ${fontSize}; line-height: ${lineHeight};">`; result += `<div style="margin-bottom: ${marginBottom}; font-size: ${fontSize}; line-height: ${lineHeight};">`;
result += `<div style="color: #fff; font-weight: bold;">${param.seriesName}</div>`;
result += `<div style="color: #fff;">开盘价: ${open}</div>`;
result += `<div style="color: #fff;">收盘价: ${close}</div>`;
result += `<div style="color: #fff;">最低价: ${low}</div>`;
result += `<div style="color: #fff;">最高价: ${high}</div>`;
result += `<div style="color: black; font-weight: bold;">${param.seriesName}</div>`;
result += `<div style="color: black;">开盘价: ${open}</div>`;
result += `<div style="color: black;">收盘价: ${close}</div>`;
result += `<div style="color: black;">最低价: ${low}</div>`;
result += `<div style="color: black;">最高价: ${high}</div>`;
result += `</div>`; result += `</div>`;
} }
} else if (param.seriesType === "line") { } else if (param.seriesType === "line") {
result += `<div style="color: #fff; margin-bottom: 2px; font-size: ${fontSize}; line-height: ${lineHeight};">${param.seriesName}: ${param.value}</div>`;
//
let textColor = 'black';
if (param.seriesName === '市场温度') {
textColor = 'red';
} else if (param.seriesName === '股票温度') {
textColor = 'blue';
}
result += `<div style="color: ${textColor}; margin-bottom: 2px; font-size: ${fontSize}; line-height: ${lineHeight};">${param.seriesName}: ${param.value}</div>`;
} }
}); });
return result; return result;
@ -1108,6 +1117,7 @@ defineExpose({ initChart });
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
@media only screen and (max-width: 768px) { @media only screen and (max-width: 768px) {
font-size: 12px; font-size: 12px;
} }

94
src/views/homePage.vue

@ -342,10 +342,21 @@ const hasShownTokenRule = ref({
const closeTokenRuleDialog = () => { const closeTokenRuleDialog = () => {
tokenRuleDialogVisible.value = false; tokenRuleDialogVisible.value = false;
}; };
// Token
const openTokenRuleDialog = () => {
tokenRuleDialogVisible.value = true;
};
// 使 // 使
// 便 // 便
const handleGlobalClick = () => {
const handleGlobalClick = (event) => {
// ""
const changeRuleElement = document.querySelector('.changeRule');
if (changeRuleElement && (changeRuleElement === event.target || changeRuleElement.contains(event.target))) {
// ""
return;
}
if (tokenRuleDialogVisible.value) { if (tokenRuleDialogVisible.value) {
tokenRuleDialogVisible.value = false; tokenRuleDialogVisible.value = false;
} }
@ -1137,9 +1148,9 @@ const goChange = async () => {
confirmDialogVisible.value = false; confirmDialogVisible.value = false;
dialogVisible.value = false; dialogVisible.value = false;
changeSuccessDialogVisible.value = true; changeSuccessDialogVisible.value = true;
setTimeout(() => {
changeSuccessDialogVisible.value = false;
}, 2000);
// setTimeout(() => {
// changeSuccessDialogVisible.value = false;
// }, 2000);
// //
await chatStore.getUserCount(); await chatStore.getUserCount();
@ -1293,7 +1304,7 @@ onUnmounted(() => {
</div> </div>
<div class="backToHomeBtn" @click="backToHome()"> <div class="backToHomeBtn" @click="backToHome()">
<img <img
src="https://d31zlh4on95l9h.cloudfront.net/images/9cbc5b2eb2327bd04d015c19d8c3f1f9.png"
src="https://d31zlh4on95l9h.cloudfront.net/images/9272c00f21a2724c3a76e375949ee1de.png"
alt="返回首页" alt="返回首页"
class="backImg" class="backImg"
/> />
@ -1342,7 +1353,7 @@ onUnmounted(() => {
</div> </div>
<div class="pc-backToHomeBtn" @click="backToHome()"> <div class="pc-backToHomeBtn" @click="backToHome()">
<img <img
src="https://d31zlh4on95l9h.cloudfront.net/images/9cbc5b2eb2327bd04d015c19d8c3f1f9.png"
src="https://d31zlh4on95l9h.cloudfront.net/images/9272c00f21a2724c3a76e375949ee1de.png"
alt="返回首页" alt="返回首页"
class="pc-backImg" class="pc-backImg"
/> />
@ -1487,7 +1498,7 @@ onUnmounted(() => {
<!-- logo --> <!-- logo -->
<div class="homepage-logo"> <div class="homepage-logo">
<img <img
:src="back"
src="https://d31zlh4on95l9h.cloudfront.net/images/4c91fce359a1c184772857594c38e3b4.png"
alt="返回按钮" alt="返回按钮"
class="backToHomeImg" class="backToHomeImg"
@click="feedbackBack" @click="feedbackBack"
@ -1506,7 +1517,7 @@ onUnmounted(() => {
</div> </div>
<div class="backToHomeBtn" @click="backToHome()"> <div class="backToHomeBtn" @click="backToHome()">
<img <img
src="https://d31zlh4on95l9h.cloudfront.net/images/9cbc5b2eb2327bd04d015c19d8c3f1f9.png"
src="https://d31zlh4on95l9h.cloudfront.net/images/9272c00f21a2724c3a76e375949ee1de.png"
alt="返回首页" alt="返回首页"
class="backImg" class="backImg"
/> />
@ -1551,6 +1562,7 @@ onUnmounted(() => {
</div> </div>
<div class="changeRule"> <div class="changeRule">
兑换规则{{ changeRule.gold }}金币={{ changeRule.token }}Token 兑换规则{{ changeRule.gold }}金币={{ changeRule.token }}Token
<div @click="openTokenRuleDialog">点击查看详情</div>
</div> </div>
</div> </div>
<div class="changeLevel"> <div class="changeLevel">
@ -1610,7 +1622,9 @@ onUnmounted(() => {
兑换Token 兑换Token
<div class="changeRule"> <div class="changeRule">
(兑换规则{{ changeRule.gold }}金币={{ changeRule.token }}Token) (兑换规则{{ changeRule.gold }}金币={{ changeRule.token }}Token)
<div @click="openTokenRuleDialog">点击查看详情</div>
</div> </div>
</div> </div>
<div class="changeLevelContent"> <div class="changeLevelContent">
@ -1671,7 +1685,7 @@ onUnmounted(() => {
v-model="confirmDialogVisible" v-model="confirmDialogVisible"
:width="isMobile ? '60%' : '30%'" :width="isMobile ? '60%' : '30%'"
:show-close="false" :show-close="false"
:align-center="isMobile"
align-center="true"
> >
<div class="confirmDialogTitle">兑换</div> <div class="confirmDialogTitle">兑换</div>
<div class="confirmDialogContent"> <div class="confirmDialogContent">
@ -1692,12 +1706,19 @@ onUnmounted(() => {
:width="isMobile ? '60%' : '30%'" :width="isMobile ? '60%' : '30%'"
:show-close="false" :show-close="false"
class="changeSuccessDialog" class="changeSuccessDialog"
:align-center="isMobile"
align-center
center
> >
<div class="changeSuccessDialogTitle">兑换成功</div>
<div class="changeSuccessDialogTitle">
<img v-if="!isMobile" src="https://d31zlh4on95l9h.cloudfront.net/images/84edd341b2ddec464fc4475254f7a309.png" style="scale: 0.7;" alt="token图标">
兑换成功
</div>
<div class="changeSuccessDialogContent"> <div class="changeSuccessDialogContent">
尊敬的用户恭喜您成功兑换{{ activeLevel.calculatedPosition }} Token 尊敬的用户恭喜您成功兑换{{ activeLevel.calculatedPosition }} Token
</div> </div>
<div class="changeSuccessDialogFooter">
<button class="confirmButton" @click="changeSuccessDialogVisible = false">确定</button>
</div>
</el-dialog> </el-dialog>
<!-- Token规则提示框 --> <!-- Token规则提示框 -->
@ -2029,6 +2050,7 @@ body {
position: absolute; position: absolute;
right: 20px; right: 20px;
display: flex; display: flex;
gap: 10px;
} }
.pc-countBtn { .pc-countBtn {
@ -2345,6 +2367,7 @@ body {
.changeRule { .changeRule {
display: flex; display: flex;
flex-direction: column;
background-color: #f8f8f8; background-color: #f8f8f8;
border-radius: 5px; border-radius: 5px;
text-align: center; text-align: center;
@ -2354,6 +2377,14 @@ body {
white-space: nowrap; white-space: nowrap;
padding: 5px 20px; padding: 5px 20px;
min-width: 40%; min-width: 40%;
transition: all 0.3s ease;
cursor: pointer;
}
.changeRule:hover {
background-color: #e8f0ff;
box-shadow: 0 2px 8px rgba(78, 134, 254, 0.2);
transform: translateY(-2px);
} }
.changeLevel { .changeLevel {
@ -2544,7 +2575,17 @@ body {
.changeSuccessDialogTitle { .changeSuccessDialogTitle {
font-size: 1.7rem; font-size: 1.7rem;
font-weight: bold; font-weight: bold;
color: #de93a3;
color: #7849DE;
display: flex;
justify-content: center;
align-items: center;
letter-spacing: 10px;
}
.changeSuccessDialogTitle image{
font-size: 1.7rem;
font-weight: bold;
color: #7849DE;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
@ -2553,6 +2594,7 @@ body {
.changeSuccessDialogContent { .changeSuccessDialogContent {
padding: 20px; padding: 20px;
color: white;
font-size: 1.2rem; font-size: 1.2rem;
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
@ -2701,7 +2743,7 @@ body {
} }
.backImg { .backImg {
width: 40px;
width: 35px;
height: auto; height: auto;
} }
@ -2741,6 +2783,7 @@ body {
.changeLevelTitle { .changeLevelTitle {
align-items: center; align-items: center;
display: flex; display: flex;
flex-direction: column;
} }
.changeRule { .changeRule {
margin-left: 10px; margin-left: 10px;
@ -2836,6 +2879,29 @@ body {
<style> <style>
.changeSuccessDialog { .changeSuccessDialog {
background: linear-gradient(180deg, #a2dffe, #b59be1);
background: linear-gradient(180deg, #80D3F8, #8080FF);
}
.changeSuccessDialogFooter {
display: flex;
justify-content: center;
margin-top: 20px;
}
.confirmButton {
background: #8A52DF;
color: white;
border: none;
border-radius: 5px;
padding: 8px 30px;
font-size: 16px;
cursor: pointer;
transition: all 0.3s ease;
}
.confirmButton:hover {
background: #3a75e6;
transform: translateY(-2px);
box-shadow: 0 2px 8px rgba(78, 134, 254, 0.3);
} }
</style> </style>
Loading…
Cancel
Save