Zhangbw пре 3 месеци
родитељ
комит
ae739040a2

+ 0 - 2
dist/dev/mp-weixin/pages/index/index.js

@@ -17,11 +17,9 @@ const _sfc_main = {
     common_vendor.onMounted(() => {
       isLoggedIn.value = utils_auth.isLoggedIn();
       console.log("[首页] 登录状态:", isLoggedIn.value);
-      console.log("[首页] Token:", common_vendor.index.getStorageSync("user_token"));
     });
     common_vendor.onShow(() => {
       isLoggedIn.value = utils_auth.isLoggedIn();
-      console.log("[首页] 登录状态:", isLoggedIn.value);
       common_vendor.index.setNavigationBarTitle({ title: "量化交易大师" });
     });
     const handleSearchClick = async () => {

+ 4 - 9
dist/dev/mp-weixin/pages/pool/pool.js

@@ -20,7 +20,6 @@ const _sfc_main = {
     };
     const checkLogin = () => {
       isLoggedIn.value = utils_auth.isLoggedIn();
-      console.log("[超短池] 登录状态:", isLoggedIn.value);
       return isLoggedIn.value;
     };
     const checkPurchaseStatus = () => {
@@ -48,9 +47,7 @@ const _sfc_main = {
       }
     };
     const showPurchaseModal = () => {
-      console.log("点击立即解锁");
       if (!checkLogin()) {
-        console.log("未登录,跳转到登录页");
         common_vendor.index.showModal({
           title: "登录提示",
           content: "此功能需要登录后使用,是否前往登录?",
@@ -66,7 +63,6 @@ const _sfc_main = {
         });
         return;
       }
-      console.log("已登录,显示购买弹窗");
       showModal.value = true;
     };
     const closePurchaseModal = () => {
@@ -92,11 +88,9 @@ const _sfc_main = {
     };
     const onStartMonthChange = (e) => {
       startMonth.value = e.detail.value;
-      console.log("[超短池] 选择开始月份:", startMonth.value);
     };
     const onEndMonthChange = (e) => {
       endMonth.value = e.detail.value;
-      console.log("[超短池] 选择结束月份:", endMonth.value);
     };
     const onHistorySearch = () => {
       if (!startMonth.value || !endMonth.value) {
@@ -113,7 +107,6 @@ const _sfc_main = {
         });
         return;
       }
-      console.log("[超短池] 查询历史数据区间:", startMonth.value, "至", endMonth.value);
       common_vendor.index.showToast({
         title: `查询${formatMonth(startMonth.value)}至${formatMonth(endMonth.value)}`,
         icon: "none",
@@ -121,11 +114,13 @@ const _sfc_main = {
       });
     };
     common_vendor.onLoad(() => {
-      checkLogin();
+      const loginStatus = checkLogin();
+      console.log("[超短池] 登录状态:", loginStatus);
       checkPurchaseStatus();
     });
     common_vendor.onShow(() => {
-      checkLogin();
+      const loginStatus = checkLogin();
+      console.log("[超短池] 登录状态:", loginStatus);
       checkPurchaseStatus();
       common_vendor.index.setNavigationBarTitle({ title: "量化交易大师" });
     });

+ 2 - 1
dist/dev/mp-weixin/pages/profile/edit.js

@@ -13,7 +13,8 @@ const _sfc_main = {
     };
   },
   onLoad() {
-    console.log("[编辑资料] 页面加载");
+    const loginStatus = utils_auth.isLoggedIn();
+    console.log("[编辑资料] 登录状态:", loginStatus);
     this.loadUserInfo();
   },
   onShow() {

+ 0 - 3
dist/dev/mp-weixin/pages/rank/rank.js

@@ -126,13 +126,10 @@ const _sfc_main = {
     common_vendor.onLoad(() => {
       isLoggedIn.value = utils_auth.isLoggedIn();
       console.log("[我的股票] 登录状态:", isLoggedIn.value);
-      console.log("[我的股票] Token:", common_vendor.index.getStorageSync("user_token"));
       loadMyStocks();
     });
     common_vendor.onShow(() => {
       isLoggedIn.value = utils_auth.isLoggedIn();
-      console.log("[我的股票] 登录状态:", isLoggedIn.value);
-      console.log("[我的股票] Token:", common_vendor.index.getStorageSync("user_token"));
       loadMyStocks();
       common_vendor.index.setNavigationBarTitle({ title: "量化交易大师" });
       if (isLoggedIn.value && myStocks.value.length > 0) {

+ 0 - 7
dist/dev/mp-weixin/pages/strong/strong.js

@@ -51,9 +51,7 @@ const _sfc_main = {
       }
     };
     const showPurchaseModal = () => {
-      console.log("点击立即解锁");
       if (!utils_auth.isLoggedIn()) {
-        console.log("未登录,跳转到登录页");
         common_vendor.index.showModal({
           title: "登录提示",
           content: "此功能需要登录后使用,是否前往登录?",
@@ -69,7 +67,6 @@ const _sfc_main = {
         });
         return;
       }
-      console.log("已登录,显示购买弹窗");
       showModal.value = true;
     };
     const closePurchaseModal = () => {
@@ -93,11 +90,9 @@ const _sfc_main = {
     };
     const onStartMonthChange = (e) => {
       startMonth.value = e.detail.value;
-      console.log("[强势池] 选择开始月份:", startMonth.value);
     };
     const onEndMonthChange = (e) => {
       endMonth.value = e.detail.value;
-      console.log("[强势池] 选择结束月份:", endMonth.value);
     };
     const onHistorySearch = () => {
       if (!startMonth.value || !endMonth.value) {
@@ -114,7 +109,6 @@ const _sfc_main = {
         });
         return;
       }
-      console.log("[强势池] 查询历史数据区间:", startMonth.value, "至", endMonth.value);
       common_vendor.index.showToast({
         title: `查询${formatMonth(startMonth.value)}至${formatMonth(endMonth.value)}`,
         icon: "none",
@@ -137,7 +131,6 @@ const _sfc_main = {
         let changePercent = null;
         try {
           const quoteRes = await utils_api.getStockQuotes(stock.code);
-          console.log("[强势池] 行情数据:", quoteRes);
           if (quoteRes.code === 200 && quoteRes.data && quoteRes.data.length > 0) {
             const quoteData = quoteRes.data[0];
             priceChange = quoteData.priceChange;

+ 0 - 2
src/pages/index/index.vue

@@ -148,7 +148,6 @@ let timer = null
 onMounted(() => {
   isLoggedIn.value = checkLoginStatus()
   console.log('[首页] 登录状态:', isLoggedIn.value)
-  console.log('[首页] Token:', uni.getStorageSync('user_token'))
 })
 
 /**
@@ -156,7 +155,6 @@ onMounted(() => {
  */
 onShow(() => {
   isLoggedIn.value = checkLoginStatus()
-  console.log('[首页] 登录状态:', isLoggedIn.value)
   // 设置导航栏标题
   uni.setNavigationBarTitle({ title: '量化交易大师' })
 })

+ 4 - 10
src/pages/pool/pool.vue

@@ -172,7 +172,6 @@ const formatMonth = (monthStr) => {
 // 检查登录状态
 const checkLogin = () => {
   isLoggedIn.value = checkLoginStatus()
-  console.log('[超短池] 登录状态:', isLoggedIn.value)
   return isLoggedIn.value
 }
 
@@ -207,11 +206,8 @@ const checkPurchaseStatus = () => {
 
 // 显示购买弹窗(需要登录)
 const showPurchaseModal = () => {
-  console.log('点击立即解锁')
-  
   // 检查登录状态
   if (!checkLogin()) {
-    console.log('未登录,跳转到登录页')
     uni.showModal({
       title: '登录提示',
       content: '此功能需要登录后使用,是否前往登录?',
@@ -228,7 +224,6 @@ const showPurchaseModal = () => {
     return
   }
   
-  console.log('已登录,显示购买弹窗')
   showModal.value = true
 }
 
@@ -269,13 +264,11 @@ const handlePurchase = () => {
 // 开始月份选择变化
 const onStartMonthChange = (e) => {
   startMonth.value = e.detail.value
-  console.log('[超短池] 选择开始月份:', startMonth.value)
 }
 
 // 结束月份选择变化
 const onEndMonthChange = (e) => {
   endMonth.value = e.detail.value
-  console.log('[超短池] 选择结束月份:', endMonth.value)
 }
 
 // 历史查询
@@ -297,7 +290,6 @@ const onHistorySearch = () => {
     return
   }
   
-  console.log('[超短池] 查询历史数据区间:', startMonth.value, '至', endMonth.value)
   uni.showToast({
     title: `查询${formatMonth(startMonth.value)}至${formatMonth(endMonth.value)}`,
     icon: 'none',
@@ -309,13 +301,15 @@ const onHistorySearch = () => {
 
 // 使用uni-app生命周期钩子
 onLoad(() => {
-  checkLogin()
+  const loginStatus = checkLogin()
+  console.log('[超短池] 登录状态:', loginStatus)
   checkPurchaseStatus()
 })
 
 onShow(() => {
   // 每次页面显示时都检查登录状态和购买状态
-  checkLogin()
+  const loginStatus = checkLogin()
+  console.log('[超短池] 登录状态:', loginStatus)
   checkPurchaseStatus()
   // 设置导航栏标题
   uni.setNavigationBarTitle({ title: '量化交易大师' })

+ 3 - 2
src/pages/profile/edit.vue

@@ -41,7 +41,7 @@
 </template>
 
 <script>
-import { getUserInfo, setUserInfo } from '@/utils/auth.js'
+import { getUserInfo, setUserInfo, isLoggedIn as checkLoginStatus } from '@/utils/auth.js'
 import { updateUserProfile } from '@/utils/api.js'
 
 export default {
@@ -56,7 +56,8 @@ export default {
   },
 
   onLoad() {
-    console.log('[编辑资料] 页面加载')
+    const loginStatus = checkLoginStatus()
+    console.log('[编辑资料] 登录状态:', loginStatus)
     this.loadUserInfo()
   },
 

+ 0 - 3
src/pages/rank/rank.vue

@@ -241,14 +241,11 @@ const formatDate = (timestamp) => {
 onLoad(() => {
   isLoggedIn.value = checkLoginStatus()
   console.log('[我的股票] 登录状态:', isLoggedIn.value)
-  console.log('[我的股票] Token:', uni.getStorageSync('user_token'))
   loadMyStocks()
 })
 
 onShow(() => {
   isLoggedIn.value = checkLoginStatus()
-  console.log('[我的股票] 登录状态:', isLoggedIn.value)
-  console.log('[我的股票] Token:', uni.getStorageSync('user_token'))
   loadMyStocks()
   uni.setNavigationBarTitle({ title: '量化交易大师' })
   

+ 0 - 8
src/pages/strong/strong.vue

@@ -208,11 +208,8 @@ const checkPurchaseStatus = () => {
 
 // 显示购买弹窗(需要登录)
 const showPurchaseModal = () => {
-  console.log('点击立即解锁')
-  
   // 检查登录状态
   if (!checkLoginStatus()) {
-    console.log('未登录,跳转到登录页')
     uni.showModal({
       title: '登录提示',
       content: '此功能需要登录后使用,是否前往登录?',
@@ -229,7 +226,6 @@ const showPurchaseModal = () => {
     return
   }
   
-  console.log('已登录,显示购买弹窗')
   showModal.value = true
 }
 
@@ -275,13 +271,11 @@ const goToLogin = () => {
 // 开始月份选择变化
 const onStartMonthChange = (e) => {
   startMonth.value = e.detail.value
-  console.log('[强势池] 选择开始月份:', startMonth.value)
 }
 
 // 结束月份选择变化
 const onEndMonthChange = (e) => {
   endMonth.value = e.detail.value
-  console.log('[强势池] 选择结束月份:', endMonth.value)
 }
 
 // 历史查询
@@ -303,7 +297,6 @@ const onHistorySearch = () => {
     return
   }
   
-  console.log('[强势池] 查询历史数据区间:', startMonth.value, '至', endMonth.value)
   uni.showToast({
     title: `查询${formatMonth(startMonth.value)}至${formatMonth(endMonth.value)}`,
     icon: 'none',
@@ -337,7 +330,6 @@ const addToMyStocks = async (stock) => {
     let changePercent = null
     try {
       const quoteRes = await getStockQuotes(stock.code)
-      console.log('[强势池] 行情数据:', quoteRes)
       
       if (quoteRes.code === 200 && quoteRes.data && quoteRes.data.length > 0) {
         const quoteData = quoteRes.data[0]