Explorar el Código

新-页面更改

Zhangbw hace 3 meses
padre
commit
cde985e6ef

+ 0 - 1
dist/dev/mp-weixin/app.js

@@ -10,7 +10,6 @@ if (!Math) {
   "./pages/mine/mine.js";
   "./pages/profile/edit.js";
   "./pages/transaction/transaction.js";
-  "./pages/points/points.js";
 }
 const _sfc_main = {
   globalData: {

+ 2 - 3
dist/dev/mp-weixin/app.json

@@ -7,8 +7,7 @@
     "pages/rank/rank",
     "pages/mine/mine",
     "pages/profile/edit",
-    "pages/transaction/transaction",
-    "pages/points/points"
+    "pages/transaction/transaction"
   ],
   "window": {
     "navigationBarBackgroundColor": "#ffffff",
@@ -46,7 +45,7 @@
       },
       {
         "pagePath": "pages/rank/rank",
-        "text": "模拟排名",
+        "text": "我的股票",
         "iconPath": "/static/images/tab_rank.png",
         "selectedIconPath": "/static/images/tab_rank_active.png"
       },

+ 4 - 35
dist/dev/mp-weixin/pages/mine/mine.js

@@ -1,7 +1,7 @@
 "use strict";
 const common_vendor = require("../../common/vendor.js");
 const utils_auth = require("../../utils/auth.js");
-const utils_api = require("../../utils/api.js");
+require("../../utils/api.js");
 const _sfc_main = {
   __name: "mine",
   setup(__props) {
@@ -12,7 +12,6 @@ const _sfc_main = {
       avatar: "",
       phone: ""
     });
-    const points = common_vendor.ref(0);
     common_vendor.onMounted(() => {
       loadUserInfo();
     });
@@ -29,19 +28,6 @@ const _sfc_main = {
           userInfo.value = storedInfo;
           console.log("[个人中心] 加载用户信息:", userInfo.value);
         }
-        await loadUserPoints();
-      }
-    };
-    const loadUserPoints = async () => {
-      try {
-        const res = await utils_api.getUserPointsApi();
-        if (res.code === 200 && res.data) {
-          points.value = res.data.totalPoints || 0;
-          console.log("[个人中心] 用户积分:", points.value);
-        }
-      } catch (e) {
-        console.error("获取积分失败:", e);
-        points.value = 0;
       }
     };
     const handleUserCardClick = () => {
@@ -69,20 +55,6 @@ const _sfc_main = {
         }
       });
     };
-    const handleRecharge = () => {
-      if (!utils_auth.checkLogin()) {
-        return;
-      }
-      common_vendor.index.showToast({ title: "充值功能开发中", icon: "none" });
-    };
-    const handleHistory = () => {
-      if (!utils_auth.checkLogin()) {
-        return;
-      }
-      common_vendor.index.navigateTo({
-        url: "/pages/points/points"
-      });
-    };
     const handleTransactionRecord = () => {
       if (!utils_auth.checkLogin()) {
         return;
@@ -96,13 +68,10 @@ const _sfc_main = {
         a: isLoggedIn.value && userInfo.value.avatar ? userInfo.value.avatar : "/static/images/head.png",
         b: common_vendor.t(isLoggedIn.value ? userInfo.value.nickname || "微信用户" : "登录/注册"),
         c: common_vendor.o(handleUserCardClick),
-        d: common_vendor.t(isLoggedIn.value ? points.value : 0),
-        e: common_vendor.o(handleRecharge),
-        f: common_vendor.o(handleHistory),
-        g: common_vendor.o(handleTransactionRecord),
-        h: isLoggedIn.value
+        d: common_vendor.o(handleTransactionRecord),
+        e: isLoggedIn.value
       }, isLoggedIn.value ? {
-        i: common_vendor.o(handleLogout)
+        f: common_vendor.o(handleLogout)
       } : {});
     };
   }

+ 1 - 1
dist/dev/mp-weixin/pages/mine/mine.wxml

@@ -1 +1 @@
-<view class="page-mine"><scroll-view class="scroll-view" scroll-y><view class="content-wrapper"><view class="user-info-card" bindtap="{{c}}"><view class="user-header"><image class="user-avatar" src="{{a}}" mode="aspectFill"></image><view class="user-details"><text class="user-name">{{b}}</text></view><view class="arrow-icon">›</view></view></view><view class="my-tasks-section"><view class="points-row"><view class="points-display"><view class="points-icon-wrapper"><text class="points-icon">💰</text></view><view class="points-info"><text class="points-label">我的积分</text><text class="points-value">{{d}}</text></view></view><button class="recharge-button" bindtap="{{e}}"><text class="recharge-text">充值</text></button></view></view><view class="menu-list"><view class="menu-item" bindtap="{{f}}"><view class="menu-left"><text class="menu-icon">📋</text><text class="menu-label">积分记录</text></view><text class="menu-arrow">›</text></view><view class="menu-item" bindtap="{{g}}"><view class="menu-left"><text class="menu-icon">📝</text><text class="menu-label">交易记录</text></view><text class="menu-arrow">›</text></view></view><view wx:if="{{h}}" class="logout-section"><button class="logout-btn" bindtap="{{i}}"> 退出登录 </button></view><view class="bottom-safe-area"></view></view></scroll-view></view>
+<view class="page-mine"><scroll-view class="scroll-view" scroll-y><view class="content-wrapper"><view class="user-info-card" bindtap="{{c}}"><view class="user-header"><image class="user-avatar" src="{{a}}" mode="aspectFill"></image><view class="user-details"><text class="user-name">{{b}}</text></view><view class="arrow-icon">›</view></view></view><view class="menu-list"><view class="menu-item" bindtap="{{d}}"><view class="menu-left"><text class="menu-icon">📝</text><text class="menu-label">交易记录</text></view><text class="menu-arrow">›</text></view></view><view wx:if="{{e}}" class="logout-section"><button class="logout-btn" bindtap="{{f}}"> 退出登录 </button></view><view class="bottom-safe-area"></view></view></scroll-view></view>

+ 0 - 69
dist/dev/mp-weixin/pages/mine/mine.wxss

@@ -52,75 +52,6 @@
   font-weight: 300;
 }
 
