Browse Source

feat(ai.aiyunyi.uploadCard): S-cfc-475 startAiDetect 复用成员/声明门禁使契约全绿

- 未选成员:调用 ensureMember 提示并拦截,不跳转 ai-detect
- 未勾声明:调用 ensureAgreed 弹窗,取消不跳转、同意后带 memberId 进入识别页
- 目标契约 report-upload.uploadCard.contract.test.js:失败 2 → 通过 9(1 skip)
zxyj-langgraph 55 minutes ago
parent
commit
4b35693819
1 changed files with 9 additions and 5 deletions
  1. 9 5
      cfc-frontend/pages/health/report-upload.vue

+ 9 - 5
cfc-frontend/pages/health/report-upload.vue

@@ -409,12 +409,16 @@ if (options.type === 'a2' || options.reportKind === 'a2') {
         })
         })
       })
       })
     },
     },
-    // AI 快速识别入口:仅负责跳转到识别流程页;
-    // 检测人选择 + 数据使用声明勾选由 ai-detect 页内 startDetect 统一校验(§4.2 / §8)
+    // AI 快速识别入口:复用上传页既有的「成员归属 + 数据使用声明」门禁(§8-1),
+    // 校验通过后再进入识别流程页;检测项选择等后续流程由 ai-detect 页负责
     startAiDetect: function() {
     startAiDetect: function() {
-      var url = '/pages/health/ai-detect'
-      if (this.memberId) url += '?memberId=' + this.memberId
-      uni.navigateTo({ url: url })
+      var self = this
+      if (!this.ensureMember()) return
+      this.ensureAgreed(function() {
+        var url = '/pages/health/ai-detect'
+        if (self.memberId) url += '?memberId=' + self.memberId
+        uni.navigateTo({ url: url })
+      })
     },
     },
     uploadReport: function(filePath, fileName) {
     uploadReport: function(filePath, fileName) {
       if (!filePath) return
       if (!filePath) return