|
|
@@ -13,9 +13,6 @@
|
|
|
<text class="tip-text">上传体检/菌群报告、认知测评、心理测评或情绪打卡记录,为您生成个性化成长方案</text>
|
|
|
</view>
|
|
|
|
|
|
- <!-- DEBUG: 请截图此行是否存在,判断文件是否生效 -->
|
|
|
- <view style="background:#f00;padding:10rpx;"><text style="color:#fff;font-size:28rpx;">DEBUG-v2: 声明弹窗已更新 {{agreedToTerms}}</text></view>
|
|
|
-
|
|
|
<!-- 表单 -->
|
|
|
<view class="form-section">
|
|
|
<!-- 上传方式:并排卡片 -->
|
|
|
@@ -128,29 +125,23 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
onLoad: function(options) {
|
|
|
- console.log('[report-upload] onLoad', options)
|
|
|
this.memberId = options.memberId ? parseInt(options.memberId) : null
|
|
|
},
|
|
|
- onReady() {
|
|
|
- console.log('[report-upload] onReady, methods:', Object.keys(this.$options.methods))
|
|
|
- },
|
|
|
methods: {
|
|
|
// 切换同意声明
|
|
|
toggleAgree() {
|
|
|
- console.log('[report-upload] toggleAgree called, current=', this.agreedToTerms)
|
|
|
this.agreedToTerms = !this.agreedToTerms
|
|
|
},
|
|
|
// 未勾选声明时弹窗确认
|
|
|
ensureAgreed(isPhoto) {
|
|
|
- console.log('[report-upload] ensureAgree called, isPhoto=', isPhoto, 'agreed=', this.agreedToTerms)
|
|
|
if (this.agreedToTerms) {
|
|
|
this.startPick(isPhoto)
|
|
|
return
|
|
|
}
|
|
|
uni.showModal({
|
|
|
title: '数据使用声明',
|
|
|
- content: '上传报告即代表您同意平台使用本报告数据进行分析,为您提供个性化健康解决方案;未经您授权,平台不会以任何形式将您的报告内容提供给其他任何个人或机构。点击「同意并继续」即表示您已阅读并同意。',
|
|
|
- confirmText: '同意并继续',
|
|
|
+ content: '上传报告即代表您同意平台使用本报告数据进行分析,为您提供个性化健康解决方案;未经您授权,平台不会以任何形式将您的报告内容提供给其他任何个人或机构。点击「同意继续」即表示您已阅读并同意。',
|
|
|
+ confirmText: '同意继续',
|
|
|
cancelText: '暂不',
|
|
|
success: (res) => {
|
|
|
if (res.confirm) {
|
|
|
@@ -190,15 +181,14 @@ export default {
|
|
|
},
|
|
|
// ===== 拍照上传 =====
|
|
|
takePhoto() {
|
|
|
- console.log('[report-upload] takePhoto clicked, agreed=', this.agreedToTerms)
|
|
|
if (this.agreedToTerms) {
|
|
|
this.startPick(true)
|
|
|
return
|
|
|
}
|
|
|
uni.showModal({
|
|
|
title: '数据使用声明',
|
|
|
- content: '上传报告即代表您同意平台使用本报告数据进行分析,为您提供个性化健康解决方案;未经您授权,平台不会以任何形式将您的报告内容提供给其他任何个人或机构。点击「同意并继续」即表示您已阅读并同意。',
|
|
|
- confirmText: '同意并继续',
|
|
|
+ content: '上传报告即代表您同意平台使用本报告数据进行分析,为您提供个性化健康解决方案;未经您授权,平台不会以任何形式将您的报告内容提供给其他任何个人或机构。点击「同意继续」即表示您已阅读并同意。',
|
|
|
+ confirmText: '同意继续',
|
|
|
cancelText: '暂不',
|
|
|
success: (res) => {
|
|
|
if (res.confirm) {
|
|
|
@@ -210,36 +200,22 @@ export default {
|
|
|
},
|
|
|
// ===== 文件上传 =====
|
|
|
pickFile() {
|
|
|
- console.log('[report-upload] pickFile clicked, agreed=', this.agreedToTerms)
|
|
|
if (this.agreedToTerms) {
|
|
|
this.startPick(false)
|
|
|
return
|
|
|
}
|
|
|
- console.log('[report-upload] about to call uni.showModal')
|
|
|
- try {
|
|
|
- uni.showModal({
|
|
|
- title: '数据使用声明',
|
|
|
- content: '上传报告即代表您同意平台使用本报告数据进行分析,为您提供个性化健康解决方案;未经您授权,平台不会以任何形式将您的报告内容提供给其他任何个人或机构。点击「同意并继续」即表示您已阅读并同意。',
|
|
|
- confirmText: '同意并继续',
|
|
|
- cancelText: '暂不',
|
|
|
- success: (res) => {
|
|
|
- console.log('[report-upload] modal success:', res)
|
|
|
- if (res.confirm) {
|
|
|
- this.agreedToTerms = true
|
|
|
- this.startPick(false)
|
|
|
- }
|
|
|
- },
|
|
|
- fail: (err) => {
|
|
|
- console.log('[report-upload] modal fail:', err)
|
|
|
- },
|
|
|
- complete: () => {
|
|
|
- console.log('[report-upload] modal complete')
|
|
|
+ uni.showModal({
|
|
|
+ title: '数据使用声明',
|
|
|
+ content: '上传报告即代表您同意平台使用本报告数据进行分析,为您提供个性化健康解决方案;未经您授权,平台不会以任何形式将您的报告内容提供给其他任何个人或机构。点击「同意继续」即表示您已阅读并同意。',
|
|
|
+ confirmText: '同意继续',
|
|
|
+ cancelText: '暂不',
|
|
|
+ success: (res) => {
|
|
|
+ if (res.confirm) {
|
|
|
+ this.agreedToTerms = true
|
|
|
+ this.startPick(false)
|
|
|
}
|
|
|
- })
|
|
|
- console.log('[report-upload] uni.showModal called without throwing')
|
|
|
- } catch (e) {
|
|
|
- console.log('[report-upload] uni.showModal THREW:', e.message, e.stack)
|
|
|
- }
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
// 上传文件 → 自动跳转确认页(确认页按 draftId 触发解析并自动刷新显示结果)
|
|
|
uploadAndGoConfirm(filePath, type) {
|