-/* 积分区域 */
-.my-tasks-section {
-  background: #ffffff;
-  border-radius: 24rpx;
-  padding: 32rpx;
-  margin-bottom: 32rpx;
-  box-shadow: 0 16rpx 40rpx rgba(37, 52, 94, 0.08);
-}
-.points-row {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-}
-.points-display {
-  flex: 1;
-  display: flex;
-  align-items: center;
-}
-.points-icon-wrapper {
-  width: 80rpx;
-  height: 80rpx;
-  border-radius: 50%;
-  background: linear-gradient(135deg, #00BFA5, #00D4B5);
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  margin-right: 24rpx;
-  flex-shrink: 0;
-  box-shadow: 0 8rpx 20rpx rgba(0, 191, 165, 0.3);
-}
-.points-icon {
-  font-size: 40rpx;
-}
-.points-info {
-  display: flex;
-  flex-direction: column;
-}
-.points-label {
-  font-size: 26rpx;
-  color: #666a7f;
-  margin-bottom: 8rpx;
-}
-.points-value {
-  font-size: 40rpx;
-  font-weight: 700;
-  color: #00BFA5;
-}
-.recharge-button {
-  width: 160rpx;
-  height: 72rpx;
-  background: linear-gradient(135deg, #5d55e8, #7568ff);
-  border-radius: 36rpx;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  box-shadow: 0 8rpx 20rpx rgba(93, 85, 232, 0.3);
-  border: none;
-  padding: 0;
-  line-height: 1;
-}
-.recharge-button::after {
-  border: none;
-}
-.recharge-text {
-  font-size: 28rpx;
-  font-weight: 600;
-  color: #ffffff;
-}
-
 /* 菜单列表 */
 .menu-list {
   background: #ffffff;

+ 0 - 117
dist/dev/mp-weixin/pages/points/points.js

@@ -1,117 +0,0 @@
-"use strict";
-const common_vendor = require("../../common/vendor.js");
-const utils_api = require("../../utils/api.js");
-const utils_auth = require("../../utils/auth.js");
-const _sfc_main = {
-  __name: "points",
-  setup(__props) {
-    const records = common_vendor.ref([]);
-    const loading = common_vendor.ref(false);
-    const handleBack = () => {
-      const pages = getCurrentPages();
-      if (pages.length > 1) {
-        common_vendor.index.navigateBack();
-      } else {
-        common_vendor.index.switchTab({
-          url: "/pages/mine/mine"
-        });
-      }
-    };
-    const groupedRecords = common_vendor.computed(() => {
-      const groups = {};
-      records.value.forEach((item) => {
-        const dateKey = formatDate(item.createTime);
-        if (!groups[dateKey]) {
-          groups[dateKey] = [];
-        }
-        groups[dateKey].push(item);
-      });
-      return groups;
-    });
-    const formatDate = (timestamp) => {
-      const date = new Date(timestamp);
-      const today = /* @__PURE__ */ new Date();
-      const yesterday = new Date(today);
-      yesterday.setDate(yesterday.getDate() - 1);
-      const dateStr = date.toLocaleDateString("zh-CN", {
-        year: "numeric",
-        month: "2-digit",
-        day: "2-digit"
-      });
-      const todayStr = today.toLocaleDateString("zh-CN", {
-        year: "numeric",
-        month: "2-digit",
-        day: "2-digit"
-      });
-      const yesterdayStr = yesterday.toLocaleDateString("zh-CN", {
-        year: "numeric",
-        month: "2-digit",
-        day: "2-digit"
-      });
-      if (dateStr === todayStr) {
-        return "今天";
-      } else if (dateStr === yesterdayStr) {
-        return "昨天";
-      } else {
-        return dateStr;
-      }
-    };
-    const formatTime = (timestamp) => {
-      const date = new Date(timestamp);
-      const hours = String(date.getHours()).padStart(2, "0");
-      const minutes = String(date.getMinutes()).padStart(2, "0");
-      return `${hours}:${minutes}`;
-    };
-    const getTitle = (item) => {
-      return item.bizTypeName || item.remark || "积分变动";
-    };
-    const loadRecords = async () => {
-      if (!utils_auth.isLoggedIn()) {
-        console.log("未登录,无法获取积分记录");
-        return;
-      }
-      loading.value = true;
-      try {
-        const res = await utils_api.getPointsRecordsApi();
-        if (res.code === 200 && res.data) {
-          records.value = res.data;
-          console.log("[积分记录] 加载成功,共", records.value.length, "条");
-        }
-      } catch (e) {
-        console.error("加载积分记录失败:", e);
-        records.value = [];
-      } finally {
-        loading.value = false;
-      }
-    };
-    common_vendor.onMounted(() => {
-      loadRecords();
-    });
-    return (_ctx, _cache) => {
-      return common_vendor.e({
-        a: common_vendor.o(handleBack),
-        b: common_vendor.f(common_vendor.unref(groupedRecords), (group, dateKey, i0) => {
-          return {
-            a: common_vendor.t(dateKey),
-            b: common_vendor.f(group, (item, index, i1) => {
-              return {
-                a: common_vendor.t(getTitle(item)),
-                b: common_vendor.t(formatTime(item.createTime)),
-                c: common_vendor.t(item.type === 1 ? "+" : "-"),
-                d: common_vendor.t(item.amount),
-                e: common_vendor.n(item.type === 1 ? "amount-sell" : "amount-buy"),
-                f: common_vendor.t(item.type === 1 ? "获得" : "消耗"),
-                g: common_vendor.n(item.type === 1 ? "status-sell" : "status-buy"),
-                h: index
-              };
-            }),
-            c: dateKey
-          };
-        }),
-        c: records.value.length === 0
-      }, records.value.length === 0 ? {} : {});
-    };
-  }
-};
-const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-9b5c2d6e"], ["__file", "D:/program/gupiao-wx/src/pages/points/points.vue"]]);
-wx.createPage(MiniProgramPage);

+ 0 - 4
dist/dev/mp-weixin/pages/points/points.json

@@ -1,4 +0,0 @@
-{
-  "navigationStyle": "custom",
-  "usingComponents": {}
-}

+ 0 - 1
dist/dev/mp-weixin/pages/points/points.wxml

@@ -1 +0,0 @@
-<view class="page-container data-v-9b5c2d6e"><view class="custom-navbar data-v-9b5c2d6e"><view class="navbar-back data-v-9b5c2d6e" bindtap="{{a}}"><text class="back-icon data-v-9b5c2d6e">←</text></view><view class="navbar-title data-v-9b5c2d6e"><text class="title-text data-v-9b5c2d6e">积分记录</text></view><view class="navbar-placeholder data-v-9b5c2d6e"></view></view><scroll-view class="scroll-view data-v-9b5c2d6e" scroll-y><view class="transaction-list data-v-9b5c2d6e"><view wx:for="{{b}}" wx:for-item="group" wx:key="c" class="date-group data-v-9b5c2d6e"><view class="date-header data-v-9b5c2d6e"><text class="date-text data-v-9b5c2d6e">{{group.a}}</text></view><view wx:for="{{group.b}}" wx:for-item="item" wx:key="h" class="transaction-item data-v-9b5c2d6e"><view class="item-left data-v-9b5c2d6e"><view class="stock-info data-v-9b5c2d6e"><text class="stock-name data-v-9b5c2d6e">{{item.a}}</text></view><text class="transaction-time data-v-9b5c2d6e">{{item.b}}</text></view><view class="item-right data-v-9b5c2d6e"><text class="{{['data-v-9b5c2d6e', 'amount-text', item.e]}}">{{item.c}}{{item.d}}积分 </text><view class="{{['data-v-9b5c2d6e', 'status-badge', item.g]}}"><text class="status-text data-v-9b5c2d6e">{{item.f}}</text></view></view></view></view><view wx:if="{{c}}" class="empty-state data-v-9b5c2d6e"><text class="empty-icon data-v-9b5c2d6e">💰</text><text class="empty-text data-v-9b5c2d6e">暂无积分记录</text><text class="empty-desc data-v-9b5c2d6e">完成任务即可获得积分</text></view><view class="bottom-safe-area data-v-9b5c2d6e"></view></view></scroll-view></view>

+ 0 - 168
dist/dev/mp-weixin/pages/points/points.wxss

@@ -1,168 +0,0 @@
-
-.page-container.data-v-9b5c2d6e {
-  min-height: 100vh;
-  background: #f5f6fb;
-  display: flex;
-  flex-direction: column;
-}
-
-/* 自定义导航栏 */
-.custom-navbar.data-v-9b5c2d6e {
-  background: #ffffff;
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  padding: 80rpx 32rpx 30rpx;
-  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
-  position: relative;
-}
-.navbar-back.data-v-9b5c2d6e {
-  width: 80rpx;
-  height: 60rpx;
-  display: flex;
-  align-items: center;
-  justify-content: flex-start;
-}
-.back-icon.data-v-9b5c2d6e {
-  font-size: 40rpx;
-  color: #222222;
-  font-weight: bold;
-}
-.navbar-title.data-v-9b5c2d6e {
-  position: absolute;
-  left: 50%;
-  transform: translateX(-50%);
-}
-.title-text.data-v-9b5c2d6e {
-  font-size: 36rpx;
-  font-weight: 800;
-  color: #3F51F7;
-  letter-spacing: 2rpx;
-}
-.navbar-placeholder.data-v-9b5c2d6e {
-  width: 80rpx;
-}
-
-/* 交易记录列表 */
-.scroll-view.data-v-9b5c2d6e {
-  flex: 1;
-  height: 0;
-}
-.transaction-list.data-v-9b5c2d6e {
-  padding: 0 0 32rpx;
-}
-
-/* 日期分组 */
-.date-group.data-v-9b5c2d6e {
-  margin-bottom: 32rpx;
-}
-.date-header.data-v-9b5c2d6e {
-  padding: 24rpx 32rpx 16rpx;
-}
-.date-text.data-v-9b5c2d6e {
-  font-size: 26rpx;
-  color: #9ca2b5;
-  font-weight: 500;
-}
-
-/* 交易项 */
-.transaction-item.data-v-9b5c2d6e {
-  background: #ffffff;
-  padding: 32rpx;
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  border-bottom: 1rpx solid #f5f6fb;
-}
-.transaction-item.data-v-9b5c2d6e:first-child {
-  border-top-left-radius: 0;
-  border-top-right-radius: 0;
-}
-.transaction-item.data-v-9b5c2d6e:last-child {
-  border-bottom: none;
-}
-.item-left.data-v-9b5c2d6e {
-  flex: 1;
-  display: flex;
-  flex-direction: column;
-}
-.stock-info.data-v-9b5c2d6e {
-  display: flex;
-  align-items: center;
-  margin-bottom: 8rpx;
-}
-.stock-name.data-v-9b5c2d6e {
-  font-size: 30rpx;
-  font-weight: 600;
-  color: #222222;
-  margin-right: 12rpx;
-}
-.transaction-time.data-v-9b5c2d6e {
-  font-size: 24rpx;
-  color: #9ca2b5;
-}
-.item-right.data-v-9b5c2d6e {
-  display: flex;
-  flex-direction: column;
-  align-items: flex-end;
-}
-.amount-text.data-v-9b5c2d6e {
-  font-size: 32rpx;
-  font-weight: 700;
-  margin-bottom: 8rpx;
-}
-.amount-buy.data-v-9b5c2d6e {
-  color: #3abf81;
-}
-.amount-sell.data-v-9b5c2d6e {
-  color: #f16565;
-}
-.status-badge.data-v-9b5c2d6e {
-  padding: 4rpx 16rpx;
-  border-radius: 12rpx;
-}
-.status-buy.data-v-9b5c2d6e {
-  background: #e7f7ef;
-}
-.status-sell.data-v-9b5c2d6e {
-  background: #ffe7ee;
-}
-.status-text.data-v-9b5c2d6e {
-  font-size: 22rpx;
-  font-weight: 500;
-}
-.status-buy .status-text.data-v-9b5c2d6e {
-  color: #3abf81;
-}
-.status-sell .status-text.data-v-9b5c2d6e {
-  color: #f16565;
-}
-
-/* 空状态 */
-.empty-state.data-v-9b5c2d6e {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  padding: 120rpx 0;
-  background: #ffffff;
-  margin: 0 32rpx;
-  border-radius: 24rpx;
-}
-.empty-icon.data-v-9b5c2d6e {
-  font-size: 120rpx;
-  margin-bottom: 32rpx;
-  opacity: 0.5;
-}
-.empty-text.data-v-9b5c2d6e {
-  font-size: 32rpx;
-  color: #666666;
-  margin-bottom: 16rpx;
-  font-weight: 500;
-}
-.empty-desc.data-v-9b5c2d6e {
-  font-size: 26rpx;
-  color: #9ca2b5;
-}
-.bottom-safe-area.data-v-9b5c2d6e {
-  height: 40rpx;
-}

+ 7 - 47
dist/dev/mp-weixin/pages/pool/pool.js

@@ -11,22 +11,11 @@ const _sfc_main = {
     const selectedPlan = common_vendor.ref("daily");
     const selectedDate = common_vendor.ref("2025年11月20日");
     const isLoggedIn = common_vendor.ref(false);
-    const paymentMethod = common_vendor.ref("wechat");
-    const userPoints = common_vendor.ref(0);
     const checkLogin = () => {
       isLoggedIn.value = utils_auth.isLoggedIn();
       console.log("[超短池] 登录状态:", isLoggedIn.value);
       return isLoggedIn.value;
     };
-    const getUserPoints = () => {
-      try {
-        const points = common_vendor.index.getStorageSync("user_points") || 0;
-        userPoints.value = points;
-      } catch (e) {
-        console.error("获取积分失败:", e);
-        userPoints.value = 0;
-      }
-    };
     const checkPurchaseStatus = () => {
       try {
         const purchaseInfo = common_vendor.index.getStorageSync("pool_purchase");
@@ -67,7 +56,6 @@ const _sfc_main = {
         return;
       }
       console.log("已登录,显示购买弹窗");
-      getUserPoints();
       showModal.value = true;
     };
     const closePurchaseModal = () => {
@@ -81,19 +69,6 @@ const _sfc_main = {
         });
         return;
       }
-      if (paymentMethod.value === "points") {
-        const requiredPoints = selectedPlan.value === "daily" ? 180 : 980;
-        if (userPoints.value < requiredPoints) {
-          common_vendor.index.showToast({
-            title: "积分不足,请充值或选择微信支付",
-            icon: "none"
-          });
-          return;
-        }
-        const newPoints = userPoints.value - requiredPoints;
-        common_vendor.index.setStorageSync("user_points", newPoints);
-        userPoints.value = newPoints;
-      }
       const now = Date.now();
       let expireTime = now;
       if (selectedPlan.value === "daily") {
@@ -106,14 +81,13 @@ const _sfc_main = {
       const purchaseInfo = {
         plan: selectedPlan.value,
         purchaseTime: now,
-        expireTime,
-        paymentMethod: paymentMethod.value
+        expireTime
       };
       common_vendor.index.setStorageSync("pool_purchase", purchaseInfo);
       isPurchased.value = true;
       closePurchaseModal();
       common_vendor.index.showToast({
-        title: paymentMethod.value === "points" ? "积分支付成功" : "解锁成功",
+        title: "解锁成功",
         icon: "success"
       });
     };
@@ -126,12 +100,10 @@ const _sfc_main = {
     common_vendor.onLoad(() => {
       checkLogin();
       checkPurchaseStatus();
-      getUserPoints();
     });
     common_vendor.onShow(() => {
       checkLogin();
       checkPurchaseStatus();
-      getUserPoints();
       common_vendor.index.setNavigationBarTitle({ title: "量化交易大师" });
     });
     return (_ctx, _cache) => {
@@ -151,29 +123,17 @@ const _sfc_main = {
         i: common_vendor.o((...args) => _ctx.closePhoneAuth && _ctx.closePhoneAuth(...args))
       } : {}, {
         j: showModal.value
-      }, showModal.value ? common_vendor.e({
+      }, showModal.value ? {
         k: common_vendor.o(closePurchaseModal),
         l: selectedPlan.value === "daily" ? 1 : "",
         m: common_vendor.o(($event) => selectedPlan.value = "daily"),
         n: selectedPlan.value === "weekly" ? 1 : "",
         o: common_vendor.o(($event) => selectedPlan.value = "weekly"),
-        p: paymentMethod.value === "wechat"
-      }, paymentMethod.value === "wechat" ? {} : {}, {
-        q: paymentMethod.value === "wechat" ? 1 : "",
-        r: common_vendor.o(($event) => paymentMethod.value = "wechat"),
-        s: common_vendor.t(userPoints.value),
-        t: common_vendor.t(selectedPlan.value === "daily" ? 180 : 980),
-        v: paymentMethod.value === "points"
-      }, paymentMethod.value === "points" ? {} : {}, {
-        w: paymentMethod.value === "points" ? 1 : "",
-        x: common_vendor.o(($event) => paymentMethod.value = "points"),
-        y: common_vendor.t(paymentMethod.value === "points" ? "确认积分支付" : "确认支付并解锁"),
-        z: paymentMethod.value === "points" ? 1 : "",
-        A: common_vendor.o(handlePurchase),
-        B: common_vendor.o(() => {
+        p: common_vendor.o(handlePurchase),
+        q: common_vendor.o(() => {
         }),
-        C: common_vendor.o(closePurchaseModal)
-      }) : {});
+        r: common_vendor.o(closePurchaseModal)
+      } : {});
     };
   }
 };

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
dist/dev/mp-weixin/pages/pool/pool.wxml


+ 24 - 24
dist/dev/mp-weixin/pages/pool/pool.wxss

@@ -22,6 +22,29 @@
   margin-bottom: 32rpx;
 }
 
+/* 超短精选池标题区域 */
+.pool-header-section {
+  margin-bottom: 24rpx;
+}
+.pool-header {
+  display: flex;
+  align-items: center;
+  margin-bottom: 12rpx;
+}
+.pool-icon {
+  font-size: 32rpx;
+  margin-right: 12rpx;
+}
+.pool-title {
+  font-size: 32rpx;
+  font-weight: 600;
+  color: #222222;
+}
+.pool-desc {
+  font-size: 26rpx;
+  color: #666a7f;
+}
+
 /* 性能指标卡片 */
 .performance-card {
   display: flex;
@@ -54,26 +77,7 @@
 
 /* 超短精选池卡片 */
 .pool-card {
-  padding: 40rpx 32rpx;
-}
-.pool-header {
-  display: flex;
-  align-items: center;
-  margin-bottom: 16rpx;
-}
-.pool-icon {
-  font-size: 32rpx;
-  margin-right: 12rpx;
-}
-.pool-title {
-  font-size: 32rpx;
-  font-weight: 600;
-  color: #222222;
-}
-.pool-desc {
-  font-size: 26rpx;
-  color: #666a7f;
-  margin-bottom: 32rpx;
+  padding: 32rpx;
 }
 
 /* 锁定内容 */
@@ -158,7 +162,6 @@
 .history-search-row {
   display: flex;
   align-items: center;
-  margin-bottom: 16rpx;
 }
 .history-date-input {
   flex: 1;
@@ -365,9 +368,6 @@
   align-items: center;
   justify-content: center;
 }
-.pay-button.points-pay {
-  background: linear-gradient(135deg, #ff9500, #ffb347);
-}
 .bottom-safe-area {
   height: 80rpx;
 }

+ 1 - 100
dist/dev/mp-weixin/pages/rank/rank.js

@@ -1,112 +1,13 @@
 "use strict";
 const common_vendor = require("../../common/vendor.js");
-const utils_api = require("../../utils/api.js");
-const utils_auth = require("../../utils/auth.js");
 const _sfc_main = {
   __name: "rank",
   setup(__props) {
-    const isLoggedIn = common_vendor.ref(false);
-    const portfolio = common_vendor.ref({
-      balance: 1e5,
-      profit: 0,
-      profitRate: 0
-    });
-    const myRank = common_vendor.ref({
-      rank: 5,
-      rate: 0
-    });
-    const mockLeaderboard = [
-      { rank: 1, name: "量化王者 ***", rate: 35.2 },
-      { rank: 2, name: "短线猎手 ***", rate: 28.9 },
-      { rank: 3, name: "趋势追踪者 ***", rate: 22.1 },
-      { rank: 4, name: "稳健投资 ***", rate: 18.5 },
-      { rank: 5, name: "价值发现 ***", rate: 15.3 }
-    ];
-    const leaderboard = common_vendor.ref(mockLeaderboard);
-    const formatAmount = (amount) => {
-      return amount.toLocaleString("zh-CN");
-    };
-    const formatProfit = (profit) => {
-      return Math.abs(profit).toLocaleString("zh-CN");
-    };
-    const formatRate = (rate) => {
-      return rate.toFixed(2);
-    };
-    const getRankClass = (rank) => {
-      if (rank === 1)
-        return "rank-first";
-      if (rank === 2)
-        return "rank-second";
-      if (rank === 3)
-        return "rank-third";
-      return "";
-    };
-    const checkLoginAndLoadData = () => {
-      isLoggedIn.value = utils_auth.isLoggedIn();
-      console.log("[模拟排名] 登录状态:", isLoggedIn.value);
-      if (isLoggedIn.value) {
-        loadRealData();
-      } else {
-        leaderboard.value = mockLeaderboard;
-      }
-    };
-    const goToLogin = () => {
-      common_vendor.index.navigateTo({
-        url: "/pages/login/login"
-      });
-    };
-    const loadRealData = async () => {
-      try {
-        const portfolioRes = await utils_api.getUserPortfolio();
-        if (portfolioRes.code === 0 && portfolioRes.data) {
-          portfolio.value = portfolioRes.data;
-        }
-      } catch (err) {
-        console.error("获取资产数据失败:", err);
-      }
-      try {
-        const leaderboardRes = await utils_api.getLeaderboard();
-        if (leaderboardRes.code === 0 && leaderboardRes.data) {
-          leaderboard.value = leaderboardRes.data.list || [];
-          myRank.value = leaderboardRes.data.myRank || { rank: 5, rate: 0 };
-        }
-      } catch (err) {
-        console.error("获取排行榜数据失败:", err);
-      }
-    };
-    common_vendor.onMounted(() => {
-      checkLoginAndLoadData();
-    });
     common_vendor.onShow(() => {
-      checkLoginAndLoadData();
       common_vendor.index.setNavigationBarTitle({ title: "量化交易大师" });
     });
     return (_ctx, _cache) => {
-      return common_vendor.e({
-        a: common_vendor.t(formatAmount(portfolio.value.balance)),
-        b: common_vendor.t(formatProfit(portfolio.value.profit)),
-        c: common_vendor.t(formatRate(portfolio.value.profitRate)),
-        d: common_vendor.n(portfolio.value.profitRate >= 0 ? "profit-positive" : "profit-negative"),
-        e: common_vendor.t(myRank.value.rank),
-        f: common_vendor.t(myRank.value.rate >= 0 ? "+" : ""),
-        g: common_vendor.t(myRank.value.rate),
-        h: common_vendor.n(myRank.value.rate >= 0 ? "rate-positive" : "rate-negative"),
-        i: common_vendor.f(leaderboard.value, (item, index, i0) => {
-          return {
-            a: common_vendor.t(item.rank),
-            b: common_vendor.n(getRankClass(item.rank)),
-            c: common_vendor.t(item.name),
-            d: common_vendor.t(item.rate >= 0 ? "+" : ""),
-            e: common_vendor.t(item.rate),
-            f: common_vendor.n(item.rate >= 0 ? "rate-positive" : "rate-negative"),
-            g: index
-          };
-        }),
-        j: !isLoggedIn.value ? 1 : "",
-        k: !isLoggedIn.value
-      }, !isLoggedIn.value ? {
-        l: common_vendor.o(goToLogin)
-      } : {});
+      return {};
     };
   }
 };

+ 1 - 1
dist/dev/mp-weixin/pages/rank/rank.wxml

@@ -1 +1 @@
-<view class="page-rank"><scroll-view class="scroll-view" scroll-y><view class="{{['content-wrapper', j && 'blur-content']}}"><view class="portfolio-card"><view class="portfolio-header"><view class="portfolio-icon">💼</view><text class="portfolio-title">我的模拟资产</text></view><view class="portfolio-content"><view class="portfolio-main"><view class="portfolio-label">当前账户余额 (¥)</view><view class="portfolio-amount">{{a}}</view></view><view class="portfolio-profit"><view class="profit-label">总盈亏 / 收益率</view><view class="{{['profit-value', d]}}"> ¥ {{b}} ({{c}}%) </view></view></view></view><view class="leaderboard-section"><view class="section-header"><view class="trophy-icon">🏆</view><text class="section-title">模拟交易排行榜</text></view><view class="my-rank-card"><view class="rank-number">#{{e}}</view><view class="rank-info"><text class="rank-name">您 (本期收益)</text></view><view class="{{['rank-rate', h]}}">{{f}}{{g}}% </view></view><view class="leaderboard-list"><view wx:for="{{i}}" wx:for-item="item" wx:key="g" class="leaderboard-item"><view class="{{['rank-badge', item.b]}}"> #{{item.a}}</view><view class="user-info"><text class="user-name">{{item.c}}</text></view><view class="{{['user-rate', item.f]}}">{{item.d}}{{item.e}}% </view></view></view><view class="leaderboard-note"><text class="note-text">排名每日更新,收益基于系统信号的模拟交易。</text></view></view><view class="bottom-safe-area"></view></view></scroll-view><view wx:if="{{k}}" class="login-mask"><view class="login-prompt"><view class="lock-icon">🔒</view><text class="prompt-title">登录后查看完整数据</text><text class="prompt-desc">使用微信授权快速登录</text><button class="login-button-native" bindtap="{{l}}"><text>登录</text></button></view></view></view>
+<view class="page-rank"><view class="empty-content"><view class="empty-icon">🚧</view><text class="empty-text">功能开发中</text><text class="empty-desc">敬请期待</text></view></view>

+ 12 - 240
dist/dev/mp-weixin/pages/rank/rank.wxss

@@ -2,256 +2,28 @@
 .page-rank {
   display: flex;
   flex-direction: column;
+  align-items: center;
+  justify-content: center;
   background: #f5f6fb;
   height: 100vh;
 }
-.scroll-view {
-  flex: 1;
-  height: 0;
-}
-.content-wrapper {
-  padding: 32rpx;
-}
-
-/* 模拟资产卡片 */
-.portfolio-card {
-  background: linear-gradient(135deg, #5d55e8, #7568ff);
-  border-radius: 24rpx;
-  padding: 40rpx 32rpx;
-  margin-bottom: 32rpx;
-  box-shadow: 0 16rpx 40rpx rgba(93, 85, 232, 0.3);
-}
-.portfolio-header {
-  display: flex;
-  align-items: center;
-  margin-bottom: 32rpx;
-}
-.portfolio-icon {
-  font-size: 40rpx;
-  margin-right: 16rpx;
-}
-.portfolio-title {
-  font-size: 32rpx;
-  font-weight: 600;
-  color: #ffffff;
-}
-.portfolio-content {
-  display: flex;
-  justify-content: space-between;
-  align-items: flex-end;
-}
-.portfolio-main {
-  flex: 1;
-}
-.portfolio-label {
-  font-size: 24rpx;
-  color: rgba(255, 255, 255, 0.8);
-  margin-bottom: 12rpx;
-}
-.portfolio-amount {
-  font-size: 56rpx;
-  font-weight: 700;
-  color: #ffffff;
-  line-height: 1.2;
-}
-.portfolio-profit {
-  text-align: right;
-}
-.profit-label {
-  font-size: 22rpx;
-  color: rgba(255, 255, 255, 0.7);
-  margin-bottom: 8rpx;
-}
-.profit-value {
-  font-size: 28rpx;
-  font-weight: 600;
-}
-.profit-positive {
-  color: #4fffb0;
-}
-.profit-negative {
-  color: #ff6b9d;
-}
-
-/* 排行榜区域 */
-.leaderboard-section {
-  background: #ffffff;
-  border-radius: 24rpx;
-  padding: 32rpx;
-  box-shadow: 0 16rpx 40rpx rgba(37, 52, 94, 0.08);
-}
-.section-header {
+.empty-content {
   display: flex;
+  flex-direction: column;
   align-items: center;
-  margin-bottom: 24rpx;
+  padding: 100rpx 60rpx;
 }
-.trophy-icon {
-  font-size: 36rpx;
-  margin-right: 12rpx;
+.empty-icon {
+  font-size: 120rpx;
+  margin-bottom: 40rpx;
 }
-.section-title {
+.empty-text {
   font-size: 32rpx;
   font-weight: 600;
-  color: #222222;
-}
-
-/* 当前用户排名卡片 */
-.my-rank-card {
-  background: linear-gradient(135deg, #fff9e6, #fffbf0);
-  border: 2rpx solid #ffd966;
-  border-radius: 16rpx;
-  padding: 24rpx 28rpx;
-  display: flex;
-  align-items: center;
-  margin-bottom: 24rpx;
-}
-.rank-number {
-  font-size: 40rpx;
-  font-weight: 700;
-  color: #ff9800;
-  margin-right: 24rpx;
-  min-width: 80rpx;
-}
-.rank-info {
-  flex: 1;
-}
-.rank-name {
-  font-size: 28rpx;
-  color: #333333;
-  font-weight: 500;
-}
-.rank-rate {
-  font-size: 32rpx;
-  font-weight: 700;
-}
-.rate-positive {
-  color: #00c853;
-}
-.rate-negative {
-  color: #ff5252;
-}
-
-/* 排行榜列表 */
-.leaderboard-list {
-  margin-bottom: 24rpx;
-}
-.leaderboard-item {
-  display: flex;
-  align-items: center;
-  padding: 24rpx 0;
-  border-bottom: 1rpx solid #f5f6fb;
-}
-.leaderboard-item:last-child {
-  border-bottom: none;
-}
-.rank-badge {
-  font-size: 32rpx;
-  font-weight: 700;
-  color: #666666;
-  margin-right: 24rpx;
-  min-width: 80rpx;
-}
-.rank-first {
-  color: #ff5252;
-}
-.rank-second {
-  color: #ff9800;
-}
-.rank-third {
-  color: #ffc107;
-}
-.user-info {
-  flex: 1;
-}
-.user-name {
-  font-size: 28rpx;
   color: #333333;
+  margin-bottom: 16rpx;
 }
-.user-rate {
-  font-size: 32rpx;
-  font-weight: 700;
-}
-.leaderboard-note {
-  padding-top: 16rpx;
-  border-top: 1rpx solid #f5f6fb;
-}
-.note-text {
-  font-size: 22rpx;
+.empty-desc {
+  font-size: 26rpx;
   color: #999999;
-  line-height: 1.6;
-}
-.bottom-safe-area {
-  height: 80rpx;
-}
-
-/* 模糊效果 */
-.blur-content {
-  filter: blur(8rpx);
-  pointer-events: none;
-}
-
-/* 登录遮罩层 */
-.login-mask {
-  position: fixed;
-  top: 0;
-  left: 0;
-  right: 0;
-  bottom: 0;
-  background: rgba(0, 0, 0, 0.4);
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  z-index: 999;
-}
-.login-prompt {
-  width: 560rpx;
-  max-width: 560rpx;
-  background: #ffffff;
-  border-radius: 24rpx;
-  padding: 50rpx 40rpx;
-  margin: 0 auto;
-  text-align: center;
-  box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.3);
-  box-sizing: border-box;
-}
-.lock-icon {
-  font-size: 72rpx;
-  margin-bottom: 20rpx;
-}
-.prompt-title {
-  display: block;
-  font-size: 32rpx;
-  font-weight: 600;
-  color: #222222;
-  margin-bottom: 12rpx;
-}
-.prompt-desc {
-  display: block;
-  font-size: 24rpx;
-  color: #999999;
-  line-height: 1.5;
-  margin-bottom: 32rpx;
-}
-.login-button-native {
-  width: 100%;
-  height: 80rpx;
-  background: linear-gradient(135deg, #4CAF50, #66BB6A);
-  color: #ffffff;
-  border-radius: 40rpx;
-  font-size: 30rpx;
-  font-weight: 600;
-  box-shadow: 0 8rpx 24rpx rgba(76, 175, 80, 0.4);
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  border: none;
-  padding: 0;
-  line-height: 80rpx;
-}
-.login-button-native::after {
-  border: none;
-}
-.button-icon {
-  font-size: 32rpx;
-  margin-right: 12rpx;
 }

+ 77 - 156
dist/dev/mp-weixin/pages/strong/strong.js

@@ -5,7 +5,10 @@ require("../../utils/api.js");
 const _sfc_main = {
   __name: "strong",
   setup(__props) {
-    const isLoggedIn = common_vendor.ref(false);
+    common_vendor.ref(false);
+    const isPurchased = common_vendor.ref(false);
+    const showModal = common_vendor.ref(false);
+    const selectedPlan = common_vendor.ref("monthly");
     const stockList = common_vendor.ref([
       {
         name: "美的集团",
@@ -21,131 +24,74 @@ const _sfc_main = {
       }
     ]);
     const selectedDate = common_vendor.ref("2025年11月20日");
-    const showBuyModalFlag = common_vendor.ref(false);
-    const showSellModalFlag = common_vendor.ref(false);
-    const currentStock = common_vendor.ref({});
-    const buyQuantity = common_vendor.ref("100");
-    const sellQuantity = common_vendor.ref("100");
-    const checkLogin = () => {
-      isLoggedIn.value = utils_auth.isLoggedIn();
-      console.log("[强势池] 登录状态:", isLoggedIn.value);
-    };
-    const goToLogin = () => {
-      common_vendor.index.navigateTo({
-        url: "/pages/login/login"
-      });
-    };
-    const buyTotalAmount = common_vendor.computed(() => {
-      const qty = parseInt(buyQuantity.value) || 0;
-      const price = parseFloat(currentStock.value.price) || 0;
-      return qty * price;
-    });
-    const sellTotalAmount = common_vendor.computed(() => {
-      const qty = parseInt(sellQuantity.value) || 0;
-      const price = parseFloat(currentStock.value.price) || 0;
-      return qty * price;
-    });
-    const showBuyModal = (stock) => {
-      console.log("点击买入按钮");
-      currentStock.value = { ...stock };
-      buyQuantity.value = "100";
-      showBuyModalFlag.value = true;
-    };
-    const closeBuyModal = () => {
-      showBuyModalFlag.value = false;
-    };
-    const showSellModal = (stock) => {
-      console.log("点击卖出按钮");
-      currentStock.value = { ...stock };
-      sellQuantity.value = "100";
-      showSellModalFlag.value = true;
-    };
-    const closeSellModal = () => {
-      showSellModalFlag.value = false;
-    };
-    const onBuyQuantityChange = (e) => {
-      const value = e.detail.value;
-      if (value && parseInt(value) % 100 !== 0) {
-        common_vendor.index.showToast({
-          title: "股数必须是100的倍数",
-          icon: "none"
-        });
+    const checkPurchaseStatus = () => {
+      try {
+        const purchaseInfo = common_vendor.index.getStorageSync("strong_pool_purchase");
+        if (purchaseInfo) {
+          const now = Date.now();
+          const expireTime = purchaseInfo.expireTime;
+          if (now < expireTime) {
+            isPurchased.value = true;
+          } else {
+            common_vendor.index.removeStorageSync("strong_pool_purchase");
+            isPurchased.value = false;
+          }
+        } else {
+          isPurchased.value = false;
+        }
+      } catch (e) {
+        console.error("检查购买状态失败:", e);
+        isPurchased.value = false;
       }
     };
-    const onSellQuantityChange = (e) => {
-      const value = e.detail.value;
-      if (value && parseInt(value) % 100 !== 0) {
-        common_vendor.index.showToast({
-          title: "股数必须是100的倍数",
-          icon: "none"
-        });
-      }
-    };
-    const handleBuy = () => {
-      const qty = parseInt(buyQuantity.value);
-      if (!qty || qty <= 0) {
-        common_vendor.index.showToast({
-          title: "请输入有效的股数",
-          icon: "none"
+    const showPurchaseModal = () => {
+      console.log("点击立即解锁");
+      if (!utils_auth.isLoggedIn()) {
+        console.log("未登录,跳转到登录页");
+        common_vendor.index.showModal({
+          title: "登录提示",
+          content: "此功能需要登录后使用,是否前往登录?",
+          confirmText: "去登录",
+          cancelText: "取消",
+          success: (res) => {
+            if (res.confirm) {
+              common_vendor.index.navigateTo({
+                url: "/pages/login/login"
+              });
+            }
+          }
         });
         return;
       }
-      if (qty % 100 !== 0) {
-        common_vendor.index.showToast({
-          title: "股数必须是100的倍数",
-          icon: "none"
-        });
-        return;
-      }
-      const transaction = {
-        type: "buy",
-        stockName: currentStock.value.name,
-        stockCode: currentStock.value.code,
-        price: parseFloat(currentStock.value.price),
-        quantity: qty,
-        totalAmount: buyTotalAmount.value,
-        timestamp: Date.now()
-      };
-      const transactions = common_vendor.index.getStorageSync("simulated_transactions") || [];
-      transactions.push(transaction);
-      common_vendor.index.setStorageSync("simulated_transactions", transactions);
-      closeBuyModal();
-      common_vendor.index.showToast({
-        title: "买入成功",
-        icon: "success"
-      });
+      console.log("已登录,显示购买弹窗");
+      showModal.value = true;
+    };
+    const closePurchaseModal = () => {
+      showModal.value = false;
     };
-    const handleSell = () => {
-      const qty = parseInt(sellQuantity.value);
-      if (!qty || qty <= 0) {
+    const handlePurchase = () => {
+      if (!selectedPlan.value) {
         common_vendor.index.showToast({
-          title: "请输入有效的股数",
+          title: "请选择订阅方案",
           icon: "none"
         });
         return;
       }
-      if (qty % 100 !== 0) {
-        common_vendor.index.showToast({
-          title: "股数必须是100的倍数",
-          icon: "none"
-        });
-        return;
+      const now = Date.now();
+      let expireTime = now;
+      if (selectedPlan.value === "monthly") {
+        expireTime = now + 30 * 24 * 60 * 60 * 1e3;
       }
-      const transaction = {
-        type: "sell",
-        stockName: currentStock.value.name,
-        stockCode: currentStock.value.code,
-        price: parseFloat(currentStock.value.price),
-        quantity: qty,
-        totalAmount: sellTotalAmount.value,
-        timestamp: Date.now()
+      const purchaseInfo = {
+        plan: selectedPlan.value,
+        purchaseTime: now,
+        expireTime
       };
-      const transactions = common_vendor.index.getStorageSync("simulated_transactions") || [];
-      transactions.push(transaction);
-      common_vendor.index.setStorageSync("simulated_transactions", transactions);
-      closeSellModal();
+      common_vendor.index.setStorageSync("strong_pool_purchase", purchaseInfo);
+      isPurchased.value = true;
+      closePurchaseModal();
       common_vendor.index.showToast({
-        title: "卖出成功",
+        title: "解锁成功",
         icon: "success"
       });
     };
@@ -156,61 +102,36 @@ const _sfc_main = {
       });
     };
     common_vendor.onLoad(() => {
-      checkLogin();
+      checkPurchaseStatus();
     });
     common_vendor.onShow(() => {
-      checkLogin();
+      checkPurchaseStatus();
       common_vendor.index.setNavigationBarTitle({ title: "量化交易大师" });
     });
     return (_ctx, _cache) => {
       return common_vendor.e({
-        a: common_vendor.t(stockList.value.length),
-        b: common_vendor.f(stockList.value, (stock, index, i0) => {
+        a: !isPurchased.value
+      }, !isPurchased.value ? {
+        b: common_vendor.o(showPurchaseModal)
+      } : {
+        c: common_vendor.f(stockList.value, (stock, index, i0) => {
           return {
             a: common_vendor.t(stock.name),
             b: common_vendor.t(stock.code),
-            c: common_vendor.t(stock.price),
-            d: common_vendor.t(stock.score),
-            e: common_vendor.o(($event) => showBuyModal(stock), index),
-            f: common_vendor.o(($event) => showSellModal(stock), index),
-            g: index
+            c: index
           };
+        })
+      }, {
+        d: selectedDate.value,
+        e: common_vendor.o(($event) => selectedDate.value = $event.detail.value),
+        f: common_vendor.o(onHistorySearch),
+        g: showModal.value
+      }, showModal.value ? {
+        h: common_vendor.o(closePurchaseModal),
+        i: common_vendor.o(handlePurchase),
+        j: common_vendor.o(() => {
         }),
-        c: selectedDate.value,
-        d: common_vendor.o(($event) => selectedDate.value = $event.detail.value),
-        e: common_vendor.o(onHistorySearch),
-        f: !isLoggedIn.value ? 1 : "",
-        g: !isLoggedIn.value
-      }, !isLoggedIn.value ? {
-        h: common_vendor.o(goToLogin)
-      } : {}, {
-        i: showBuyModalFlag.value
-      }, showBuyModalFlag.value ? {
-        j: common_vendor.o(closeBuyModal),
-        k: common_vendor.t(currentStock.value.name),
-        l: common_vendor.t(currentStock.value.code),
-        m: common_vendor.t(currentStock.value.price),
-        n: common_vendor.o([($event) => buyQuantity.value = $event.detail.value, onBuyQuantityChange]),
-        o: buyQuantity.value,
-        p: common_vendor.t(common_vendor.unref(buyTotalAmount).toFixed(2)),
-        q: common_vendor.o(handleBuy),
-        r: common_vendor.o(() => {
-        }),
-        s: common_vendor.o(closeBuyModal)
-      } : {}, {
-        t: showSellModalFlag.value
-      }, showSellModalFlag.value ? {
-        v: common_vendor.o(closeSellModal),
-        w: common_vendor.t(currentStock.value.name),
-        x: common_vendor.t(currentStock.value.code),
-        y: common_vendor.t(currentStock.value.price),
-        z: common_vendor.o([($event) => sellQuantity.value = $event.detail.value, onSellQuantityChange]),
-        A: sellQuantity.value,
-        B: common_vendor.t(common_vendor.unref(sellTotalAmount).toFixed(2)),
-        C: common_vendor.o(handleSell),
-        D: common_vendor.o(() => {
-        }),
-        E: common_vendor.o(closeSellModal)
+        k: common_vendor.o(closePurchaseModal)
       } : {});
     };
   }

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
dist/dev/mp-weixin/pages/strong/strong.wxml


+ 122 - 141
dist/dev/mp-weixin/pages/strong/strong.wxss

@@ -79,14 +79,6 @@
 .stock-list-card {
   padding: 32rpx;
 }
-.stock-list-header {
-  margin-bottom: 24rpx;
-}
-.stock-list-title {
-  font-size: 30rpx;
-  font-weight: 600;
-  color: #222222;
-}
 .stock-item {
   display: flex;
   justify-content: space-between;
@@ -170,13 +162,6 @@
   font-weight: 700;
   color: #ffffff;
 }
-.risk-tip {
-  display: block;
-  margin-top: 24rpx;
-  font-size: 22rpx;
-  color: #9ca2b5;
-  text-align: center;
-}
 
 /* 历史股票池回顾 */
 .history-card {
@@ -252,12 +237,7 @@
 .modal-title {
   font-size: 32rpx;
   font-weight: 600;
-}
-.buy-title {
-  color: #3abf81;
-}
-.sell-title {
-  color: #f16565;
+  color: #222222;
 }
 .modal-close {
   font-size: 48rpx;
@@ -269,169 +249,170 @@
   align-items: center;
   justify-content: center;
 }
-.modal-body {
-  margin-bottom: 32rpx;
+.modal-footer {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
 }
-.modal-stock-name {
-  display: block;
-  font-size: 28rpx;
-  font-weight: 600;
-  color: #222222;
-  margin-bottom: 24rpx;
+.bottom-safe-area {
+  height: 80rpx;
 }
-.modal-price-row {
+
+/* 锁定内容样式 */
+.locked-content {
   display: flex;
+  flex-direction: column;
   align-items: center;
+  padding: 60rpx 0 40rpx;
+}
+.lock-icon-wrapper {
   margin-bottom: 32rpx;
 }
-.modal-price-label {
-  font-size: 26rpx;
-  color: #666a7f;
-  margin-right: 12rpx;
+.locked-content .lock-icon {
+  font-size: 80rpx;
 }
-.modal-price-value {
-  font-size: 32rpx;
-  font-weight: 700;
+.lock-text {
+  font-size: 28rpx;
   color: #222222;
+  margin-bottom: 16rpx;
+  text-align: center;
 }
-.modal-input-row {
-  margin-bottom: 32rpx;
-}
-.modal-input-label {
-  display: block;
+.lock-desc {
   font-size: 24rpx;
   color: #9ca2b5;
-  margin-bottom: 16rpx;
+  margin-bottom: 48rpx;
+  text-align: center;
+  line-height: 1.6;
 }
-.modal-input {
+.locked-content .unlock-button {
   width: 100%;
-  background: #f7f8fc;
-  border-radius: 12rpx;
-  padding: 24rpx;
-  font-size: 28rpx;
-  color: #222222;
-  box-sizing: border-box;
-}
-.modal-total-row {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  padding-top: 24rpx;
-  border-top: 1rpx solid #f1f2f6;
+  background: linear-gradient(135deg, #5d55e8, #7568ff);
+  border-radius: 16rpx;
+  padding: 28rpx 0;
+  text-align: center;
+  box-shadow: 0 12rpx 24rpx rgba(93, 85, 232, 0.4);
 }
-.modal-total-label {
-  font-size: 26rpx;
-  color: #666a7f;
+.locked-content .unlock-button-text {
+  font-size: 30rpx;
+  font-weight: 600;
+  color: #ffffff;
 }
-.modal-total-value {
-  font-size: 36rpx;
-  font-weight: 700;
+
+/* 已解锁内容样式 */
+.unlocked-content {
+  margin-top: 32rpx;
 }
-.buy-total {
+.unlocked-tip {
+  font-size: 26rpx;
   color: #3abf81;
+  margin-bottom: 24rpx;
+  display: block;
 }
-.sell-total {
-  color: #f16565;
+
+/* 购买弹窗样式 */
+.subscription-options {
+  margin-bottom: 32rpx;
 }
-.modal-footer {
+.subscription-option {
   display: flex;
-  flex-direction: column;
+  justify-content: space-between;
   align-items: center;
-}
-.modal-button {
-  width: 100%;
+  padding: 32rpx 24rpx;
+  border: 2rpx solid #e5e7eb;
   border-radius: 16rpx;
-  padding: 28rpx 0;
-  text-align: center;
-  margin-bottom: 24rpx;
+  margin-bottom: 20rpx;
+  transition: all 0.3s;
 }
-.buy-button {
-  background: #3abf81;
+.subscription-option.active {
+  border-color: #5d55e8;
+  background: #f7f8fc;
 }
-.sell-button {
-  background: #f16565;
+.option-info {
+  display: flex;
+  flex-direction: column;
 }
-.modal-button-text {
-  font-size: 30rpx;
+.option-title {
+  font-size: 28rpx;
   font-weight: 600;
-  color: #ffffff;
+  color: #222222;
+  margin-bottom: 8rpx;
 }
-.modal-tip {
-  font-size: 22rpx;
+.option-desc {
+  font-size: 24rpx;
   color: #9ca2b5;
 }
-.bottom-safe-area {
-  height: 80rpx;
+.option-price {
+  font-size: 36rpx;
+  font-weight: 700;
+  color: #f16565;
 }
 
-/* 模糊效果 */
-.blur-content {
-  filter: blur(8rpx);
-  pointer-events: none;
+/* 支付方式选择 */
+.payment-method-section {
+  margin-bottom: 32rpx;
+  padding-top: 24rpx;
+  border-top: 1rpx solid #f1f2f6;
 }
-
-/* 登录遮罩层 */
-.login-mask {
-  position: fixed;
-  top: 0;
-  left: 0;
-  right: 0;
-  bottom: 0;
-  background: rgba(0, 0, 0, 0.4);
+.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;
-  justify-content: center;
-  z-index: 999;
+  padding: 24rpx 20rpx;
+  border: 2rpx solid #e5e7eb;
+  border-radius: 12rpx;
+  transition: all 0.3s;
+  position: relative;
 }
-.login-prompt {
-  width: 560rpx;
-  max-width: 560rpx;
-  background: #ffffff;
-  border-radius: 24rpx;
-  padding: 50rpx 40rpx;
-  margin: 0 auto;
-  text-align: center;
-  box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.3);
-  box-sizing: border-box;
+.payment-method-item.active {
+  border-color: #5d55e8;
+  background: #f7f5ff;
 }
-.lock-icon {
-  font-size: 72rpx;
-  margin-bottom: 20rpx;
+.payment-icon {
+  font-size: 36rpx;
+  margin-right: 16rpx;
 }
-.prompt-title {
-  display: block;
-  font-size: 32rpx;
-  font-weight: 600;
+.payment-name {
+  font-size: 28rpx;
+  font-weight: 500;
   color: #222222;
-  margin-bottom: 12rpx;
-}
-.prompt-desc {
-  display: block;
-  font-size: 24rpx;
-  color: #999999;
-  line-height: 1.5;
-  margin-bottom: 32rpx;
+  flex: 1;
 }
-.login-button-native {
-  width: 100%;
-  height: 80rpx;
-  background: linear-gradient(135deg, #4CAF50, #66BB6A);
+.payment-check {
+  width: 36rpx;
+  height: 36rpx;
+  background: #5d55e8;
+  border-radius: 50%;
   color: #ffffff;
-  border-radius: 40rpx;
-  font-size: 30rpx;
-  font-weight: 600;
-  box-shadow: 0 8rpx 24rpx rgba(76, 175, 80, 0.4);
+  font-size: 24rpx;
   display: flex;
   align-items: center;
   justify-content: center;
-  border: none;
-  padding: 0;
-  line-height: 80rpx;
 }
-.login-button-native::after {
-  border: none;
+.pay-button {
+  width: 100%;
+  background: #f16565;
+  border-radius: 16rpx;
+  padding: 28rpx 0;
+  text-align: center;
+  margin-bottom: 24rpx;
 }
-.button-icon {
-  font-size: 32rpx;
-  margin-right: 12rpx;
+.pay-button-text {
+  font-size: 30rpx;
+  font-weight: 600;
+  color: #ffffff;
+}
+.agreement-text {
+  font-size: 22rpx;
+  color: #9ca2b5;
 }

+ 5 - 28
dist/dev/mp-weixin/utils/api.js

@@ -18,6 +18,11 @@ const request = (options) => {
       data: options.data || {},
       header,
       success: (res) => {
+        const newToken = res.header["New-Token"] || res.header["new-token"];
+        if (newToken) {
+          console.log("检测到新token,自动续期");
+          common_vendor.index.setStorageSync("user_token", newToken);
+        }
         if (res.statusCode === 200) {
           resolve(res.data);
         } else if (res.statusCode === 401) {
@@ -120,36 +125,8 @@ const searchStocks = (keyword) => {
     data: { keyword }
   });
 };
-const getUserPortfolio = () => {
-  return request({
-    url: "/v1/user/portfolio",
-    method: "GET"
-  });
-};
-const getLeaderboard = () => {
-  return request({
-    url: "/v1/rank/leaderboard",
-    method: "GET"
-  });
-};
-const getUserPointsApi = () => {
-  return request({
-    url: "/v1/points/balance",
-    method: "GET"
-  });
-};
-const getPointsRecordsApi = () => {
-  return request({
-    url: "/v1/points/records",
-    method: "GET"
-  });
-};
-exports.getLeaderboard = getLeaderboard;
-exports.getPointsRecordsApi = getPointsRecordsApi;
 exports.getSuggestions = getSuggestions;
 exports.getUserInfoApi = getUserInfoApi;
-exports.getUserPointsApi = getUserPointsApi;
-exports.getUserPortfolio = getUserPortfolio;
 exports.searchStocks = searchStocks;
 exports.updateUserProfile = updateUserProfile;
 exports.uploadFile = uploadFile;

+ 1 - 7
src/pages.json

@@ -47,12 +47,6 @@
       "style": {
         "navigationStyle": "custom"
       }
-    },
-    {
-      "path": "pages/points/points",
-      "style": {
-        "navigationStyle": "custom"
-      }
     }
   ],
   "globalStyle": {
@@ -91,7 +85,7 @@
       },
       {
         "pagePath": "pages/rank/rank",
-        "text": "模拟排名",
+        "text": "我的股票",
         "iconPath": "/static/images/tab_rank.png",
         "selectedIconPath": "/static/images/tab_rank_active.png"
       },

+ 0 - 168
src/pages/mine/mine.vue

@@ -17,35 +17,8 @@
           </view>
         </view>
 
-        <!-- 积分区域 -->
-        <view class="my-tasks-section">
-          <view class="points-row">
-            <view class="points-display">
-              <view class="points-icon-wrapper">
-                <text class="points-icon">💰</text>
-              </view>
-              <view class="points-info">
-                <text class="points-label">我的积分</text>
-                <text class="points-value">{{ isLoggedIn ? points : 0 }}</text>
-              </view>
-            </view>
-            
-            <button class="recharge-button" @click="handleRecharge">
-              <text class="recharge-text">充值</text>
-            </button>
-          </view>
-        </view>
-
         <!-- 菜单列表 -->
         <view class="menu-list">
-          <view class="menu-item" @click="handleHistory">
-            <view class="menu-left">
-              <text class="menu-icon">📋</text>
-              <text class="menu-label">积分记录</text>
-            </view>
-            <text class="menu-arrow">›</text>
-          </view>
-          
           <view class="menu-item" @click="handleTransactionRecord">
             <view class="menu-left">
               <text class="menu-icon">📝</text>
@@ -73,7 +46,6 @@
 import { ref, onMounted } from 'vue'
 import { onShow } from '@dcloudio/uni-app'
 import { isLoggedIn as checkLogin, getUserInfo as getStoredUserInfo, logout, checkLogin as requireLogin } from '@/utils/auth.js'
-import { getUserPointsApi } from '@/utils/api.js'
 
 const isLoggedIn = ref(false)
 const showPhoneAuth = ref(false)
@@ -82,7 +54,6 @@ const userInfo = ref({
   avatar: '',
   phone: ''
 })
-const points = ref(0)
 
 /**
  * 页面加载时检查登录状态
@@ -112,24 +83,6 @@ const loadUserInfo = async () => {
       userInfo.value = storedInfo
       console.log('[个人中心] 加载用户信息:', userInfo.value)
     }
-    // 获取用户积分
-    await loadUserPoints()
-  }
-}
-
-/**
- * 加载用户积分
- */
-const loadUserPoints = async () => {
-  try {
-    const res = await getUserPointsApi()
-    if (res.code === 200 && res.data) {
-      points.value = res.data.totalPoints || 0
-      console.log('[个人中心] 用户积分:', points.value)
-    }
-  } catch (e) {
-    console.error('获取积分失败:', e)
-    points.value = 0
   }
 }
 
@@ -172,48 +125,6 @@ const handleLogout = () => {
   })
 }
 
-/**
- * 查看积分
- */
-const handleViewPoints = () => {
-  if (!requireLogin(() => {
-    handleViewPoints()
-  })) {
-    return
-  }
-  
-  uni.showToast({ title: `当前积分: ${points.value}`, icon: 'none' })
-}
-
-/**
- * 充值
- */
-const handleRecharge = () => {
-  if (!requireLogin(() => {
-    handleRecharge()
-  })) {
-    return
-  }
-  
-  uni.showToast({ title: '充值功能开发中', icon: 'none' })
-}
-
-/**
- * 积分记录
- */
-const handleHistory = () => {
-  if (!requireLogin(() => {
-    handleHistory()
-  })) {
-    return
-  }
-  
-  // 跳转到积分记录页面
-  uni.navigateTo({
-    url: '/pages/points/points'
-  })
-}
-
 /**
  * 交易记录
  */
@@ -292,85 +203,6 @@ const handleTransactionRecord = () => {
   font-weight: 300;
 }
 
-/* 积分区域 */
-.my-tasks-section {
-  background: #ffffff;
-  border-radius: 24rpx;
-  padding: 32rpx;
-  margin-bottom: 32rpx;
-  box-shadow: 0 16rpx 40rpx rgba(37, 52, 94, 0.08);
-}
-
-.points-row {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-}
-
-.points-display {
-  flex: 1;
-  display: flex;
-  align-items: center;
-}
-
-.points-icon-wrapper {
-  width: 80rpx;
-  height: 80rpx;
-  border-radius: 50%;
-  background: linear-gradient(135deg, #00BFA5, #00D4B5);
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  margin-right: 24rpx;
-  flex-shrink: 0;
-  box-shadow: 0 8rpx 20rpx rgba(0, 191, 165, 0.3);
-}
-
-.points-icon {
-  font-size: 40rpx;
-}
-
-.points-info {
-  display: flex;
-  flex-direction: column;
-}
-
-.points-label {
-  font-size: 26rpx;
-  color: #666a7f;
-  margin-bottom: 8rpx;
-}
-
-.points-value {
-  font-size: 40rpx;
-  font-weight: 700;
-  color: #00BFA5;
-}
-
-.recharge-button {
-  width: 160rpx;
-  height: 72rpx;
-  background: linear-gradient(135deg, #5d55e8, #7568ff);
-  border-radius: 36rpx;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  box-shadow: 0 8rpx 20rpx rgba(93, 85, 232, 0.3);
-  border: none;
-  padding: 0;
-  line-height: 1;
-}
-
-.recharge-button::after {
-  border: none;
-}
-
-.recharge-text {
-  font-size: 28rpx;
-  font-weight: 600;
-  color: #ffffff;
-}
-
 /* 菜单列表 */
 .menu-list {
   background: #ffffff;

+ 0 - 365
src/pages/points/points.vue

@@ -1,365 +0,0 @@
-<template>
-  <view class="page-container">
-    <!-- 顶部导航栏 -->
-    <view class="custom-navbar">
-      <view class="navbar-back" @click="handleBack">
-        <text class="back-icon">←</text>
-      </view>
-      <view class="navbar-title">
-        <text class="title-text">积分记录</text>
-      </view>
-      <view class="navbar-placeholder"></view>
-    </view>
-
-    <!-- 积分记录列表 -->
-    <scroll-view class="scroll-view" scroll-y>
-      <view class="transaction-list">
-        <!-- 按日期分组显示 -->
-        <view v-for="(group, dateKey) in groupedRecords" :key="dateKey" class="date-group">
-          <view class="date-header">
-            <text class="date-text">{{ dateKey }}</text>
-          </view>
-          
-          <view 
-            v-for="(item, index) in group" 
-            :key="index"
-            class="transaction-item"
-          >
-            <view class="item-left">
-              <view class="stock-info">
-                <text class="stock-name">{{ getTitle(item) }}</text>
-              </view>
-              <text class="transaction-time">{{ formatTime(item.createTime) }}</text>
-            </view>
-            
-            <view class="item-right">
-              <text :class="['amount-text', item.type === 1 ? 'amount-sell' : 'amount-buy']">
-                {{ item.type === 1 ? '+' : '-' }}{{ item.amount }}积分
-              </text>
-              <view :class="['status-badge', item.type === 1 ? 'status-sell' : 'status-buy']">
-                <text class="status-text">{{ item.type === 1 ? '获得' : '消耗' }}</text>
-              </view>
-            </view>
-          </view>
-        </view>
-
-        <!-- 空状态 -->
-        <view v-if="records.length === 0" class="empty-state">
-          <text class="empty-icon">💰</text>
-          <text class="empty-text">暂无积分记录</text>
-          <text class="empty-desc">完成任务即可获得积分</text>
-        </view>
-
-        <!-- 底部安全区域 -->
-        <view class="bottom-safe-area"></view>
-      </view>
-    </scroll-view>
-  </view>
-</template>
-
-<script setup>
-import { ref, computed, onMounted } from 'vue'
-import { getPointsRecordsApi } from '@/utils/api.js'
-import { isLoggedIn as checkLoginStatus } from '@/utils/auth.js'
-
-const records = ref([])
-const loading = ref(false)
-
-// 返回上一页
-const handleBack = () => {
-  const pages = getCurrentPages()
-  if (pages.length > 1) {
-    uni.navigateBack()
-  } else {
-    uni.switchTab({
-      url: '/pages/mine/mine'
-    })
-  }
-}
-
-// 按日期分组的积分记录
-const groupedRecords = computed(() => {
-  const groups = {}
-  
-  records.value.forEach(item => {
-    const dateKey = formatDate(item.createTime)
-    if (!groups[dateKey]) {
-      groups[dateKey] = []
-    }
-    groups[dateKey].push(item)
-  })
-  
-  return groups
-})
-
-// 格式化日期(用于分组)
-const formatDate = (timestamp) => {
-  const date = new Date(timestamp)
-  const today = new Date()
-  const yesterday = new Date(today)
-  yesterday.setDate(yesterday.getDate() - 1)
-  
-  const dateStr = date.toLocaleDateString('zh-CN', { 
-    year: 'numeric', 
-    month: '2-digit', 
-    day: '2-digit' 
-  })
-  
-  const todayStr = today.toLocaleDateString('zh-CN', { 
-    year: 'numeric', 
-    month: '2-digit', 
-    day: '2-digit' 
-  })
-  
-  const yesterdayStr = yesterday.toLocaleDateString('zh-CN', { 
-    year: 'numeric', 
-    month: '2-digit', 
-    day: '2-digit' 
-  })
-  
-  if (dateStr === todayStr) {
-    return '今天'
-  } else if (dateStr === yesterdayStr) {
-    return '昨天'
-  } else {
-    return dateStr
-  }
-}
-
-// 格式化时间(仅显示时分)
-const formatTime = (timestamp) => {
-  const date = new Date(timestamp)
-  const hours = String(date.getHours()).padStart(2, '0')
-  const minutes = String(date.getMinutes()).padStart(2, '0')
-  return `${hours}:${minutes}`
-}
-
-// 获取显示标题(优先用后端返回的bizTypeName,其次用remark)
-const getTitle = (item) => {
-  return item.bizTypeName || item.remark || '积分变动'
-}
-
-// 加载积分记录
-const loadRecords = async () => {
-  if (!checkLoginStatus()) {
-    console.log('未登录,无法获取积分记录')
-    return
-  }
-  
-  loading.value = true
-  try {
-    const res = await getPointsRecordsApi()
-    if (res.code === 200 && res.data) {
-      records.value = res.data
-      console.log('[积分记录] 加载成功,共', records.value.length, '条')
-    }
-  } catch (e) {
-    console.error('加载积分记录失败:', e)
-    records.value = []
-  } finally {
-    loading.value = false
-  }
-}
-
-onMounted(() => {
-  loadRecords()
-})
-</script>
-
-<style scoped>
-.page-container {
-  min-height: 100vh;
-  background: #f5f6fb;
-  display: flex;
-  flex-direction: column;
-}
-
-/* 自定义导航栏 */
-.custom-navbar {
-  background: #ffffff;
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  padding: 80rpx 32rpx 30rpx;
-  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
-  position: relative;
-}
-
-.navbar-back {
-  width: 80rpx;
-  height: 60rpx;
-  display: flex;
-  align-items: center;
-  justify-content: flex-start;
-}
-
-.back-icon {
-  font-size: 40rpx;
-  color: #222222;
-  font-weight: bold;
-}
-
-.navbar-title {
-  position: absolute;
-  left: 50%;
-  transform: translateX(-50%);
-}
-
-.title-text {
-  font-size: 36rpx;
-  font-weight: 800;
-  color: #3F51F7;
-  letter-spacing: 2rpx;
-}
-
-.navbar-placeholder {
-  width: 80rpx;
-}
-
-/* 交易记录列表 */
-.scroll-view {
-  flex: 1;
-  height: 0;
-}
-
-.transaction-list {
-  padding: 0 0 32rpx;
-}
-
-/* 日期分组 */
-.date-group {
-  margin-bottom: 32rpx;
-}
-
-.date-header {
-  padding: 24rpx 32rpx 16rpx;
-}
-
-.date-text {
-  font-size: 26rpx;
-  color: #9ca2b5;
-  font-weight: 500;
-}
-
-/* 交易项 */
-.transaction-item {
-  background: #ffffff;
-  padding: 32rpx;
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  border-bottom: 1rpx solid #f5f6fb;
-}
-
-.transaction-item:first-child {
-  border-top-left-radius: 0;
-  border-top-right-radius: 0;
-}
-
-.transaction-item:last-child {
-  border-bottom: none;
-}
-
-.item-left {
-  flex: 1;
-  display: flex;
-  flex-direction: column;
-}
-
-.stock-info {
-  display: flex;
-  align-items: center;
-  margin-bottom: 8rpx;
-}
-
-.stock-name {
-  font-size: 30rpx;
-  font-weight: 600;
-  color: #222222;
-  margin-right: 12rpx;
-}
-
-.transaction-time {
-  font-size: 24rpx;
-  color: #9ca2b5;
-}
-
-.item-right {
-  display: flex;
-  flex-direction: column;
-  align-items: flex-end;
-}
-
-.amount-text {
-  font-size: 32rpx;
-  font-weight: 700;
-  margin-bottom: 8rpx;
-}
-
-.amount-buy {
-  color: #3abf81;
-}
-
-.amount-sell {
-  color: #f16565;
-}
-
-.status-badge {
-  padding: 4rpx 16rpx;
-  border-radius: 12rpx;
-}
-
-.status-buy {
-  background: #e7f7ef;
-}
-
-.status-sell {
-  background: #ffe7ee;
-}
-
-.status-text {
-  font-size: 22rpx;
-  font-weight: 500;
-}
-
-.status-buy .status-text {
-  color: #3abf81;
-}
-
-.status-sell .status-text {
-  color: #f16565;
-}
-
-/* 空状态 */
-.empty-state {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  padding: 120rpx 0;
-  background: #ffffff;
-  margin: 0 32rpx;
-  border-radius: 24rpx;
-}
-
-.empty-icon {
-  font-size: 120rpx;
-  margin-bottom: 32rpx;
-  opacity: 0.5;
-}
-
-.empty-text {
-  font-size: 32rpx;
-  color: #666666;
-  margin-bottom: 16rpx;
-  font-weight: 500;
-}
-
-.empty-desc {
-  font-size: 26rpx;
-  color: #9ca2b5;
-}
-
-.bottom-safe-area {
-  height: 40rpx;
-}
-</style>

+ 45 - 95
src/pages/pool/pool.vue

@@ -2,6 +2,15 @@
   <view class="page-container">
     <scroll-view class="scroll-view" scroll-y>
       <view class="content-wrapper">
+        <!-- 超短精选池标题 -->
+        <view class="pool-header-section">
+          <view class="pool-header">
+            <text class="pool-icon">⚡</text>
+            <text class="pool-title">超短精选池</text>
+          </view>
+          <text class="pool-desc">今日更新,高频捕捉短期爆发机会</text>
+        </view>
+
         <!-- 性能指标卡片 -->
         <view class="card performance-card">
           <view class="performance-item">
@@ -20,21 +29,15 @@
 
         <!-- 超短精选池区域 -->
         <view class="card pool-card">
-          <view class="pool-header">
-            <text class="pool-icon">⚡</text>
-            <text class="pool-title">超短精选池</text>
-          </view>
-          <text class="pool-desc">今日更新,高频捕捉短期爆发机会</text>
-          
           <!-- 未购买时显示锁定状态 -->
           <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-text">权限锁定: 查看 超短精选池 </text>
             <text class="lock-desc">超短池为每日实时更新,捕捉短期爆发机会。</text>
             <view class="unlock-button" @click="showPurchaseModal">
-              <text class="unlock-button-text">立即解锁 日 精选 (¥18/日)</text>
+              <text class="unlock-button-text">立即打赏</text>
             </view>
           </view>
 
@@ -129,36 +132,18 @@
           <text class="payment-method-title">支付方式</text>
           <view class="payment-methods">
             <view 
-              class="payment-method-item" 
-              :class="{ active: paymentMethod === 'wechat' }"
-              @click="paymentMethod = 'wechat'"
+              class="payment-method-item active"
             >
               <text class="payment-icon">💳</text>
               <text class="payment-name">微信支付</text>
-              <view class="payment-check" v-if="paymentMethod === 'wechat'">✓</view>
-            </view>
-            <view 
-              class="payment-method-item" 
-              :class="{ active: paymentMethod === 'points' }"
-              @click="paymentMethod = 'points'"
-            >
-              <text class="payment-icon">🪙</text>
-              <view class="payment-info">
-                <text class="payment-name">积分支付</text>
-                <text class="points-balance">余额: {{ userPoints }} 积分</text>
-              </view>
-              <view class="points-cost">
-                <text class="points-amount">{{ selectedPlan === 'daily' ? 180 : 980 }}</text>
-                <text class="points-unit">积分</text>
-              </view>
-              <view class="payment-check" v-if="paymentMethod === 'points'">✓</view>
+              <view class="payment-check">✓</view>
             </view>
           </view>
         </view>
 
         <view class="modal-footer">
-          <view class="pay-button" :class="{ 'points-pay': paymentMethod === 'points' }" @click="handlePurchase">
-            <text class="pay-button-text">{{ paymentMethod === 'points' ? '确认积分支付' : '确认支付并解锁' }}</text>
+          <view class="pay-button" @click="handlePurchase">
+            <text class="pay-button-text">确认支付并解锁</text>
           </view>
           <text class="agreement-text">点击即表示同意《用户订阅协议》</text>
         </view>
@@ -178,8 +163,6 @@ const showPhoneAuth = ref(false)  // 是否显示手机号授权按钮
 const selectedPlan = ref('daily')
 const selectedDate = ref('2025年11月20日')
 const isLoggedIn = ref(false)
-const paymentMethod = ref('wechat')  // 支付方式: wechat / points
-const userPoints = ref(0)  // 用户积分余额
 
 // 检查登录状态
 const checkLogin = () => {
@@ -188,17 +171,6 @@ const checkLogin = () => {
   return isLoggedIn.value
 }
 
-// 获取用户积分
-const getUserPoints = () => {
-  try {
-    const points = uni.getStorageSync('user_points') || 0
-    userPoints.value = points
-  } catch (e) {
-    console.error('获取积分失败:', e)
-    userPoints.value = 0
-  }
-}
-
 // 检查购买状态
 const checkPurchaseStatus = () => {
   try {
@@ -246,7 +218,6 @@ const showPurchaseModal = () => {
   }
   
   console.log('已登录,显示购买弹窗')
-  getUserPoints()  // 获取最新积分
   showModal.value = true
 }
 
@@ -265,23 +236,6 @@ const handlePurchase = () => {
     return
   }
 
-  // 积分支付逻辑
-  if (paymentMethod.value === 'points') {
-    const requiredPoints = selectedPlan.value === 'daily' ? 180 : 980
-    if (userPoints.value < requiredPoints) {
-      uni.showToast({
-        title: '积分不足,请充值或选择微信支付',
-        icon: 'none'
-      })
-      return
-    }
-    
-    // 扣除积分
-    const newPoints = userPoints.value - requiredPoints
-    uni.setStorageSync('user_points', newPoints)
-    userPoints.value = newPoints
-  }
-
   // 计算过期时间
   const now = Date.now()
   let expireTime = now
@@ -300,8 +254,7 @@ const handlePurchase = () => {
   const purchaseInfo = {
     plan: selectedPlan.value,
     purchaseTime: now,
-    expireTime: expireTime,
-    paymentMethod: paymentMethod.value
+    expireTime: expireTime
   }
   uni.setStorageSync('pool_purchase', purchaseInfo)
 
@@ -313,7 +266,7 @@ const handlePurchase = () => {
 
   // 显示成功提示
   uni.showToast({
-    title: paymentMethod.value === 'points' ? '积分支付成功' : '解锁成功',
+    title: '解锁成功',
     icon: 'success'
   })
 }
@@ -330,14 +283,12 @@ const onHistorySearch = () => {
 onLoad(() => {
   checkLogin()
   checkPurchaseStatus()
-  getUserPoints()
 })
 
 onShow(() => {
   // 每次页面显示时都检查登录状态和购买状态
   checkLogin()
   checkPurchaseStatus()
-  getUserPoints()
   // 设置导航栏标题
   uni.setNavigationBarTitle({ title: '量化交易大师' })
 })
@@ -370,6 +321,33 @@ onShow(() => {
   margin-bottom: 32rpx;
 }
 
+/* 超短精选池标题区域 */
+.pool-header-section {
+  margin-bottom: 24rpx;
+}
+
+.pool-header {
+  display: flex;
+  align-items: center;
+  margin-bottom: 12rpx;
+}
+
+.pool-icon {
+  font-size: 32rpx;
+  margin-right: 12rpx;
+}
+
+.pool-title {
+  font-size: 32rpx;
+  font-weight: 600;
+  color: #222222;
+}
+
+.pool-desc {
+  font-size: 26rpx;
+  color: #666a7f;
+}
+
 /* 性能指标卡片 */
 .performance-card {
   display: flex;
@@ -407,30 +385,7 @@ onShow(() => {
 
 /* 超短精选池卡片 */
 .pool-card {
-  padding: 40rpx 32rpx;
-}
-
-.pool-header {
-  display: flex;
-  align-items: center;
-  margin-bottom: 16rpx;
-}
-
-.pool-icon {
-  font-size: 32rpx;
-  margin-right: 12rpx;
-}
-
-.pool-title {
-  font-size: 32rpx;
-  font-weight: 600;
-  color: #222222;
-}
-
-.pool-desc {
-  font-size: 26rpx;
-  color: #666a7f;
-  margin-bottom: 32rpx;
+  padding: 32rpx;
 }
 
 /* 锁定内容 */
@@ -528,7 +483,6 @@ onShow(() => {
 .history-search-row {
   display: flex;
   align-items: center;
-  margin-bottom: 16rpx;
 }
 
 .history-date-input {
@@ -767,10 +721,6 @@ onShow(() => {
   justify-content: center;
 }
 
-.pay-button.points-pay {
-  background: linear-gradient(135deg, #ff9500, #ffb347);
-}
-
 .bottom-safe-area {
   height: 80rpx;
 }

+ 16 - 459
src/pages/rank/rank.vue

@@ -1,194 +1,17 @@
 <template>
   <view class="page-rank">
-    <scroll-view class="scroll-view" scroll-y>
-      <view class="content-wrapper" :class="{ 'blur-content': !isLoggedIn }">
-        <!-- 我的模拟资产卡片 -->
-        <view class="portfolio-card">
-          <view class="portfolio-header">
-            <view class="portfolio-icon">💼</view>
-            <text class="portfolio-title">我的模拟资产</text>
-          </view>
-          
-          <view class="portfolio-content">
-            <view class="portfolio-main">
-              <view class="portfolio-label">当前账户余额 (¥)</view>
-              <view class="portfolio-amount">{{ formatAmount(portfolio.balance) }}</view>
-            </view>
-            <view class="portfolio-profit">
-              <view class="profit-label">总盈亏 / 收益率</view>
-              <view :class="['profit-value', portfolio.profitRate >= 0 ? 'profit-positive' : 'profit-negative']">
-                ¥ {{ formatProfit(portfolio.profit) }} ({{ formatRate(portfolio.profitRate) }}%)
-              </view>
-            </view>
-          </view>
-        </view>
-
-        <!-- 模拟交易排行榜 -->
-        <view class="leaderboard-section">
-          <view class="section-header">
-            <view class="trophy-icon">🏆</view>
-            <text class="section-title">模拟交易排行榜</text>
-          </view>
-
-          <!-- 当前用户排名 -->
-          <view class="my-rank-card">
-            <view class="rank-number">#{{ myRank.rank }}</view>
-            <view class="rank-info">
-              <text class="rank-name">您 (本期收益)</text>
-            </view>
-            <view :class="['rank-rate', myRank.rate >= 0 ? 'rate-positive' : 'rate-negative']">
-              {{ myRank.rate >= 0 ? '+' : '' }}{{ myRank.rate }}%
-            </view>
-          </view>
-
-          <!-- 排行榜列表 -->
-          <view class="leaderboard-list">
-            <view 
-              v-for="(item, index) in leaderboard" 
-              :key="index"
-              class="leaderboard-item"
-            >
-              <view :class="['rank-badge', getRankClass(item.rank)]">
-                #{{ item.rank }}
-              </view>
-              <view class="user-info">
-                <text class="user-name">{{ item.name }}</text>
-              </view>
-              <view :class="['user-rate', item.rate >= 0 ? 'rate-positive' : 'rate-negative']">
-                {{ item.rate >= 0 ? '+' : '' }}{{ item.rate }}%
-              </view>
-            </view>
-          </view>
-
-          <view class="leaderboard-note">
-            <text class="note-text">排名每日更新,收益基于系统信号的模拟交易。</text>
-          </view>
-        </view>
-
-        <!-- 预留底部空间 -->
-        <view class="bottom-safe-area"></view>
-      </view>
-    </scroll-view>
-
-    <!-- 未登录遮罩层 -->
-    <view v-if="!isLoggedIn" class="login-mask">
-      <view class="login-prompt">
-        <view class="lock-icon">🔒</view>
-        <text class="prompt-title">登录后查看完整数据</text>
-        <text class="prompt-desc">使用微信授权快速登录</text>
-        
-        <!-- 跳转到登录页按钮 -->
-        <button 
-          class="login-button-native" 
-          @click="goToLogin"
-        >
-          <text>登录</text>
-        </button>
-      </view>
+    <view class="empty-content">
+      <view class="empty-icon">🚧</view>
+      <text class="empty-text">功能开发中</text>
+      <text class="empty-desc">敬请期待</text>
     </view>
   </view>
 </template>
 
 <script setup>
-import { ref, onMounted } from 'vue'
 import { onShow } from '@dcloudio/uni-app'
-import { getUserPortfolio, getLeaderboard } from '../../utils/api.js'
-import { isLoggedIn as checkIsLoggedIn } from '../../utils/auth.js'
-
-// 登录状态
-const isLoggedIn = ref(false)
-
-const portfolio = ref({
-  balance: 100000,
-  profit: 0,
-  profitRate: 0
-})
-
-const myRank = ref({
-  rank: 5,
-  rate: 0
-})
-
-// 模糊数据 - 未登录时显示
-const mockLeaderboard = [
-  { rank: 1, name: '量化王者 ***', rate: 35.2 },
-  { rank: 2, name: '短线猎手 ***', rate: 28.9 },
-  { rank: 3, name: '趋势追踪者 ***', rate: 22.1 },
-  { rank: 4, name: '稳健投资 ***', rate: 18.5 },
-  { rank: 5, name: '价值发现 ***', rate: 15.3 }
-]
-
-const leaderboard = ref(mockLeaderboard)
-
-const formatAmount = (amount) => {
-  return amount.toLocaleString('zh-CN')
-}
-
-const formatProfit = (profit) => {
-  return Math.abs(profit).toLocaleString('zh-CN')
-}
-
-const formatRate = (rate) => {
-  return rate.toFixed(2)
-}
 
-const getRankClass = (rank) => {
-  if (rank === 1) return 'rank-first'
-  if (rank === 2) return 'rank-second'
-  if (rank === 3) return 'rank-third'
-  return ''
-}
-
-// 检查登录状态并加载数据
-const checkLoginAndLoadData = () => {
-  isLoggedIn.value = checkIsLoggedIn()
-  console.log('[模拟排名] 登录状态:', isLoggedIn.value)
-  
-  if (isLoggedIn.value) {
-    loadRealData()
-  } else {
-    // 未登录,显示模糊数据
-    leaderboard.value = mockLeaderboard
-  }
-}
-
-// 跳转到登录页
-const goToLogin = () => {
-  uni.navigateTo({
-    url: '/pages/login/login'
-  })
-}
-
-// 加载真实数据
-const loadRealData = async () => {
-  try {
-    const portfolioRes = await getUserPortfolio()
-    if (portfolioRes.code === 0 && portfolioRes.data) {
-      portfolio.value = portfolioRes.data
-    }
-  } catch (err) {
-    console.error('获取资产数据失败:', err)
-  }
-
-  try {
-    const leaderboardRes = await getLeaderboard()
-    if (leaderboardRes.code === 0 && leaderboardRes.data) {
-      leaderboard.value = leaderboardRes.data.list || []
-      myRank.value = leaderboardRes.data.myRank || { rank: 5, rate: 0 }
-    }
-  } catch (err) {
-    console.error('获取排行榜数据失败:', err)
-  }
-}
-
-onMounted(() => {
-  checkLoginAndLoadData()
-})
-
-// 页面显示时重新检查登录状态
 onShow(() => {
-  checkLoginAndLoadData()
-  // 设置导航栏标题
   uni.setNavigationBarTitle({ title: '量化交易大师' })
 })
 </script>
@@ -197,299 +20,33 @@ onShow(() => {
 .page-rank {
   display: flex;
   flex-direction: column;
+  align-items: center;
+  justify-content: center;
   background: #f5f6fb;
   height: 100vh;
 }
 
-.scroll-view {
-  flex: 1;
-  height: 0;
-}
-
-.content-wrapper {
-  padding: 32rpx;
-}
-
-/* 模拟资产卡片 */
-.portfolio-card {
-  background: linear-gradient(135deg, #5d55e8, #7568ff);
-  border-radius: 24rpx;
-  padding: 40rpx 32rpx;
-  margin-bottom: 32rpx;
-  box-shadow: 0 16rpx 40rpx rgba(93, 85, 232, 0.3);
-}
-
-.portfolio-header {
-  display: flex;
-  align-items: center;
-  margin-bottom: 32rpx;
-}
-
-.portfolio-icon {
-  font-size: 40rpx;
-  margin-right: 16rpx;
-}
-
-.portfolio-title {
-  font-size: 32rpx;
-  font-weight: 600;
-  color: #ffffff;
-}
-
-.portfolio-content {
-  display: flex;
-  justify-content: space-between;
-  align-items: flex-end;
-}
-
-.portfolio-main {
-  flex: 1;
-}
-
-.portfolio-label {
-  font-size: 24rpx;
-  color: rgba(255, 255, 255, 0.8);
-  margin-bottom: 12rpx;
-}
-
-.portfolio-amount {
-  font-size: 56rpx;
-  font-weight: 700;
-  color: #ffffff;
-  line-height: 1.2;
-}
-
-.portfolio-profit {
-  text-align: right;
-}
-
-.profit-label {
-  font-size: 22rpx;
-  color: rgba(255, 255, 255, 0.7);
-  margin-bottom: 8rpx;
-}
-
-.profit-value {
-  font-size: 28rpx;
-  font-weight: 600;
-}
-
-.profit-positive {
-  color: #4fffb0;
-}
-
-.profit-negative {
-  color: #ff6b9d;
-}
-
-/* 排行榜区域 */
-.leaderboard-section {
-  background: #ffffff;
-  border-radius: 24rpx;
-  padding: 32rpx;
-  box-shadow: 0 16rpx 40rpx rgba(37, 52, 94, 0.08);
-}
-
-.section-header {
+.empty-content {
   display: flex;
+  flex-direction: column;
   align-items: center;
-  margin-bottom: 24rpx;
+  padding: 100rpx 60rpx;
 }
 
-.trophy-icon {
-  font-size: 36rpx;
-  margin-right: 12rpx;
+.empty-icon {
+  font-size: 120rpx;
+  margin-bottom: 40rpx;
 }
 
-.section-title {
+.empty-text {
   font-size: 32rpx;
   font-weight: 600;
-  color: #222222;
-}
-
-/* 当前用户排名卡片 */
-.my-rank-card {
-  background: linear-gradient(135deg, #fff9e6, #fffbf0);
-  border: 2rpx solid #ffd966;
-  border-radius: 16rpx;
-  padding: 24rpx 28rpx;
-  display: flex;
-  align-items: center;
-  margin-bottom: 24rpx;
-}
-
-.rank-number {
-  font-size: 40rpx;
-  font-weight: 700;
-  color: #ff9800;
-  margin-right: 24rpx;
-  min-width: 80rpx;
-}
-
-.rank-info {
-  flex: 1;
-}
-
-.rank-name {
-  font-size: 28rpx;
-  color: #333333;
-  font-weight: 500;
-}
-
-.rank-rate {
-  font-size: 32rpx;
-  font-weight: 700;
-}
-
-.rate-positive {
-  color: #00c853;
-}
-
-.rate-negative {
-  color: #ff5252;
-}
-
-/* 排行榜列表 */
-.leaderboard-list {
-  margin-bottom: 24rpx;
-}
-
-.leaderboard-item {
-  display: flex;
-  align-items: center;
-  padding: 24rpx 0;
-  border-bottom: 1rpx solid #f5f6fb;
-}
-
-.leaderboard-item:last-child {
-  border-bottom: none;
-}
-
-.rank-badge {
-  font-size: 32rpx;
-  font-weight: 700;
-  color: #666666;
-  margin-right: 24rpx;
-  min-width: 80rpx;
-}
-
-.rank-first {
-  color: #ff5252;
-}
-
-.rank-second {
-  color: #ff9800;
-}
-
-.rank-third {
-  color: #ffc107;
-}
-
-.user-info {
-  flex: 1;
-}
-
-.user-name {
-  font-size: 28rpx;
   color: #333333;
+  margin-bottom: 16rpx;
 }
 
-.user-rate {
-  font-size: 32rpx;
-  font-weight: 700;
-}
-
-.leaderboard-note {
-  padding-top: 16rpx;
-  border-top: 1rpx solid #f5f6fb;
-}
-
-.note-text {
-  font-size: 22rpx;
-  color: #999999;
-  line-height: 1.6;
-}
-
-.bottom-safe-area {
-  height: 80rpx;
-}
-
-/* 模糊效果 */
-.blur-content {
-  filter: blur(8rpx);
-  pointer-events: none;
-}
-
-/* 登录遮罩层 */
-.login-mask {
-  position: fixed;
-  top: 0;
-  left: 0;
-  right: 0;
-  bottom: 0;
-  background: rgba(0, 0, 0, 0.4);
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  z-index: 999;
-}
-
-.login-prompt {
-  width: 560rpx;
-  max-width: 560rpx;
-  background: #ffffff;
-  border-radius: 24rpx;
-  padding: 50rpx 40rpx;
-  margin: 0 auto;
-  text-align: center;
-  box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.3);
-  box-sizing: border-box;
-}
-
-.lock-icon {
-  font-size: 72rpx;
-  margin-bottom: 20rpx;
-}
-
-.prompt-title {
-  display: block;
-  font-size: 32rpx;
-  font-weight: 600;
-  color: #222222;
-  margin-bottom: 12rpx;
-}
-
-.prompt-desc {
-  display: block;
-  font-size: 24rpx;
+.empty-desc {
+  font-size: 26rpx;
   color: #999999;
-  line-height: 1.5;
-  margin-bottom: 32rpx;
-}
-
-.login-button-native {
-  width: 100%;
-  height: 80rpx;
-  background: linear-gradient(135deg, #4CAF50, #66BB6A);
-  color: #ffffff;
-  border-radius: 40rpx;
-  font-size: 30rpx;
-  font-weight: 600;
-  box-shadow: 0 8rpx 24rpx rgba(76, 175, 80, 0.4);
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  border: none;
-  padding: 0;
-  line-height: 80rpx;
-}
-
-.login-button-native::after {
-  border: none;
-}
-
-.button-icon {
-  font-size: 32rpx;
-  margin-right: 12rpx;
 }
 </style>

+ 264 - 401
src/pages/strong/strong.vue

@@ -1,7 +1,7 @@
 <template>
   <view class="page-container">
     <scroll-view class="scroll-view" scroll-y>
-      <view class="content-wrapper" :class="{ 'blur-content': !isLoggedIn }">
+      <view class="content-wrapper">
         <!-- 强势趋势池标题 -->
         <view class="pool-header-section">
           <view class="pool-header">
@@ -29,37 +29,40 @@
 
         <!-- 今日精选高分股 -->
         <view class="card stock-list-card">
-          <view class="stock-list-header">
-            <text class="stock-list-title">今日精选高分股 ({{ stockList.length }}只)</text>
-          </view>
-          
-          <view class="stock-item" v-for="(stock, index) in stockList" :key="index">
-            <view class="stock-info">
-              <view class="stock-name-row">
-                <text class="stock-name">{{ stock.name }}</text>
-                <text class="stock-code">{{ stock.code }}</text>
-              </view>
-              <view class="stock-price-row">
-                <text class="stock-price-label">价格:</text>
-                <text class="stock-price">¥{{ stock.price }}</text>
-              </view>
+          <!-- 未购买时显示锁定状态 -->
+          <view v-if="!isPurchased" class="locked-content">
+            <view class="lock-icon-wrapper">
+              <text class="lock-icon">🔒</text>
             </view>
-            <view class="stock-right">
-              <view class="stock-score-badge">
-                <text class="stock-score">{{ stock.score }}</text>
-              </view>
-              <view class="stock-actions">
-                <view class="action-btn buy-btn" @click="showBuyModal(stock)">
-                  <text class="action-icon">+</text>
+            <text class="lock-text">权限锁定: 查看 精选高分股</text>
+            <text class="lock-desc">精选高分股为每日实时更新,捕捉中长期趋势机会。</text>
+            <view class="unlock-button" @click="showPurchaseModal">
+              <text class="unlock-button-text">立即打赏</text>
+            </view>
+          </view>
+
+          <!-- 已购买时显示内容 -->
+          <view v-else class="unlocked-content">
+            <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">
+                  <text class="stock-name">{{ stock.name }}</text>
+                  <text class="stock-code">{{ stock.code }}</text>
                 </view>
-                <view class="action-btn sell-btn" @click="showSellModal(stock)">
-                  <text class="action-icon">-</text>
+              </view>
+              <view class="stock-right">
+                <view class="stock-actions">
+                  <view class="action-btn buy-btn">
+                    <text class="action-icon">+</text>
+                  </view>
+                  <view class="action-btn sell-btn">
+                    <text class="action-icon">-</text>
+                  </view>
                 </view>
               </view>
             </view>
           </view>
-
-          <text class="risk-tip">风险提示:买卖为模拟交易,不涉及真实资金。</text>
         </view>
 
         <!-- 历史趋势池回顾 -->
@@ -87,101 +90,45 @@
       </view>
     </scroll-view>
 
-    <!-- 未登录遮罩层 -->
-    <view v-if="!isLoggedIn" class="login-mask">
-      <view class="login-prompt">
-        <view class="lock-icon">🔒</view>
-        <text class="prompt-title">登录后进行模拟交易</text>
-        <text class="prompt-desc">使用微信授权快速登录</text>
-        
-        <!-- 跳转到登录页按钮 -->
-        <button 
-          class="login-button-native" 
-          @click="goToLogin"
-        >
-          <text>登录</text>
-        </button>
-      </view>
-    </view>
-
-    <!-- 买入弹窗 -->
-    <view v-if="showBuyModalFlag" class="modal-overlay" @click="closeBuyModal">
+    <!-- 购买弹窗 -->
+    <view v-if="showModal" class="modal-overlay" @click="closePurchaseModal">
       <view class="modal-content" @click.stop>
         <view class="modal-header">
-          <text class="modal-title buy-title">模拟买入</text>
-          <text class="modal-close" @click="closeBuyModal">×</text>
+          <text class="modal-title">强势池年订阅服务</text>
+          <text class="modal-close" @click="closePurchaseModal">×</text>
         </view>
         
-        <view class="modal-body">
-          <text class="modal-stock-name">{{ currentStock.name }} ({{ currentStock.code }})</text>
-          <view class="modal-price-row">
-            <text class="modal-price-label">当前价:</text>
-            <text class="modal-price-value">¥ {{ currentStock.price }}</text>
-          </view>
-          
-          <view class="modal-input-row">
-            <text class="modal-input-label">股数 (100的倍数)</text>
-            <input 
-              class="modal-input" 
-              type="number" 
-              v-model="buyQuantity"
-              placeholder="100"
-              @input="onBuyQuantityChange"
-            />
-          </view>
-          
-          <view class="modal-total-row">
-            <text class="modal-total-label">需支付金额:</text>
-            <text class="modal-total-value buy-total">¥ {{ buyTotalAmount.toFixed(2) }}</text>
-          </view>
-        </view>
-
-        <view class="modal-footer">
-          <view class="modal-button buy-button" @click="handleBuy">
-            <text class="modal-button-text">确认买入</text>
+        <view class="subscription-options">
+          <view 
+            class="subscription-option active"
+          >
+            <view class="option-info">
+              <text class="option-title">年订阅</text>
+              <text class="option-desc">连续查看</text>
+            </view>
+            <text class="option-price">¥98</text>
           </view>
-          <text class="modal-tip">交易已记录在您的模拟账户中。</text>
         </view>
-      </view>
-    </view>
 
-    <!-- 卖出弹窗 -->
-    <view v-if="showSellModalFlag" class="modal-overlay" @click="closeSellModal">
-      <view class="modal-content" @click.stop>
-        <view class="modal-header">
-          <text class="modal-title sell-title">模拟卖出</text>
-          <text class="modal-close" @click="closeSellModal">×</text>
-        </view>
-        
-        <view class="modal-body">
-          <text class="modal-stock-name">{{ currentStock.name }} ({{ currentStock.code }})</text>
-          <view class="modal-price-row">
-            <text class="modal-price-label">当前价:</text>
-            <text class="modal-price-value">¥ {{ currentStock.price }}</text>
-          </view>
-          
-          <view class="modal-input-row">
-            <text class="modal-input-label">股数 (100的倍数)</text>
-            <input 
-              class="modal-input" 
-              type="number" 
-              v-model="sellQuantity"
-              placeholder="100"
-              @input="onSellQuantityChange"
-            />
-          </view>
-          
-          <view class="modal-total-row">
-            <text class="modal-total-label">总市值估算:</text>
-            <text class="modal-total-value sell-total">¥ {{ sellTotalAmount.toFixed(2) }}</text>
+        <!-- 支付方式选择 -->
+        <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>
         </view>
 
         <view class="modal-footer">
-          <view class="modal-button sell-button" @click="handleSell">
-            <text class="modal-button-text">确认卖出</text>
+          <view class="pay-button" @click="handlePurchase">
+            <text class="pay-button-text">确认支付并解锁</text>
           </view>
-          <text class="modal-tip">交易已记录在您的模拟账户中。</text>
+          <text class="agreement-text">点击即表示同意《用户订阅协议》</text>
         </view>
       </view>
     </view>
@@ -189,12 +136,16 @@
 </template>
 
 <script setup>
-import { ref, computed } from 'vue'
+import { ref } from 'vue'
 import { onLoad, onShow } from '@dcloudio/uni-app'
 import { isLoggedIn as checkLoginStatus } from '../../utils/auth.js'
 
 // 登录状态
 const isLoggedIn = ref(false)
+// 购买状态
+const isPurchased = ref(false)
+const showModal = ref(false)
+const selectedPlan = ref('monthly')
 
 // 股票列表数据
 const stockList = ref([
@@ -213,176 +164,114 @@ const stockList = ref([
 ])
 
 const selectedDate = ref('2025年11月20日')
-const showBuyModalFlag = ref(false)
-const showSellModalFlag = ref(false)
-const currentStock = ref({})
-const buyQuantity = ref('100')
-const sellQuantity = ref('100')
 
 // 检查登录状态(不弹窗提示)
 const checkLogin = () => {
   isLoggedIn.value = checkLoginStatus()
   console.log('[强势池] 登录状态:', isLoggedIn.value)
+  return isLoggedIn.value
+}
+
+// 检查购买状态
+// 检查购买状态
+const checkPurchaseStatus = () => {
+  try {
+    const purchaseInfo = uni.getStorageSync('strong_pool_purchase')
+    if (purchaseInfo) {
+      const now = Date.now()
+      const expireTime = purchaseInfo.expireTime
+      if (now < expireTime) {
+        isPurchased.value = true
+      } else {
+        // 已过期,清除购买信息
+        uni.removeStorageSync('strong_pool_purchase')
+        isPurchased.value = false
+      }
+    } else {
+      isPurchased.value = false
+    }
+  } catch (e) {
+    console.error('检查购买状态失败:', e)
+    isPurchased.value = false
+  }
 }
 
-// 跳转到登录页
-const goToLogin = () => {
-  uni.navigateTo({
-    url: '/pages/login/login'
-  })
-}
-
-// 计算买入总金额
-const buyTotalAmount = computed(() => {
-  const qty = parseInt(buyQuantity.value) || 0
-  const price = parseFloat(currentStock.value.price) || 0
-  return qty * price
-})
-
-// 计算卖出总金额
-const sellTotalAmount = computed(() => {
-  const qty = parseInt(sellQuantity.value) || 0
-  const price = parseFloat(currentStock.value.price) || 0
-  return qty * price
-})
-
-// 显示买入弹窗
-const showBuyModal = (stock) => {
-  console.log('点击买入按钮')
-  currentStock.value = { ...stock }
-  buyQuantity.value = '100'
-  showBuyModalFlag.value = true
-}
-
-// 关闭买入弹窗
-const closeBuyModal = () => {
-  showBuyModalFlag.value = false
-}
-
-// 显示卖出弹窗
-const showSellModal = (stock) => {
-  console.log('点击卖出按钮')
-  currentStock.value = { ...stock }
-  sellQuantity.value = '100'
-  showSellModalFlag.value = true
-}
-
-// 关闭卖出弹窗
-const closeSellModal = () => {
-  showSellModalFlag.value = false
-}
-
-// 买入股数变化
-const onBuyQuantityChange = (e) => {
-  const value = e.detail.value
-  // 确保是100的倍数
-  if (value && parseInt(value) % 100 !== 0) {
-    uni.showToast({
-      title: '股数必须是100的倍数',
-      icon: 'none'
+// 显示购买弹窗(需要登录)
+const showPurchaseModal = () => {
+  console.log('点击立即解锁')
+  
+  // 检查登录状态
+  if (!checkLoginStatus()) {
+    console.log('未登录,跳转到登录页')
+    uni.showModal({
+      title: '登录提示',
+      content: '此功能需要登录后使用,是否前往登录?',
+      confirmText: '去登录',
+      cancelText: '取消',
+      success: (res) => {
+        if (res.confirm) {
+          uni.navigateTo({
+            url: '/pages/login/login'
+          })
+        }
+      }
     })
+    return
   }
+  
+  console.log('已登录,显示购买弹窗')
+  showModal.value = true
 }
 
-// 卖出股数变化
-const onSellQuantityChange = (e) => {
-  const value = e.detail.value
-  // 确保是100的倍数
-  if (value && parseInt(value) % 100 !== 0) {
-    uni.showToast({
-      title: '股数必须是100的倍数',
-      icon: 'none'
-    })
-  }
+// 关闭购买弹窗
+const closePurchaseModal = () => {
+  showModal.value = false
 }
 
-// 处理买入
-const handleBuy = () => {
-  const qty = parseInt(buyQuantity.value)
-  if (!qty || qty <= 0) {
+// 处理购买
+const handlePurchase = () => {
+  if (!selectedPlan.value) {
     uni.showToast({
-      title: '请输入有效的股数',
+      title: '请选择订阅方案',
       icon: 'none'
     })
     return
   }
+
+  // 计算过期时间
+  const now = Date.now()
+  let expireTime = now
   
-  if (qty % 100 !== 0) {
-    uni.showToast({
-      title: '股数必须是100的倍数',
-      icon: 'none'
-    })
-    return
+  if (selectedPlan.value === 'monthly') {
+    // 月订阅:30天后过期
+    expireTime = now + 30 * 24 * 60 * 60 * 1000
   }
 
-  // 保存交易记录
-  const transaction = {
-    type: 'buy',
-    stockName: currentStock.value.name,
-    stockCode: currentStock.value.code,
-    price: parseFloat(currentStock.value.price),
-    quantity: qty,
-    totalAmount: buyTotalAmount.value,
-    timestamp: Date.now()
+  // 保存购买信息
+  const purchaseInfo = {
+    plan: selectedPlan.value,
+    purchaseTime: now,
+    expireTime: expireTime
   }
+  uni.setStorageSync('strong_pool_purchase', purchaseInfo)
 
-  // 获取现有交易记录
-  const transactions = uni.getStorageSync('simulated_transactions') || []
-  transactions.push(transaction)
-  uni.setStorageSync('simulated_transactions', transactions)
+  // 更新购买状态
+  isPurchased.value = true
 
   // 关闭弹窗
-  closeBuyModal()
+  closePurchaseModal()
 
   // 显示成功提示
   uni.showToast({
-    title: '买入成功',
+    title: '解锁成功',
     icon: 'success'
   })
 }
 
-// 处理卖出
-const handleSell = () => {
-  const qty = parseInt(sellQuantity.value)
-  if (!qty || qty <= 0) {
-    uni.showToast({
-      title: '请输入有效的股数',
-      icon: 'none'
-    })
-    return
-  }
-  
-  if (qty % 100 !== 0) {
-    uni.showToast({
-      title: '股数必须是100的倍数',
-      icon: 'none'
-    })
-    return
-  }
-
-  // 保存交易记录
-  const transaction = {
-    type: 'sell',
-    stockName: currentStock.value.name,
-    stockCode: currentStock.value.code,
-    price: parseFloat(currentStock.value.price),
-    quantity: qty,
-    totalAmount: sellTotalAmount.value,
-    timestamp: Date.now()
-  }
-
-  // 获取现有交易记录
-  const transactions = uni.getStorageSync('simulated_transactions') || []
-  transactions.push(transaction)
-  uni.setStorageSync('simulated_transactions', transactions)
-
-  // 关闭弹窗
-  closeSellModal()
-
-  // 显示成功提示
-  uni.showToast({
-    title: '卖出成功',
-    icon: 'success'
+// 跳转到登录页
+const goToLogin = () => {
+  uni.navigateTo({
+    url: '/pages/login/login'
   })
 }
 
@@ -395,13 +284,13 @@ const onHistorySearch = () => {
 }
 
 onLoad(() => {
-  // 页面加载时检查登录状态
-  checkLogin()
+  // 页面加载时检查购买状态
+  checkPurchaseStatus()
 })
 
 onShow(() => {
-  // 页面显示时检查登录状态(从登录页返回时会触发)
-  checkLogin()
+  // 页面显示时检查购买状态(从登录页返回时会触发)
+  checkPurchaseStatus()
   // 设置导航栏标题
   uni.setNavigationBarTitle({ title: '量化交易大师' })
 })
@@ -501,16 +390,6 @@ onShow(() => {
   padding: 32rpx;
 }
 
-.stock-list-header {
-  margin-bottom: 24rpx;
-}
-
-.stock-list-title {
-  font-size: 30rpx;
-  font-weight: 600;
-  color: #222222;
-}
-
 .stock-item {
   display: flex;
   justify-content: space-between;
@@ -611,14 +490,6 @@ onShow(() => {
   color: #ffffff;
 }
 
-.risk-tip {
-  display: block;
-  margin-top: 24rpx;
-  font-size: 22rpx;
-  color: #9ca2b5;
-  text-align: center;
-}
-
 /* 历史股票池回顾 */
 .history-card {
   padding: 32rpx;
@@ -703,14 +574,7 @@ onShow(() => {
 .modal-title {
   font-size: 32rpx;
   font-weight: 600;
-}
-
-.buy-title {
-  color: #3abf81;
-}
-
-.sell-title {
-  color: #f16565;
+  color: #222222;
 }
 
 .modal-close {
@@ -724,196 +588,195 @@ onShow(() => {
   justify-content: center;
 }
 
-.modal-body {
-  margin-bottom: 32rpx;
+.modal-footer {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
 }
 
-.modal-stock-name {
-  display: block;
-  font-size: 28rpx;
-  font-weight: 600;
-  color: #222222;
-  margin-bottom: 24rpx;
+.bottom-safe-area {
+  height: 80rpx;
 }
 
-.modal-price-row {
+/* 锁定内容样式 */
+.locked-content {
   display: flex;
+  flex-direction: column;
   align-items: center;
-  margin-bottom: 32rpx;
+  padding: 60rpx 0 40rpx;
 }
 
-.modal-price-label {
-  font-size: 26rpx;
-  color: #666a7f;
-  margin-right: 12rpx;
+.lock-icon-wrapper {
+  margin-bottom: 32rpx;
 }
 
-.modal-price-value {
-  font-size: 32rpx;
-  font-weight: 700;
-  color: #222222;
+.locked-content .lock-icon {
+  font-size: 80rpx;
 }
 
-.modal-input-row {
-  margin-bottom: 32rpx;
+.lock-text {
+  font-size: 28rpx;
+  color: #222222;
+  margin-bottom: 16rpx;
+  text-align: center;
 }
 
-.modal-input-label {
-  display: block;
+.lock-desc {
   font-size: 24rpx;
   color: #9ca2b5;
-  margin-bottom: 16rpx;
+  margin-bottom: 48rpx;
+  text-align: center;
+  line-height: 1.6;
 }
 
-.modal-input {
+.locked-content .unlock-button {
   width: 100%;
-  background: #f7f8fc;
-  border-radius: 12rpx;
-  padding: 24rpx;
-  font-size: 28rpx;
-  color: #222222;
-  box-sizing: border-box;
-}
-
-.modal-total-row {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  padding-top: 24rpx;
-  border-top: 1rpx solid #f1f2f6;
+  background: linear-gradient(135deg, #5d55e8, #7568ff);
+  border-radius: 16rpx;
+  padding: 28rpx 0;
+  text-align: center;
+  box-shadow: 0 12rpx 24rpx rgba(93, 85, 232, 0.4);
 }
 
-.modal-total-label {
-  font-size: 26rpx;
-  color: #666a7f;
+.locked-content .unlock-button-text {
+  font-size: 30rpx;
+  font-weight: 600;
+  color: #ffffff;
 }
 
-.modal-total-value {
-  font-size: 36rpx;
-  font-weight: 700;
+/* 已解锁内容样式 */
+.unlocked-content {
+  margin-top: 32rpx;
 }
 
-.buy-total {
+.unlocked-tip {
+  font-size: 26rpx;
   color: #3abf81;
+  margin-bottom: 24rpx;
+  display: block;
 }
 
-.sell-total {
-  color: #f16565;
+/* 购买弹窗样式 */
+.subscription-options {
+  margin-bottom: 32rpx;
 }
 
-.modal-footer {
+.subscription-option {
   display: flex;
-  flex-direction: column;
+  justify-content: space-between;
   align-items: center;
-}
-
-.modal-button {
-  width: 100%;
+  padding: 32rpx 24rpx;
+  border: 2rpx solid #e5e7eb;
   border-radius: 16rpx;
-  padding: 28rpx 0;
-  text-align: center;
-  margin-bottom: 24rpx;
+  margin-bottom: 20rpx;
+  transition: all 0.3s;
 }
 
-.buy-button {
-  background: #3abf81;
+.subscription-option.active {
+  border-color: #5d55e8;
+  background: #f7f8fc;
 }
 
-.sell-button {
-  background: #f16565;
+.option-info {
+  display: flex;
+  flex-direction: column;
 }
 
-.modal-button-text {
-  font-size: 30rpx;
+.option-title {
+  font-size: 28rpx;
   font-weight: 600;
-  color: #ffffff;
+  color: #222222;
+  margin-bottom: 8rpx;
 }
 
-.modal-tip {
-  font-size: 22rpx;
+.option-desc {
+  font-size: 24rpx;
   color: #9ca2b5;
 }
 
-.bottom-safe-area {
-  height: 80rpx;
+.option-price {
+  font-size: 36rpx;
+  font-weight: 700;
+  color: #f16565;
 }
 
-/* 模糊效果 */
-.blur-content {
-  filter: blur(8rpx);
-  pointer-events: none;
+/* 支付方式选择 */
+.payment-method-section {
+  margin-bottom: 32rpx;
+  padding-top: 24rpx;
+  border-top: 1rpx solid #f1f2f6;
 }
 
-/* 登录遮罩层 */
-.login-mask {
-  position: fixed;
-  top: 0;
-  left: 0;
-  right: 0;
-  bottom: 0;
-  background: rgba(0, 0, 0, 0.4);
+.payment-method-title {
+  display: block;
+  font-size: 26rpx;
+  font-weight: 600;
+  color: #222222;
+  margin-bottom: 20rpx;
+}
+
+.payment-methods {
   display: flex;
-  align-items: center;
-  justify-content: center;
-  z-index: 999;
+  flex-direction: column;
+  gap: 16rpx;
 }
 
-.login-prompt {
-  width: 560rpx;
-  max-width: 560rpx;
-  background: #ffffff;
-  border-radius: 24rpx;
-  padding: 50rpx 40rpx;
-  margin: 0 auto;
-  text-align: center;
-  box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.3);
-  box-sizing: border-box;
+.payment-method-item {
+  display: flex;
+  align-items: center;
+  padding: 24rpx 20rpx;
+  border: 2rpx solid #e5e7eb;
+  border-radius: 12rpx;
+  transition: all 0.3s;
+  position: relative;
 }
 
-.lock-icon {
-  font-size: 72rpx;
-  margin-bottom: 20rpx;
+.payment-method-item.active {
+  border-color: #5d55e8;
+  background: #f7f5ff;
 }
 
-.prompt-title {
-  display: block;
-  font-size: 32rpx;
-  font-weight: 600;
-  color: #222222;
-  margin-bottom: 12rpx;
+.payment-icon {
+  font-size: 36rpx;
+  margin-right: 16rpx;
 }
 
-.prompt-desc {
-  display: block;
-  font-size: 24rpx;
-  color: #999999;
-  line-height: 1.5;
-  margin-bottom: 32rpx;
+.payment-name {
+  font-size: 28rpx;
+  font-weight: 500;
+  color: #222222;
+  flex: 1;
 }
 
-.login-button-native {
-  width: 100%;
-  height: 80rpx;
-  background: linear-gradient(135deg, #4CAF50, #66BB6A);
+.payment-check {
+  width: 36rpx;
+  height: 36rpx;
+  background: #5d55e8;
+  border-radius: 50%;
   color: #ffffff;
-  border-radius: 40rpx;
-  font-size: 30rpx;
-  font-weight: 600;
-  box-shadow: 0 8rpx 24rpx rgba(76, 175, 80, 0.4);
+  font-size: 24rpx;
   display: flex;
   align-items: center;
   justify-content: center;
-  border: none;
-  padding: 0;
-  line-height: 80rpx;
 }
 
-.login-button-native::after {
-  border: none;
+.pay-button {
+  width: 100%;
+  background: #f16565;
+  border-radius: 16rpx;
+  padding: 28rpx 0;
+  text-align: center;
+  margin-bottom: 24rpx;
 }
 
-.button-icon {
-  font-size: 32rpx;
-  margin-right: 12rpx;
+.pay-button-text {
+  font-size: 30rpx;
+  font-weight: 600;
+  color: #ffffff;
+}
+
+.agreement-text {
+  font-size: 22rpx;
+  color: #9ca2b5;
 }
 </style>

+ 7 - 21
src/utils/api.js

@@ -44,6 +44,13 @@ const request = (options) => {
       data: options.data || {},
       header: header,
       success: (res) => {
+        // 检查是否有新token(滑动续期)
+        const newToken = res.header['New-Token'] || res.header['new-token']
+        if (newToken) {
+          console.log('检测到新token,自动续期')
+          uni.setStorageSync('user_token', newToken)
+        }
+        
         // 统一处理响应
         if (res.statusCode === 200) {
           resolve(res.data)
@@ -223,24 +230,3 @@ export const getLeaderboard = () => {
   })
 }
 
-/**
- * 获取用户积分余额
- * @returns {Promise} 返回积分信息 { totalPoints }
- */
-export const getUserPointsApi = () => {
-  return request({
-    url: '/v1/points/balance',
-    method: 'GET'
-  })
-}
-
-/**
- * 获取积分记录列表
- * @returns {Promise} 返回积分记录列表
- */
-export const getPointsRecordsApi = () => {
-  return request({
-    url: '/v1/points/records',
-    method: 'GET'
-  })
-}

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio