From 38c9d774c1388bcc5b796b1d9054327f2585a21a Mon Sep 17 00:00:00 2001 From: ZhangYong Date: Fri, 31 Oct 2025 13:33:13 +0800 Subject: [PATCH 01/21] =?UTF-8?q?=E6=A8=AA=E5=B1=8F=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/deepExploration/MainForceActions.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/deepExploration/MainForceActions.vue b/pages/deepExploration/MainForceActions.vue index 752495d..be6e701 100644 --- a/pages/deepExploration/MainForceActions.vue +++ b/pages/deepExploration/MainForceActions.vue @@ -41,7 +41,7 @@ - + From 29078a9058678ff0b6fb98c1b06d4eab0364398a Mon Sep 17 00:00:00 2001 From: ZhangYong Date: Fri, 31 Oct 2025 13:53:20 +0800 Subject: [PATCH 02/21] =?UTF-8?q?=E6=A8=AA=E5=B1=8F=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/deepExploration/MainForceActions.vue | 161 ++++++++++++++++++++++++++++- 1 file changed, 156 insertions(+), 5 deletions(-) diff --git a/pages/deepExploration/MainForceActions.vue b/pages/deepExploration/MainForceActions.vue index be6e701..3d482f7 100644 --- a/pages/deepExploration/MainForceActions.vue +++ b/pages/deepExploration/MainForceActions.vue @@ -41,7 +41,30 @@ - + + + + + + + + + + + + + + + + + + + + + + @@ -107,6 +130,37 @@ //登录弹窗提示ref const loginPrompt = ref(null) + // 全屏相关状态 + const isFullscreen = ref(false); // 是否显示全屏弹窗 + const isLandscape = ref(true); // 是否横屏模式 + const fullscreenChartKey = ref(0); // 全屏图表重绘标识 + + + + // 显示全屏K线 + const showFullscreenKline = () => { + isFullscreen.value = true; + isLandscape.value = true; // 默认横屏 + // 强制重绘图表 + setTimeout(() => { + fullscreenChartKey.value++; + }, 100); + }; + + // 关闭全屏 + const closeFullscreen = () => { + isFullscreen.value = false; + }; + + // 切换横竖屏 + const toggleOrientation = () => { + isLandscape.value = !isLandscape.value; + // 旋转后重绘图表 + setTimeout(() => { + fullscreenChartKey.value++; + }, 300); + }; + // 响应式变量定义 const type = ref('deepExploration') const iSMT = ref(0) @@ -494,6 +548,28 @@ } } }) + + // 全屏图表配置(继承原有配置并优化) + const fullscreenOpts = ref({ + ...opts.value, // 复用原有配置 + padding: [30, 30, 30, 30], + xAxis: { + ...opts.value.xAxis, + labelCount: 8, // 横屏显示更多标签 + fontSize: 12 + }, + yAxis: { + ...opts.value.yAxis, + fontSize: 12 + }, + extra: { + ...opts.value.extra, + candle: { + ...opts.value.extra.candle, + width: 12 // 横屏时K线宽度增加 + } + } + }); // 2. K线图数据(响应式定义) const chartData = ref({ @@ -548,6 +624,7 @@ let unwatch = null; // 生命周期钩子:组件挂载后执行(替代onReady) onMounted(async () => { + iSMT.value = uni.getSystemInfoSync().statusBarHeight getUserInfo() await handleModels() @@ -571,7 +648,8 @@ //k线 if (historyData.value.stockData.chartData.categories.length > 1) { // 确保至少保留一个日期 - historyData.value.stockData.chartData.categories[historyData.value.stockData.chartData.categories.length - 1] = ''; // 删除最后一个日期 + historyData.value.stockData.chartData.categories[historyData.value.stockData.chartData + .categories.length - 1] = ''; // 删除最后一个日期 } chartData.value = { ...JSON.parse(JSON.stringify(historyData.value.stockData.chartData)) @@ -585,7 +663,7 @@ stockChange.value = historyData.value.stockData.StockInformation.Zhang || '5.120%' stockAdd.value = historyData.value.stockData.StockInformation.ZhangFu || '22.410' stockPrice.value = historyData.value.stockData.StockInformation.Price || '435.900' - currentIndex.value = historyData.value.model-1 + currentIndex.value = historyData.value.model - 1 }, { deep: true, immediate: true @@ -770,8 +848,8 @@ .graph_content { position: relative; min-height: 500rpx; - - image{ + + image { position: absolute; bottom: 20rpx; right: 30rpx; @@ -786,6 +864,79 @@ } } } + + /* 横屏按钮样式 */ + .rotate-btn { + background: transparent; + padding: 0 10rpx; + margin-left: 15rpx; + + .btn-icon { + width: 36rpx; + height: 36rpx; + vertical-align: middle; + } + } + + /* 全屏遮罩 */ + .fullscreen-mask { + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + background-color: #000; + z-index: 9999; + display: flex; + justify-content: center; + align-items: center; + } + + /* 全屏容器 */ + .fullscreen-container { + width: 100vh; /* 横屏时宽度等于屏幕高度 */ + height: 100vw; /* 横屏时高度等于屏幕宽度 */ + transition: transform 0.3s ease; + position: relative; + } + + /* 关闭按钮 */ + .fullscreen-close { + position: absolute; + top: 20rpx; + right: 20rpx; + z-index: 10; + + image { + width: 48rpx; + height: 48rpx; + } + } + + /* 旋转按钮 */ + .fullscreen-rotate { + position: absolute; + top: 20rpx; + left: 20rpx; + z-index: 10; + + image { + width: 48rpx; + height: 48rpx; + } + } + + /* 全屏图表容器 */ + .fullscreen-chart { + width: 100%; + height: 100%; + } + + /* 竖屏模式适配 */ + :deep(.fullscreen-container:not([style*="rotate(90deg)"])) { + width: 100vw; + height: 100vh; + } .txt { background-color: #F3F3F3; From 0546fcbfb080e5e897177649a7b7a77f4e5a79d8 Mon Sep 17 00:00:00 2001 From: ZhangYong Date: Fri, 31 Oct 2025 15:13:21 +0800 Subject: [PATCH 03/21] =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/deepExploration/MainForceActions.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/deepExploration/MainForceActions.vue b/pages/deepExploration/MainForceActions.vue index 3d482f7..883048c 100644 --- a/pages/deepExploration/MainForceActions.vue +++ b/pages/deepExploration/MainForceActions.vue @@ -675,7 +675,7 @@ // 页面加载时执行 onLoad((e) => { if (e.index) { - // currentIndex.value = e.index - 1 + currentIndex.value = e.index - 1 console.log('模块:', currentIndex.value) } if (e.stockName) { From f0fbd2d2b40ac462153afb2902627962bcaa667d Mon Sep 17 00:00:00 2001 From: zhaowenkang Date: Fri, 31 Oct 2025 15:20:11 +0800 Subject: [PATCH 04/21] =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/IndexCard.vue | 15 +++++++++++++++ pages/marketSituation/countryMarket.vue | 25 ++++++++++++++++++++----- pages/marketSituation/marketCondition.vue | 15 +++++++++++++++ pages/marketSituation/marketOverview.vue | 16 ++++++++-------- pages/marketSituation/marketSituation.vue | 9 ++++----- stores/modules/marketSituation.js | 2 ++ 6 files changed, 64 insertions(+), 18 deletions(-) diff --git a/components/IndexCard.vue b/components/IndexCard.vue index 69a3de3..01cf7f5 100644 --- a/components/IndexCard.vue +++ b/components/IndexCard.vue @@ -63,6 +63,21 @@ const props = defineProps({ }, }); +const judgeSymbol = (num) => { + // 兼容 undefined/null/数字/字符串 + if (num === null || num === undefined) return ''; + const n = Number(num); + if (!isNaN(n)) { + // 数值:正数加'+',负数原样 + return (n < 0 ? '' : '+') + n; + } + // 字符串:去空格后判断前缀 + const s = String(num).trim(); + if (s.startsWith('-')) return s; + if (s.startsWith('+')) return s; + return '+' + s; +}; + const getMarketFlag = (market) => { let imagePath; diff --git a/pages/marketSituation/countryMarket.vue b/pages/marketSituation/countryMarket.vue index a31933e..7f23c1c 100644 --- a/pages/marketSituation/countryMarket.vue +++ b/pages/marketSituation/countryMarket.vue @@ -17,7 +17,7 @@ - + @@ -95,6 +95,8 @@ import { ref, computed, onMounted, watch } from "vue"; import IndexCard from "../../components/IndexCard.vue"; import { queryStockDataAPI } from "@/api/marketSituation/marketSituation"; +import { useMarketSituationStore } from "../../stores/modules/marketSituation.js"; +const marketSituationStore = useMarketSituationStore(); onMounted(() => { switchTab(0); @@ -111,6 +113,11 @@ const switchTab = (i) => { }).then((res) => { if (res.code === 200) { countryInfo.value = res.data.dataPage.records; + marketSituationStore.countryMarketCardData = countryInfo.value.map((item) => ({ + market: item.market, + stockCode: item.code, + stockName: item.name, + })); console.log(res.data) console.log(res.data.dataPage.records) console.log(countryInfo.value); @@ -149,12 +156,23 @@ const props = defineProps({ // 计算当前国家信息 const countryInfo = ref('') - +// 方法:查看指数详情 +const viewIndexDetail = (item, index) => { + console.log("查看指数详情:", item); + uni.navigateTo({ + url: `/pages/marketSituation/marketCondition?stockInformation=${encodeURIComponent(JSON.stringify(item))}&index=${index}&from=countryMarket`, + }); +}; // 处理从父组件接收的数据 const handleTabData = (tabData) => { if (tabData && tabData.type === 'country' && tabData.data) { if (tabData.data.dataPage && tabData.data.dataPage.records) { countryInfo.value = tabData.data.dataPage.records; + marketSituationStore.countryMarketCardData = countryInfo.value.map((item) => ({ + market: item.market, + stockCode: item.code, + stockName: item.name, + })); console.log('countryMarket接收到数据:', countryInfo.value); } } @@ -169,9 +187,6 @@ watch(() => props.tabData, (newTabData) => { // 查看更多占位 const viewMore = (type) => { - // 可根据 type 跳转到相应页面或加载更多 - // 例如:indices/sectors/stocks - // uni.navigateTo({ url: `/pages/marketSituation/${type}List` }) }; diff --git a/pages/marketSituation/marketCondition.vue b/pages/marketSituation/marketCondition.vue index 3d398d9..9b3d55d 100644 --- a/pages/marketSituation/marketCondition.vue +++ b/pages/marketSituation/marketCondition.vue @@ -686,6 +686,8 @@ const toLeftPage = () => { nextStockInformation = marketSituationStore.marketDetailCardData[currentStockIndex.value]; } else if (currentStockFrom.value == "globalIndex") { nextStockInformation = marketSituationStore.gloablCardData[currentStockParentIndex.value].list[currentStockIndex.value]; + } else if (currentStockFrom.value == "countryMarket") { + nextStockInformation = marketSituationStore.countryMarketCardData[currentStockIndex.value]; } else { uni.showToast({ title: "没有更多股票了", @@ -739,6 +741,19 @@ const toRightPage = () => { nextStockInformation = marketSituationStore.gloablCardData[currentStockParentIndex.value].list[currentStockIndex.value]; updateStockInformation(nextStockInformation); } + } else if (currentStockFrom.value == "countryMarket") { + if (currentStockIndex.value == marketSituationStore.countryMarketCardData.length) { + uni.showToast({ + title: "没有更多股票了", + icon: "none", + duration: 1000, + }); + return; + } else { + currentStockIndex.value++; + nextStockInformation = marketSituationStore.countryMarketCardData[currentStockIndex.value]; + updateStockInformation(nextStockInformation); + } } else { uni.showToast({ title: "没有更多股票了", diff --git a/pages/marketSituation/marketOverview.vue b/pages/marketSituation/marketOverview.vue index 732a946..0827d43 100644 --- a/pages/marketSituation/marketOverview.vue +++ b/pages/marketSituation/marketOverview.vue @@ -719,8 +719,8 @@ watch(headerHeight, (newHeight) => { .NDX { position: absolute; - top: 30%; - left: 17%; + top: 23vh; + left: 17vw; transform: translate(-50%, -50%); font-size: 11rpx; color: #000000; @@ -731,8 +731,8 @@ watch(headerHeight, (newHeight) => { } .INDU { position: absolute; - top: 22%; - left: 35%; + top: 15vh; + left: 35vw; transform: translate(-50%, -50%); font-size: 11rpx; color: #000000; @@ -743,8 +743,8 @@ watch(headerHeight, (newHeight) => { } .HSI { position: absolute; - top: 30%; - right: 13%; + top: 23vh; + right: 4vw; transform: translate(-50%, -50%); font-size: 11rpx; color: #000000; @@ -755,8 +755,8 @@ watch(headerHeight, (newHeight) => { } .CN { position: absolute; - top: 23%; - right: 16%; + top: 16vh; + right: 8vw; transform: translate(-50%, -50%); font-size: 11rpx; color: #000000; diff --git a/pages/marketSituation/marketSituation.vue b/pages/marketSituation/marketSituation.vue index 1503954..d589b9c 100644 --- a/pages/marketSituation/marketSituation.vue +++ b/pages/marketSituation/marketSituation.vue @@ -177,11 +177,10 @@ const selected = () => { // 历史记录点击事件 const history = () => { - uni.showToast({ - title: "历史记录", - icon: "none", - }); - // 这里可以跳转到历史页面 + // 跳转到自定义股票列表页面 + uni.navigateTo({ + url: '/pages/customStockList/customStockList' + }) }; // Tab 栏点击事件 diff --git a/stores/modules/marketSituation.js b/stores/modules/marketSituation.js index 2ae69fe..f8db4c1 100644 --- a/stores/modules/marketSituation.js +++ b/stores/modules/marketSituation.js @@ -9,11 +9,13 @@ export const useMarketSituationStore = defineStore( const cardData = ref([]); const gloablCardData = ref([]); const marketDetailCardData = ref([]); + const countryMarketCardData = ref([]); // 记得 return return { cardData, gloablCardData, marketDetailCardData, + countryMarketCardData, }; }, // TODO: 持久化 From 1a758d266c034398b0548f3965c295c2b7849232 Mon Sep 17 00:00:00 2001 From: ZhangYong Date: Fri, 31 Oct 2025 15:38:21 +0800 Subject: [PATCH 05/21] =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/deepExploration/MainForceActions.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/deepExploration/MainForceActions.vue b/pages/deepExploration/MainForceActions.vue index 883048c..d4378c8 100644 --- a/pages/deepExploration/MainForceActions.vue +++ b/pages/deepExploration/MainForceActions.vue @@ -213,7 +213,7 @@ const recordId = ref('') const parentId = ref('') const stockId = ref('') - const market = ref('') + const market = ref('usa') const stockTime = ref('2025/10/24') const loading = ref(true); @@ -258,6 +258,7 @@ if (searchName.value == '') { console.log('没有搜索', searchName.value); handleDefault() + getServerData() } else { if (currentIndex.value == 0) { console.log('搜索', searchName.value); From 36a235fe1ead36bf4172e9c0a3148d88ec43063c Mon Sep 17 00:00:00 2001 From: wangyi <3432649580@qq.com> Date: Fri, 31 Oct 2025 16:26:47 +0800 Subject: [PATCH 06/21] =?UTF-8?q?=E5=BD=93=E7=94=A8=E6=88=B7token=E5=A4=B1?= =?UTF-8?q?=E6=95=88=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C=E5=8F=AA=E6=9C=89?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E7=A1=AE=E8=AE=A4=EF=BC=8C=E6=89=8D=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/http.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/utils/http.js b/utils/http.js index 1a1330e..a3661d9 100644 --- a/utils/http.js +++ b/utils/http.js @@ -79,16 +79,18 @@ export const http = (options) => { } if (result.data.code === 400) { const userStore = useUserStore() - userStore.clearUserInfo() uni.showModal({ title: "登录失效", content: "点击确定跳转登录页面", confirmText: "确定", cancelText: "取消", success: (res) => { - uni.navigateTo({ - url: '/pages/start/login/login' - }) + if (res.confirm) { + userStore.clearUserInfo() + uni.navigateTo({ + url: '/pages/start/login/login' + }) + } }, }); } From 1ce56aef47fbad5c7538097c0ae1c97fae480df3 Mon Sep 17 00:00:00 2001 From: dongqian <3475123872@qq.com> Date: Fri, 31 Oct 2025 16:46:56 +0800 Subject: [PATCH 07/21] =?UTF-8?q?=E5=8A=A0=E7=B2=97=E9=80=89=E8=82=A1?= =?UTF-8?q?=E7=AD=96=E7=95=A5=E6=95=B0=E6=8D=AE=E5=AD=97=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/deepExploration/stockSelectDetail.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pages/deepExploration/stockSelectDetail.vue b/pages/deepExploration/stockSelectDetail.vue index 4d133b7..116fa42 100644 --- a/pages/deepExploration/stockSelectDetail.vue +++ b/pages/deepExploration/stockSelectDetail.vue @@ -342,18 +342,19 @@ display: flex; border-top: 1rpx dashed #eee; width: 210%; + font-weight: 400; &.increase-positive { .other_colum { color: #2DD357; - font-weight: 200; + font-weight: 400; } } &.increase-negative { .other_colum { color: #FF4150; - font-weight: 200; + font-weight: 400; } } From 687fc828bcf0ef92a670be33d27505f68bf82adf Mon Sep 17 00:00:00 2001 From: wangyi <3432649580@qq.com> Date: Fri, 31 Oct 2025 17:20:18 +0800 Subject: [PATCH 08/21] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=B3=A8=E5=86=8C=E6=8E=A5=E5=8F=A3=EF=BC=8C=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=9B=BD=E5=AE=B6=E5=8C=BA=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/login-prompt.vue | 1 + pages/start/Registration/Registration.vue | 21 +- pages/start/login/login.vue | 9 +- pages/start/recoverPassword/list.js | 1341 +++++++++++++++++++++++ pages/start/recoverPassword/recoverPassword.vue | 12 +- 5 files changed, 1365 insertions(+), 19 deletions(-) create mode 100644 pages/start/recoverPassword/list.js diff --git a/components/login-prompt.vue b/components/login-prompt.vue index a7d0783..088ec4b 100644 --- a/components/login-prompt.vue +++ b/components/login-prompt.vue @@ -109,6 +109,7 @@ const continueAsVisitor = async () => { const res = await LoginApi({ loginType: "VISITOR", //登录方式EMAIL,PHONE,DCCODE,APPLE,GOOGLE,VISITOR account: "", //登陆账号 手机号/邮箱/dccode + phoneCountry: "", //手机号所属地区 verifyCode: "", //验证码 password: "", //密码 useCode: "", //是否使用验证码 true/false diff --git a/pages/start/Registration/Registration.vue b/pages/start/Registration/Registration.vue index 994a2c3..fe1a22f 100644 --- a/pages/start/Registration/Registration.vue +++ b/pages/start/Registration/Registration.vue @@ -189,7 +189,7 @@