ソースを参照

Merge branch 'dev/v1.0.34_tsz' of jianyu/web into feature/v1.0.34

汤世哲 1 年間 前
コミット
a65e690ebb
1 ファイル変更21 行追加8 行削除
  1. 21 8
      apps/mobile/src/views/tabbar/Subscribe.vue

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

@@ -529,7 +529,8 @@ import {
   checkHasReportData,
   ajaxCanBiaoStatus,
   ajaxCanBiaoAction,
-  getUserSubscribeKeywords
+  getUserSubscribeKeywords,
+  setUserSubscribeListVisited
 } from '@/api/modules'
 import { leadGetDate } from '@/api/modules/leadGeneration'
 
@@ -2007,14 +2008,26 @@ export default {
         app: `/jyapp/article/content/${_id}.html?${qs.stringify(query)}`
       }
       this.saveState()
-      if (!this.isLogin) {
-        return openLinkOfOther(LINKS.APP登录页.app, {
-          query: {
-            url: inWX ? targetMap.wx : targetMap.app
-          }
-        })
+      this.setSubReadStatus(item, () => {
+        if (!this.isLogin) {
+          return openLinkOfOther(LINKS.APP登录页.app, {
+            query: {
+              url: inWX ? targetMap.wx : targetMap.app
+            }
+          })
+        }
+        openAppOrWxPage(targetMap)
+      })
+    },
+    // 设置标讯已读状态
+    async setSubReadStatus (item, callback) {
+      const { error_code: code } = await setUserSubscribeListVisited(vtMap[this.vSwitch], {
+        vsid: item.ca_index,
+        isEnt: this.subscribeTypeActive === 'ent'
+      })
+      if (code === 0) {
+        callback && callback()
       }
-      openAppOrWxPage(targetMap)
     },
     // 无权限弹窗
     async onNoPower(type = '') {