|
|
@@ -27,15 +27,15 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <!-- 今日精选高分股 -->
|
|
|
- <view class="card stock-list-card">
|
|
|
+ <!-- 强势趋势池区域 -->
|
|
|
+ <view class="card pool-card">
|
|
|
<!-- 未购买时显示锁定状态 -->
|
|
|
<view v-if="!isPurchased" class="locked-content">
|
|
|
<view class="lock-icon-wrapper">
|
|
|
<text class="lock-icon">🔒</text>
|
|
|
</view>
|
|
|
- <text class="lock-text">权限锁定: 查看 精选高分股</text>
|
|
|
- <text class="lock-desc">精选高分股为每日实时更新,捕捉中长期趋势机会。</text>
|
|
|
+ <text class="lock-text">权限锁定: 查看 强势趋势池 </text>
|
|
|
+ <text class="lock-desc">强势池为每日实时更新,捕捉中长期趋势机会。</text>
|
|
|
<view class="unlock-button" @click="showPurchaseModal">
|
|
|
<text class="unlock-button-text">立即打赏</text>
|
|
|
</view>
|
|
|
@@ -43,7 +43,7 @@
|
|
|
|
|
|
<!-- 已购买时显示内容 -->
|
|
|
<view v-else class="unlocked-content">
|
|
|
- <text class="unlocked-tip">您已解锁,可以查看高分股内容</text>
|
|
|
+ <text class="unlocked-tip">您已解锁,可以查看强势趋势池内容</text>
|
|
|
<view class="stock-item" v-for="(stock, index) in stockList" :key="index">
|
|
|
<view class="stock-info">
|
|
|
<view class="stock-name-row">
|
|
|
@@ -56,20 +56,17 @@
|
|
|
<view class="action-btn buy-btn" @click="addToMyStocks(stock)">
|
|
|
<text class="action-icon">+</text>
|
|
|
</view>
|
|
|
- <view class="action-btn sell-btn" @click="removeFromMyStocks(stock)">
|
|
|
- <text class="action-icon">-</text>
|
|
|
- </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <!-- 历史趋势池回顾 -->
|
|
|
+ <!-- 历史股票池回顾 -->
|
|
|
<view class="card history-card">
|
|
|
<view class="history-header">
|
|
|
<text class="history-icon">📅</text>
|
|
|
- <text class="history-title">历史趋势池回顾</text>
|
|
|
+ <text class="history-title">历史股票池回顾</text>
|
|
|
</view>
|
|
|
|
|
|
<!-- 月份区间选择 -->
|
|
|
@@ -119,40 +116,26 @@
|
|
|
<!-- 购买弹窗 -->
|
|
|
<view v-if="showModal" class="modal-overlay" @click="closePurchaseModal">
|
|
|
<view class="modal-content" @click.stop>
|
|
|
- <view class="modal-header">
|
|
|
- <text class="modal-title">强势池年订阅服务</text>
|
|
|
- <text class="modal-close" @click="closePurchaseModal">×</text>
|
|
|
+ <view class="modal-close-btn" @click="closePurchaseModal">
|
|
|
+ <text class="close-icon">✕</text>
|
|
|
</view>
|
|
|
|
|
|
- <view class="subscription-options">
|
|
|
- <view
|
|
|
- class="subscription-option active"
|
|
|
- >
|
|
|
- <view class="option-info">
|
|
|
- <text class="option-title">年订阅</text>
|
|
|
- <text class="option-desc">365天连续查看</text>
|
|
|
- </view>
|
|
|
- <text class="option-price">¥98</text>
|
|
|
- </view>
|
|
|
+ <view class="reward-header">
|
|
|
+ <text class="reward-icon">📅</text>
|
|
|
+ <text class="reward-title">年订阅解锁</text>
|
|
|
</view>
|
|
|
-
|
|
|
- <!-- 支付方式选择 -->
|
|
|
- <view class="payment-method-section">
|
|
|
- <text class="payment-method-title">支付方式</text>
|
|
|
- <view class="payment-methods">
|
|
|
- <view
|
|
|
- class="payment-method-item active"
|
|
|
- >
|
|
|
- <text class="payment-icon">💳</text>
|
|
|
- <text class="payment-name">微信支付</text>
|
|
|
- <view class="payment-check">✓</view>
|
|
|
- </view>
|
|
|
+
|
|
|
+ <view class="reward-info">
|
|
|
+ <text class="reward-desc">订阅全年,解锁强势趋势池内容</text>
|
|
|
+ <view class="reward-amount-simple">
|
|
|
+ <text class="amount-label">订阅金额:</text>
|
|
|
+ <text class="amount-value">¥98</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<view class="modal-footer">
|
|
|
<view class="pay-button" @click="handlePurchase">
|
|
|
- <text class="pay-button-text">确认支付并解锁</text>
|
|
|
+ <text class="pay-button-text">确认支付</text>
|
|
|
</view>
|
|
|
<text class="agreement-text">点击即表示同意《用户订阅协议》</text>
|
|
|
</view>
|
|
|
@@ -196,6 +179,12 @@ const formatMonth = (monthStr) => {
|
|
|
|
|
|
// 检查购买状态
|
|
|
const checkPurchaseStatus = () => {
|
|
|
+ // 先检查登录状态
|
|
|
+ if (!checkLoginStatus()) {
|
|
|
+ isPurchased.value = false
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
try {
|
|
|
const purchaseInfo = uni.getStorageSync('strong_pool_purchase')
|
|
|
if (purchaseInfo) {
|
|
|
@@ -251,26 +240,13 @@ const closePurchaseModal = () => {
|
|
|
|
|
|
// 处理购买
|
|
|
const handlePurchase = () => {
|
|
|
- if (!selectedPlan.value) {
|
|
|
- uni.showToast({
|
|
|
- title: '请选择订阅方案',
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
- // 计算过期时间
|
|
|
+ // 计算过期时间 - 年订阅365天后过期
|
|
|
const now = Date.now()
|
|
|
- let expireTime = now
|
|
|
-
|
|
|
- if (selectedPlan.value === 'yearly') {
|
|
|
- // 年订阅:365天后过期
|
|
|
- expireTime = now + 365 * 24 * 60 * 60 * 1000
|
|
|
- }
|
|
|
+ const expireTime = now + 365 * 24 * 60 * 60 * 1000
|
|
|
|
|
|
// 保存购买信息
|
|
|
const purchaseInfo = {
|
|
|
- plan: selectedPlan.value,
|
|
|
+ plan: 'yearly',
|
|
|
purchaseTime: now,
|
|
|
expireTime: expireTime
|
|
|
}
|
|
|
@@ -400,41 +376,6 @@ const addToMyStocks = async (stock) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// 从我的股票中移除
|
|
|
-const removeFromMyStocks = (stock) => {
|
|
|
- try {
|
|
|
- // 获取现有的股票列表
|
|
|
- let myStocks = uni.getStorageSync('my_stocks') || []
|
|
|
-
|
|
|
- // 查找股票
|
|
|
- const index = myStocks.findIndex(item => item.code === stock.code)
|
|
|
- if (index === -1) {
|
|
|
- uni.showToast({
|
|
|
- title: '该股票不在列表中',
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
- // 移除股票
|
|
|
- myStocks.splice(index, 1)
|
|
|
-
|
|
|
- // 保存到本地存储
|
|
|
- uni.setStorageSync('my_stocks', myStocks)
|
|
|
-
|
|
|
- uni.showToast({
|
|
|
- title: '移除成功',
|
|
|
- icon: 'success'
|
|
|
- })
|
|
|
- } catch (e) {
|
|
|
- console.error('移除股票失败:', e)
|
|
|
- uni.showToast({
|
|
|
- title: '移除失败',
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
onLoad(() => {
|
|
|
// 页面加载时检查登录状态和购买状态
|
|
|
const loginStatus = checkLoginStatus()
|
|
|
@@ -541,8 +482,8 @@ onShow(() => {
|
|
|
color: #f16565;
|
|
|
}
|
|
|
|
|
|
-/* 股票列表卡片 */
|
|
|
-.stock-list-card {
|
|
|
+/* 股票池卡片 */
|
|
|
+.pool-card {
|
|
|
padding: 32rpx;
|
|
|
}
|
|
|
|
|
|
@@ -717,6 +658,7 @@ onShow(() => {
|
|
|
padding: 28rpx 0;
|
|
|
text-align: center;
|
|
|
margin-top: 12rpx;
|
|
|
+ margin-bottom: 24rpx;
|
|
|
box-shadow: 0 8rpx 20rpx rgba(93, 85, 232, 0.3);
|
|
|
}
|
|
|
|
|
|
@@ -766,32 +708,77 @@ onShow(() => {
|
|
|
width: 640rpx;
|
|
|
background: #ffffff;
|
|
|
border-radius: 24rpx;
|
|
|
- padding: 40rpx 32rpx 32rpx;
|
|
|
+ padding: 48rpx 40rpx 40rpx;
|
|
|
box-sizing: border-box;
|
|
|
+ position: relative;
|
|
|
}
|
|
|
|
|
|
-.modal-header {
|
|
|
+.modal-close-btn {
|
|
|
+ position: absolute;
|
|
|
+ top: 24rpx;
|
|
|
+ right: 24rpx;
|
|
|
+ width: 48rpx;
|
|
|
+ height: 48rpx;
|
|
|
display: flex;
|
|
|
- justify-content: space-between;
|
|
|
align-items: center;
|
|
|
- margin-bottom: 32rpx;
|
|
|
+ justify-content: center;
|
|
|
+ z-index: 10;
|
|
|
}
|
|
|
|
|
|
-.modal-title {
|
|
|
+.close-icon {
|
|
|
+ font-size: 36rpx;
|
|
|
+ color: #9ca2b5;
|
|
|
+ font-weight: 300;
|
|
|
+ line-height: 1;
|
|
|
+}
|
|
|
+
|
|
|
+.reward-header {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ margin-bottom: 40rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.reward-icon {
|
|
|
+ font-size: 64rpx;
|
|
|
+ margin-bottom: 16rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.reward-title {
|
|
|
font-size: 32rpx;
|
|
|
font-weight: 600;
|
|
|
color: #222222;
|
|
|
}
|
|
|
|
|
|
-.modal-close {
|
|
|
- font-size: 48rpx;
|
|
|
- color: #9ca2b5;
|
|
|
- line-height: 1;
|
|
|
- width: 48rpx;
|
|
|
- height: 48rpx;
|
|
|
+.reward-info {
|
|
|
+ margin-bottom: 40rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.reward-desc {
|
|
|
+ display: block;
|
|
|
+ font-size: 26rpx;
|
|
|
+ color: #666a7f;
|
|
|
+ text-align: center;
|
|
|
+ margin-bottom: 24rpx;
|
|
|
+ line-height: 1.6;
|
|
|
+}
|
|
|
+
|
|
|
+.reward-amount-simple {
|
|
|
display: flex;
|
|
|
- align-items: center;
|
|
|
justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ gap: 8rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.amount-label {
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #666a7f;
|
|
|
+}
|
|
|
+
|
|
|
+.amount-value {
|
|
|
+ font-size: 36rpx;
|
|
|
+ font-weight: 700;
|
|
|
+ color: #f16565;
|
|
|
}
|
|
|
|
|
|
.modal-footer {
|
|
|
@@ -800,6 +787,27 @@ onShow(() => {
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
+.pay-button {
|
|
|
+ width: 100%;
|
|
|
+ background: linear-gradient(135deg, #5d55e8, #7568ff);
|
|
|
+ border-radius: 16rpx;
|
|
|
+ padding: 28rpx 0;
|
|
|
+ text-align: center;
|
|
|
+ margin-bottom: 24rpx;
|
|
|
+ box-shadow: 0 8rpx 20rpx rgba(93, 85, 232, 0.3);
|
|
|
+}
|
|
|
+
|
|
|
+.pay-button-text {
|
|
|
+ font-size: 30rpx;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #ffffff;
|
|
|
+}
|
|
|
+
|
|
|
+.agreement-text {
|
|
|
+ font-size: 22rpx;
|
|
|
+ color: #9ca2b5;
|
|
|
+}
|
|
|
+
|
|
|
.bottom-safe-area {
|
|
|
height: 80rpx;
|
|
|
}
|
|
|
@@ -862,127 +870,7 @@ onShow(() => {
|
|
|
display: block;
|
|
|
}
|
|
|
|
|
|
-/* 购买弹窗样式 */
|
|
|
-.subscription-options {
|
|
|
- margin-bottom: 32rpx;
|
|
|
-}
|
|
|
-
|
|
|
-.subscription-option {
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
- padding: 32rpx 24rpx;
|
|
|
- border: 2rpx solid #e5e7eb;
|
|
|
- border-radius: 16rpx;
|
|
|
- margin-bottom: 20rpx;
|
|
|
- transition: all 0.3s;
|
|
|
-}
|
|
|
-
|
|
|
-.subscription-option.active {
|
|
|
- border-color: #5d55e8;
|
|
|
- background: #f7f8fc;
|
|
|
-}
|
|
|
-
|
|
|
-.option-info {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
-}
|
|
|
-
|
|
|
-.option-title {
|
|
|
- font-size: 28rpx;
|
|
|
- font-weight: 600;
|
|
|
- color: #222222;
|
|
|
- margin-bottom: 8rpx;
|
|
|
-}
|
|
|
-
|
|
|
-.option-desc {
|
|
|
- font-size: 24rpx;
|
|
|
- color: #9ca2b5;
|
|
|
-}
|
|
|
-
|
|
|
-.option-price {
|
|
|
- font-size: 36rpx;
|
|
|
- font-weight: 700;
|
|
|
- color: #f16565;
|
|
|
-}
|
|
|
-
|
|
|
-/* 支付方式选择 */
|
|
|
-.payment-method-section {
|
|
|
- margin-bottom: 32rpx;
|
|
|
- padding-top: 24rpx;
|
|
|
- border-top: 1rpx solid #f1f2f6;
|
|
|
-}
|
|
|
-
|
|
|
-.payment-method-title {
|
|
|
- display: block;
|
|
|
- font-size: 26rpx;
|
|
|
- font-weight: 600;
|
|
|
- color: #222222;
|
|
|
- margin-bottom: 20rpx;
|
|
|
-}
|
|
|
-
|
|
|
-.payment-methods {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- gap: 16rpx;
|
|
|
-}
|
|
|
-
|
|
|
-.payment-method-item {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- padding: 24rpx 20rpx;
|
|
|
- border: 2rpx solid #e5e7eb;
|
|
|
- border-radius: 12rpx;
|
|
|
- transition: all 0.3s;
|
|
|
- position: relative;
|
|
|
-}
|
|
|
-
|
|
|
-.payment-method-item.active {
|
|
|
- border-color: #5d55e8;
|
|
|
- background: #f7f5ff;
|
|
|
-}
|
|
|
-
|
|
|
-.payment-icon {
|
|
|
- font-size: 36rpx;
|
|
|
- margin-right: 16rpx;
|
|
|
-}
|
|
|
-
|
|
|
-.payment-name {
|
|
|
- font-size: 28rpx;
|
|
|
- font-weight: 500;
|
|
|
- color: #222222;
|
|
|
- flex: 1;
|
|
|
-}
|
|
|
-
|
|
|
-.payment-check {
|
|
|
- width: 36rpx;
|
|
|
- height: 36rpx;
|
|
|
- background: #5d55e8;
|
|
|
- border-radius: 50%;
|
|
|
- color: #ffffff;
|
|
|
- font-size: 24rpx;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
-}
|
|
|
-
|
|
|
-.pay-button {
|
|
|
- width: 100%;
|
|
|
- background: #f16565;
|
|
|
- border-radius: 16rpx;
|
|
|
- padding: 28rpx 0;
|
|
|
- text-align: center;
|
|
|
- margin-bottom: 24rpx;
|
|
|
-}
|
|
|
-
|
|
|
-.pay-button-text {
|
|
|
- font-size: 30rpx;
|
|
|
- font-weight: 600;
|
|
|
- color: #ffffff;
|
|
|
-}
|
|
|
-
|
|
|
-.agreement-text {
|
|
|
- font-size: 22rpx;
|
|
|
- color: #9ca2b5;
|
|
|
+.bottom-safe-area {
|
|
|
+ height: 80rpx;
|
|
|
}
|
|
|
</style>
|