Selaa lähdekoodia

feat(frontend): 报告入口切换到统一详情页

Xiaogang Liao 1 kuukausi sitten
vanhempi
sitoutus
709aa00485

+ 5 - 1
cfc-frontend/pages/health/report-confirm.vue

@@ -813,7 +813,11 @@ export default {
           var reportType = res.data && res.data.reportType || ''
           setTimeout(function() {
             if (reportId) {
-              uni.redirectTo({ url: '/pages/health/health-plan-summary?initialReportIds=' + reportId + '&subjectId=' + (postData.subjectId || '') })
+              if (reportType === 'gut_flora') {
+                uni.redirectTo({ url: '/pages/health/report-detail?reportType=gut_flora&reportId=' + reportId })
+              } else {
+                uni.redirectTo({ url: '/pages/health/health-plan-summary?initialReportIds=' + reportId + '&subjectId=' + (postData.subjectId || '') })
+              }
             } else {
               uni.navigateBack()
             }

+ 4 - 2
cfc-frontend/pages/health/report-list.vue

@@ -78,12 +78,14 @@ export default {
     },
 	goToDetail(reportId, reportType) {
 		var detailPages = {
-		'gut_flora': '/pages/health/gut-flora-detail',
+		'gut_flora': '/pages/health/report-detail?reportType=gut_flora',
+		'dan': '/pages/health/report-detail?reportType=dan',
 		'physical_exam': '/pages/health/physical-exam-detail',
 		'tongue': '/pages/health/tongue-index'
 	  }
 	  var url = detailPages[reportType] || '/pages/body/health-report'
-	  uni.navigateTo({ url: url + '?reportId=' + reportId })
+	  var sep = url.indexOf('?') >= 0 ? '&' : '?'
+	  uni.navigateTo({ url: url + sep + 'reportId=' + reportId })
 	},
     goToUpload() {
       uni.navigateTo({ url: '/pages/health/report-upload' })

+ 2 - 1
cfc-frontend/pages/mind-detail/index.vue

@@ -817,7 +817,8 @@ components: { TabTransition, PageBanner, RadarChart, FamilyEnergyBar, PsychCrisi
       uni.navigateTo({ url: '/pages/dan-assessment/report-upload' })
     },
     viewDanReport: function(report) {
-      uni.navigateTo({ url: '/pages/dan-assessment/report-upload?draftId=' + report.id })
+      var reportId = report.sourceReportId || report.id
+      uni.navigateTo({ url: '/pages/health/report-detail?reportType=dan&reportId=' + reportId })
     },
     formatDate: function(dateStr) {
       if (!dateStr) return ''

+ 2 - 1
cfc-frontend/pages/wisdom-detail/index.vue

@@ -367,7 +367,8 @@ export default {
       uni.navigateTo({ url: '/pages/dan-assessment/report-upload' })
     },
     viewDanReport: function(report) {
-      uni.navigateTo({ url: '/pages/dan-assessment/report-upload?draftId=' + report.id })
+      var reportId = report.sourceReportId || report.id
+      uni.navigateTo({ url: '/pages/health/report-detail?reportType=dan&reportId=' + reportId })
     },
     formatDate: function(dateStr) {
       if (!dateStr) return ''