diff --git a/src/views/components/BackToHomeButton.vue b/src/views/components/BackToHomeButton.vue index 6619432..483d8ac 100644 --- a/src/views/components/BackToHomeButton.vue +++ b/src/views/components/BackToHomeButton.vue @@ -1,11 +1,8 @@ @@ -88,8 +85,14 @@ const backToHome = () => { @media (max-width: 768px) { .backToHomeBtn { - top: 0px; - right: 0px; + top: 15px; + right: -50px; + } + + .backImg { + width: 30%; + height: auto; + ; } } \ No newline at end of file diff --git a/src/views/components/HistoryRecord.vue b/src/views/components/HistoryRecord.vue index f234368..48e23ca 100644 --- a/src/views/components/HistoryRecord.vue +++ b/src/views/components/HistoryRecord.vue @@ -10,13 +10,19 @@
icon icon + icon @@ -30,7 +36,7 @@ > icon
@@ -41,7 +47,7 @@ > icon @@ -62,7 +68,7 @@ icon @@ -187,19 +193,21 @@
-
+
icon +
公告
-
+
+
用户反馈
@@ -358,7 +366,7 @@ > icon
公告
@@ -370,7 +378,7 @@ > icon
用户反馈
@@ -924,6 +932,9 @@ onMounted(() => { border-color: rgba(255, 255, 255, 0.3); } +.god-icon { + width: 100%; +} .collapsed-bottom-container { width: 100%; height: 16%; @@ -1216,10 +1227,14 @@ onMounted(() => { .bottom-btn { width: 50%; display: flex; + flex-direction: column; justify-content: center; align-items: center; cursor: pointer; } +.bottom-btn:hover { + transform: scale(1.2); +} .mobile-bottom-btn { width: 100%; @@ -1229,7 +1244,7 @@ onMounted(() => { } .bottom-feedback { - width: 30%; + width: 35%; height: auto; } @@ -1239,12 +1254,12 @@ onMounted(() => { width: auto; } -.bottom-feedback:hover { +/* .bottom-feedback:hover { transform: scale(1.2); -} +} */ .bottom-announcement { - width: 30%; + width: 35%; height: auto; } @@ -1260,9 +1275,9 @@ onMounted(() => { font-size: 1.1rem; } -.bottom-announcement:hover { +/* .bottom-announcement:hover { transform: scale(1.2); -} +} */ /* 移动端适配 */ @media (max-width: 768px) { diff --git a/src/views/components/emotionDecod.vue b/src/views/components/emotionDecod.vue index 76a1bf6..2c35a2e 100644 --- a/src/views/components/emotionDecod.vue +++ b/src/views/components/emotionDecod.vue @@ -72,10 +72,30 @@ function initQXNLZHEcharts(kline, qxnlzhqData) { confine: true, // 限制tooltip不超出容器 axisPointer: { type: 'cross', // 十字准星效果 + lineStyle: { + color: 'grey', + width: 1, + type: 'dashed' + }, crossStyle: { 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) { if (!params || params.length === 0) return '' @@ -89,7 +109,7 @@ function initQXNLZHEcharts(kline, qxnlzhqData) { const close = klineParam.data[2] const low = klineParam.data[3] const high = klineParam.data[4] - return `日期: ${date}
开盘价: ${open}
收盘价: ${close}
最低价: ${low}
最高价: ${high}` + return `日期: ${date}
开盘价: ${open}
收盘价: ${close}
最低价: ${low}
最高价: ${high}` } }, diff --git a/src/views/components/marketTemperature.vue b/src/views/components/marketTemperature.vue index edac0cf..34b392c 100644 --- a/src/views/components/marketTemperature.vue +++ b/src/views/components/marketTemperature.vue @@ -369,14 +369,14 @@ function initChart(raw, klineDataRawValue, WDRLValue) { const dateLabels = raw.map((item) => item[0]); const marketData = raw.map((item) => Math.round(item[1])); const stockData = raw.map((item) => Math.round(item[2])); - + // 处理数据重合时只显示市场温度的逻辑 // 检查是否所有数据都重合 const allDataMatch = stockData.every((stockTemp, index) => { const marketTemp = marketData[index]; return stockTemp === marketTemp; }); - + // 只有当全部数据都重合时,才只显示市场温度(股票温度设为null) const processedStockData = allDataMatch ? stockData.map(() => null) : stockData; @@ -423,24 +423,26 @@ function initChart(raw, klineDataRawValue, WDRLValue) { axisPointer: { type: "cross", crossStyle: { - color: "#999", - width: 1, - type: "dashed", + color: '#999' }, lineStyle: { - color: "#999", - width: 1, - type: "dashed", + type: 'dashed' // 设置为虚线 }, + link: [ + { + xAxisIndex: [0, 1, 2] + } + ] }, - backgroundColor: '#646E71', - borderColor: '#fff', - borderWidth: 1, - padding: [8, 12], - textStyle: { - color: '#fff', - fontSize: window.innerWidth <= 768 ? 10 : 12 // 移动端使用更小字体 - }, + backgroundColor: 'rgba(232, 232, 242, 0.87)', + borderColor: '#fff', + borderWidth: 1, + borderRadius: 8, + padding: 10, + textStyle: { + color: '#555555', + fontSize: 12 + }, 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: 350px; 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 marginBottom = isMobile ? '4px' : '6px'; - let result = `
日期: ${params[0].name}
`; + let result = `
日期: ${params[0].name}
`; params.forEach((param) => { if (param.seriesType === "candlestick") { @@ -463,24 +465,31 @@ function initChart(raw, klineDataRawValue, WDRLValue) { if (isMobile) { // 移动端简化显示 result += `
`; - result += `
${param.seriesName}
`; - result += `
开盘价:${open}
`; - result += `
收盘价:${close}
`; - result += `
最低价:${low}
`; - result += `
最高价:${high}
`; + result += `
${param.seriesName}
`; + result += `
开盘价:${open}
`; + result += `
收盘价:${close}
`; + result += `
最低价:${low}
`; + result += `
最高价:${high}
`; result += `
`; } else { // 桌面端完整显示 result += `
`; - result += `
${param.seriesName}
`; - result += `
开盘价: ${open}
`; - result += `
收盘价: ${close}
`; - result += `
最低价: ${low}
`; - result += `
最高价: ${high}
`; + result += `
${param.seriesName}
`; + result += `
开盘价: ${open}
`; + result += `
收盘价: ${close}
`; + result += `
最低价: ${low}
`; + result += `
最高价: ${high}
`; result += `
`; } } else if (param.seriesType === "line") { - result += `
${param.seriesName}: ${param.value}
`; + // 根据系列名称设置不同颜色 + let textColor = 'black'; + if (param.seriesName === '市场温度') { + textColor = 'red'; + } else if (param.seriesName === '股票温度') { + textColor = 'blue'; + } + result += `
${param.seriesName}: ${param.value}
`; } }); return result; @@ -511,14 +520,14 @@ function initChart(raw, klineDataRawValue, WDRLValue) { fontWeight: "bold", }, - axisTick: { + axisTick: { show: true, alignWithLabel: true, // 刻度线与标签对齐 - lineStyle: { + lineStyle: { color: "white", // 与十字线颜色保持一致 width: 1, type: "dashed" // 与十字线样式保持一致 - } + } }, axisPointer: { show: true, @@ -678,7 +687,7 @@ function initChart(raw, klineDataRawValue, WDRLValue) { }, ], }); - + // 添加图表交互事件监听器 if (chartInstance) { // 监听数据缩放事件 @@ -687,28 +696,28 @@ function initChart(raw, klineDataRawValue, WDRLValue) { window.handleChartInteractionStart(); } }); - + // 监听鼠标滚轮事件(缩放) chartInstance.on('mousewheel', () => { if (window.handleChartInteractionStart) { window.handleChartInteractionStart(); } }); - + // 监听鼠标按下事件(拖拽开始) chartInstance.on('mousedown', () => { if (window.handleChartInteractionStart) { window.handleChartInteractionStart(); } }); - + // 监听鼠标释放事件(拖拽结束) chartInstance.on('mouseup', () => { if (window.handleChartInteractionEnd) { window.handleChartInteractionEnd(); } }); - + // 监听图表点击事件 chartInstance.on('click', () => { if (window.handleChartInteractionStart) { @@ -716,7 +725,7 @@ function initChart(raw, klineDataRawValue, WDRLValue) { } }); } - + // 防抖函数,避免频繁触发resize const debounce = (func, wait) => { let timeout; @@ -1108,6 +1117,7 @@ defineExpose({ initChart }); display: flex; justify-content: center; align-items: center; + @media only screen and (max-width: 768px) { font-size: 12px; } diff --git a/src/views/homePage.vue b/src/views/homePage.vue index 982cc4d..a4860b1 100644 --- a/src/views/homePage.vue +++ b/src/views/homePage.vue @@ -342,10 +342,21 @@ const hasShownTokenRule = ref({ const closeTokenRuleDialog = () => { 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) { tokenRuleDialogVisible.value = false; } @@ -1137,9 +1148,9 @@ const goChange = async () => { confirmDialogVisible.value = false; dialogVisible.value = false; changeSuccessDialogVisible.value = true; - setTimeout(() => { - changeSuccessDialogVisible.value = false; - }, 2000); + // setTimeout(() => { + // changeSuccessDialogVisible.value = false; + // }, 2000); // 刷新次数 await chatStore.getUserCount(); @@ -1293,7 +1304,7 @@ onUnmounted(() => {
返回首页 @@ -1342,7 +1353,7 @@ onUnmounted(() => {
返回首页 @@ -1487,7 +1498,7 @@ onUnmounted(() => {
返回首页 @@ -1551,6 +1562,7 @@ onUnmounted(() => {
兑换规则:{{ changeRule.gold }}金币={{ changeRule.token }}Token +
点击查看详情
@@ -1610,7 +1622,9 @@ onUnmounted(() => { 兑换Token
(兑换规则:{{ changeRule.gold }}金币={{ changeRule.token }}Token) +
点击查看详情
+
@@ -1671,7 +1685,7 @@ onUnmounted(() => { v-model="confirmDialogVisible" :width="isMobile ? '60%' : '30%'" :show-close="false" - :align-center="isMobile" + align-center="true" >
兑换
@@ -1692,12 +1706,19 @@ onUnmounted(() => { :width="isMobile ? '60%' : '30%'" :show-close="false" class="changeSuccessDialog" - :align-center="isMobile" + align-center + center > -
兑换成功
+
+ token图标 + 兑换成功 +
尊敬的用户,恭喜您成功兑换:{{ activeLevel.calculatedPosition }} Token
+
+ +
@@ -2029,6 +2050,7 @@ body { position: absolute; right: 20px; display: flex; + gap: 10px; } .pc-countBtn { @@ -2345,6 +2367,7 @@ body { .changeRule { display: flex; + flex-direction: column; background-color: #f8f8f8; border-radius: 5px; text-align: center; @@ -2354,6 +2377,14 @@ body { white-space: nowrap; padding: 5px 20px; 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 { @@ -2544,7 +2575,17 @@ body { .changeSuccessDialogTitle { font-size: 1.7rem; 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; justify-content: center; align-items: center; @@ -2553,6 +2594,7 @@ body { .changeSuccessDialogContent { padding: 20px; + color: white; font-size: 1.2rem; font-weight: bold; text-align: center; @@ -2701,7 +2743,7 @@ body { } .backImg { - width: 40px; + width: 35px; height: auto; } @@ -2741,6 +2783,7 @@ body { .changeLevelTitle { align-items: center; display: flex; + flex-direction: column; } .changeRule { margin-left: 10px; @@ -2836,6 +2879,29 @@ body {