Преглед на файлове

fix(patient-family): 注释掉已移除的今日提醒接口调用,避免404错误

mcbaiyun преди 2 седмици
родител
ревизия
fbc5aea5ea
променени са 1 файла, в които са добавени 6 реда и са изтрити 15 реда
  1. 6 15
      src/pages/patient-family/index/index.vue

+ 6 - 15
src/pages/patient-family/index/index.vue

@@ -250,21 +250,11 @@ const fetchUserInfo = async () => {
   }
   }
 }
 }
 
 
+// 已移除相关功能:服务端删除了 `/family/today_reminders` 接口,
+// 原调用会导致 404 错误。保留空实现以便未来回滚或替换实现。
 const fetchTodayReminders = async () => {
 const fetchTodayReminders = async () => {
-  try {
-    const token = uni.getStorageSync('token')
-    if (!token) return
-    const response = await request({
-      url: 'https://wx.baiyun.work/family/today_reminders',
-      method: 'GET',
-    })
-    const resp = response.data as any
-    if (resp && resp.code === 200 && resp.data) {
-      todayReminders.value = resp.data
-    }
-  } catch (err) {
-    console.error('Fetch today reminders error:', err)
-  }
+  // noop: endpoint removed on server side
+  return
 }
 }
 
 
 // 获取未读消息数量
 // 获取未读消息数量
@@ -363,7 +353,8 @@ onShow(() => {
     uni.reLaunch({ url: '/pages/public/login/index' })
     uni.reLaunch({ url: '/pages/public/login/index' })
   } else {
   } else {
     fetchUserInfo()
     fetchUserInfo()
-    fetchTodayReminders()
+    // 已移除相关功能,原接口 `GET /family/today_reminders` 返回 404,注释掉调用以避免错误
+    // fetchTodayReminders()
     fetchNews()
     fetchNews()
     fetchUnreadMessageCount()
     fetchUnreadMessageCount()
     checkAndShowPopupMessages()
     checkAndShowPopupMessages()