|
@@ -558,12 +558,15 @@ const saveReminders = async () => {
|
|
|
|
|
|
|
|
// 同时也保存到本地存储以防万一
|
|
// 同时也保存到本地存储以防万一
|
|
|
try {
|
|
try {
|
|
|
- const remindersToSave = [
|
|
|
|
|
- { title: '测量血压数据', enabled: bloodPressureReminder.value.enabled, times: bloodPressureReminder.value.times },
|
|
|
|
|
- { title: '测量血糖数据', enabled: bloodSugarReminder.value.enabled, times: bloodSugarReminder.value.times },
|
|
|
|
|
- { title: '测量心率数据', enabled: heartRateReminder.value.enabled, times: heartRateReminder.value.times }
|
|
|
|
|
- ]
|
|
|
|
|
- ;(uni as any).setStorageSync('reminders', remindersToSave)
|
|
|
|
|
|
|
+ const remindersToSave = {
|
|
|
|
|
+ bloodPressureReminder: bloodPressureReminder.value,
|
|
|
|
|
+ bloodSugarReminder: bloodSugarReminder.value,
|
|
|
|
|
+ heartRateReminder: heartRateReminder.value,
|
|
|
|
|
+ medicationReminder: medicationReminder.value,
|
|
|
|
|
+ notificationsEnabled: notificationsEnabled.value,
|
|
|
|
|
+ subscriptionAvailable: subscriptionAvailable.value
|
|
|
|
|
+ }
|
|
|
|
|
+ ;(uni as any).setStorageSync('patientReminders', remindersToSave)
|
|
|
;(uni as any).setStorageSync('notificationsEnabled', notificationsEnabled.value)
|
|
;(uni as any).setStorageSync('notificationsEnabled', notificationsEnabled.value)
|
|
|
} catch (e) {
|
|
} catch (e) {
|
|
|
console.error('保存提醒设置到本地存储失败:', e)
|
|
console.error('保存提醒设置到本地存储失败:', e)
|