|
@@ -190,13 +190,43 @@ export default {
|
|
|
},
|
|
},
|
|
|
// ===== 拍照上传 =====
|
|
// ===== 拍照上传 =====
|
|
|
takePhoto() {
|
|
takePhoto() {
|
|
|
- console.log('[report-upload] takePhoto clicked')
|
|
|
|
|
- this.ensureAgreed(true)
|
|
|
|
|
|
|
+ console.log('[report-upload] takePhoto clicked, agreed=', this.agreedToTerms)
|
|
|
|
|
+ if (this.agreedToTerms) {
|
|
|
|
|
+ this.startPick(true)
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: '数据使用声明',
|
|
|
|
|
+ content: '上传报告即代表您同意平台使用本报告数据进行分析,为您提供个性化健康解决方案;未经您授权,平台不会以任何形式将您的报告内容提供给其他任何个人或机构。点击「同意并继续」即表示您已阅读并同意。',
|
|
|
|
|
+ confirmText: '同意并继续',
|
|
|
|
|
+ cancelText: '暂不',
|
|
|
|
|
+ success: (res) => {
|
|
|
|
|
+ if (res.confirm) {
|
|
|
|
|
+ this.agreedToTerms = true
|
|
|
|
|
+ this.startPick(true)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
// ===== 文件上传 =====
|
|
// ===== 文件上传 =====
|
|
|
pickFile() {
|
|
pickFile() {
|
|
|
- console.log('[report-upload] pickFile clicked')
|
|
|
|
|
- this.ensureAgreed(false)
|
|
|
|
|
|
|
+ console.log('[report-upload] pickFile clicked, agreed=', this.agreedToTerms)
|
|
|
|
|
+ if (this.agreedToTerms) {
|
|
|
|
|
+ this.startPick(false)
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: '数据使用声明',
|
|
|
|
|
+ content: '上传报告即代表您同意平台使用本报告数据进行分析,为您提供个性化健康解决方案;未经您授权,平台不会以任何形式将您的报告内容提供给其他任何个人或机构。点击「同意并继续」即表示您已阅读并同意。',
|
|
|
|
|
+ confirmText: '同意并继续',
|
|
|
|
|
+ cancelText: '暂不',
|
|
|
|
|
+ success: (res) => {
|
|
|
|
|
+ if (res.confirm) {
|
|
|
|
|
+ this.agreedToTerms = true
|
|
|
|
|
+ this.startPick(false)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
// 上传文件 → 自动跳转确认页(确认页按 draftId 触发解析并自动刷新显示结果)
|
|
// 上传文件 → 自动跳转确认页(确认页按 draftId 触发解析并自动刷新显示结果)
|
|
|
uploadAndGoConfirm(filePath, type) {
|
|
uploadAndGoConfirm(filePath, type) {
|