|
|
@@ -23,39 +23,41 @@
|
|
|
<scroll-view class="scroll-view" scroll-y>
|
|
|
<!-- #endif -->
|
|
|
<view class="content-wrapper">
|
|
|
- <!-- 强势趋势池标题 -->
|
|
|
+ <!-- 中长期市场趋势研究区标题 -->
|
|
|
<view class="pool-header-section">
|
|
|
<view class="pool-header">
|
|
|
<text class="pool-icon">📈</text>
|
|
|
- <text class="pool-title">强势趋势池</text>
|
|
|
+ <text class="pool-title">中长期市场趋势研究区</text>
|
|
|
</view>
|
|
|
- <text class="pool-desc">本月精选,专注于中长期趋势跟踪</text>
|
|
|
+ <text class="pool-desc">历史趋势数据回顾,仅供学习研究,不精选投资标的</text>
|
|
|
</view>
|
|
|
|
|
|
- <!-- 强势趋势池区域 -->
|
|
|
+ <!-- 中长期市场趋势研究区区域 -->
|
|
|
<view class="card pool-card">
|
|
|
<!-- 直接显示内容(强势池公开访问) -->
|
|
|
<view class="unlocked-content">
|
|
|
<view class="unlocked-header">
|
|
|
<view class="unlocked-dot"></view>
|
|
|
- <text class="unlocked-tip">实时更新</text>
|
|
|
+ <text class="unlocked-tip">实时更新 ({{ currentDate }})</text>
|
|
|
+ </view>
|
|
|
+ <view class="update-tip-wrapper">
|
|
|
+ <text class="update-tip">数据更新提示(仅为历史数据同步,不代表实时交易建议)</text>
|
|
|
</view>
|
|
|
<view class="stock-list">
|
|
|
<view class="stock-item" v-for="(stock, index) in stockList" :key="index">
|
|
|
<view class="stock-main">
|
|
|
<view class="stock-info">
|
|
|
<text class="stock-name">{{ stock.name }}</text>
|
|
|
- <text class="stock-code">{{ stock.code }}</text>
|
|
|
</view>
|
|
|
<view class="stock-quote">
|
|
|
- <text class="stock-price">{{ stock.currentPrice || '-' }}</text>
|
|
|
<text :class="['stock-change', getChangeClass(stock.changePercent)]">{{ stock.changePercent || '-' }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="stock-action">
|
|
|
<view class="add-btn" @click="addToMyStocks(stock)">
|
|
|
- <text class="add-btn-text">+ 自选</text>
|
|
|
+ <text class="add-btn-text">加入学习观察</text>
|
|
|
</view>
|
|
|
+ <text class="add-btn-tip">仅为学习标记,不构成投资建议</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -79,7 +81,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { ref, onUnmounted } from 'vue'
|
|
|
+import { ref, onUnmounted, computed } from 'vue'
|
|
|
import { onLoad, onShow, onHide } from '@dcloudio/uni-app'
|
|
|
import { isLoggedIn as checkLoginStatus } from '../../utils/auth.js'
|
|
|
import { getStockQuotes, addUserStock, getStockPoolList } from '../../utils/api.js'
|
|
|
@@ -95,6 +97,15 @@ let refreshTimer = null
|
|
|
const app = getApp();
|
|
|
// #endif
|
|
|
|
|
|
+// 获取当前日期
|
|
|
+const currentDate = computed(() => {
|
|
|
+ const now = new Date()
|
|
|
+ const year = now.getFullYear()
|
|
|
+ const month = String(now.getMonth() + 1).padStart(2, '0')
|
|
|
+ const day = String(now.getDate()).padStart(2, '0')
|
|
|
+ return `${year}年${month}月${day}日`
|
|
|
+})
|
|
|
+
|
|
|
// 获取涨跌样式
|
|
|
const getChangeClass = (changePercent) => {
|
|
|
if (!changePercent || changePercent === '-') return ''
|
|
|
@@ -226,12 +237,12 @@ onShow(() => {
|
|
|
loadAndStartRefresh()
|
|
|
// #ifdef MP-WEIXIN
|
|
|
uni.setNavigationBarTitle({
|
|
|
- title: app.globalData.envVersion == 'develop' ? '介绍' : '量化交易大师'
|
|
|
+ title: app.globalData.envVersion == 'develop' ? '介绍' : '财经数据科普与学习平台'
|
|
|
})
|
|
|
// #endif
|
|
|
// #ifdef H5
|
|
|
uni.setNavigationBarTitle({
|
|
|
- title: '量化交易大师'
|
|
|
+ title: '财经数据科普与学习平台'
|
|
|
})
|
|
|
// #endif
|
|
|
})
|
|
|
@@ -375,6 +386,18 @@ onUnmounted(() => {
|
|
|
letter-spacing: 1rpx;
|
|
|
}
|
|
|
|
|
|
+.update-tip-wrapper {
|
|
|
+ margin-bottom: 24rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.update-tip {
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: #9ca2b5;
|
|
|
+ line-height: 1.6;
|
|
|
+ text-align: center;
|
|
|
+ display: block;
|
|
|
+}
|
|
|
+
|
|
|
.stock-list {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
@@ -423,20 +446,10 @@ onUnmounted(() => {
|
|
|
justify-content: flex-end;
|
|
|
}
|
|
|
|
|
|
-.stock-price {
|
|
|
- font-size: 32rpx;
|
|
|
- font-weight: 800;
|
|
|
- color: #1a1a2e;
|
|
|
- margin-right: 16rpx;
|
|
|
- min-width: 120rpx;
|
|
|
- text-align: right;
|
|
|
- font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
|
|
|
-}
|
|
|
-
|
|
|
.stock-change {
|
|
|
- font-size: 24rpx;
|
|
|
- font-weight: 600;
|
|
|
- padding: 6rpx 12rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ font-weight: 700;
|
|
|
+ padding: 8rpx 16rpx;
|
|
|
border-radius: 8rpx;
|
|
|
min-width: 100rpx;
|
|
|
text-align: center;
|
|
|
@@ -454,13 +467,17 @@ onUnmounted(() => {
|
|
|
|
|
|
.stock-action {
|
|
|
margin-left: 20rpx;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
}
|
|
|
|
|
|
.add-btn {
|
|
|
background: #5B5AEA;
|
|
|
border-radius: 40rpx;
|
|
|
- padding: 16rpx 28rpx;
|
|
|
+ padding: 16rpx 24rpx;
|
|
|
box-shadow: 0 8rpx 20rpx rgba(91, 90, 234, 0.3);
|
|
|
+ margin-bottom: 8rpx;
|
|
|
}
|
|
|
|
|
|
.add-btn-text {
|
|
|
@@ -470,6 +487,14 @@ onUnmounted(() => {
|
|
|
letter-spacing: 1rpx;
|
|
|
}
|
|
|
|
|
|
+.add-btn-tip {
|
|
|
+ font-size: 20rpx;
|
|
|
+ color: #9ca2b5;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 1.4;
|
|
|
+ max-width: 140rpx;
|
|
|
+}
|
|
|
+
|
|
|
.bottom-safe-area {
|
|
|
height: 80rpx;
|
|
|
}
|