Quellcode durchsuchen

fix(task): 所有联动类型任务点击跳转联动页而非直接完成

昨日提交的 76991eb3e 仅覆盖打卡类三个 actionType,其余 six 类(minigame/
focus/survey/article/activity/cart/order)在 startRequired=0 的普通任务场景
下点击「开始游戏/去填写/去购物」仍会直接调 completeTask,绕过联动页、
不回写任何联动结果。将三类合并为一个统一分支,按 actionType 枚举列表
统一路由至 navigateByAction,保持与 startRequired=1 路径一致行为。
iwt vor 6 Tagen
Ursprung
Commit
ae321847ef
1 geänderte Dateien mit 4 neuen und 3 gelöschten Zeilen
  1. 4 3
      cfc-frontend/pages/tasks/tasks.vue

+ 4 - 3
cfc-frontend/pages/tasks/tasks.vue

@@ -428,9 +428,10 @@ export default {
         this.showInputModal = true
         return
       }
-      // 打卡/联动类任务(含每日进度型打卡任务):跳转打卡页执行,
-      // 打卡提交后由后端回写(一次性任务直接完成 / 每日任务累计进度)
-      if (task.actionType === 'diet' || task.actionType === 'sleep' || task.actionType === 'exercise') {
+      // 有联动页面的任务(actionType 明确指向某一功能页):一律跳转执行,
+      // 由各联动页/打卡页提交时回写(一次性任务直接完成 / 每日进度任务累计进度)
+      var at = task.actionType
+      if (at && ['minigame', 'focus', 'survey', 'article', 'activity', 'cart', 'order', 'diet', 'sleep', 'exercise'].indexOf(at) >= 0) {
         this.navigateByAction(task)
         return
       }