Sfoglia il codice sorgente

fix: 修复不活跃用户已读未读接口异常导致不能正常跳转的问题

cuiyalong 1 anno fa
parent
commit
8a8ba45776

+ 8 - 4
apps/bigmember_pc/src/components/push-list/PushList.vue

@@ -957,10 +957,14 @@ export default {
       const { _id, matchKeys, ca_index } = item
       item.visited = true
       if (this.vt !== 'q') {
-        await setSubscribeInfoRead(this.vt, {
-          vsid: ca_index,
-          isEnt: this.$route.query?.vt === 'q'
-        })
+        try {
+          await setSubscribeInfoRead(this.vt, {
+            vsid: ca_index,
+            isEnt: this.$route.query?.vt === 'q'
+          })
+        } catch (error) {
+          console.log(error)
+        }
       }
       this.pathVisiting(
         this.createPathItem('/article/content/*.html', `id=${_id}`)

+ 8 - 5
apps/mobile/src/views/tabbar/Subscribe.vue

@@ -2021,11 +2021,14 @@ export default {
     },
     // 设置标讯已读状态
     async setSubReadStatus (item, callback) {
-      const { error_code: code } = await setUserSubscribeListVisited(this.restfulApiUserTypeWitchVSwitch, {
-        vsid: item.ca_index,
-        isEnt: this.subscribeTypeActive === 'ent'
-      })
-      if (code === 0) {
+      try {
+        await setUserSubscribeListVisited(this.restfulApiUserTypeWitchVSwitch, {
+          vsid: item.ca_index,
+          isEnt: this.subscribeTypeActive === 'ent'
+        })
+      } catch (error) {
+        console.log(error)
+      } finally {
         callback && callback()
       }
     },