report-upload.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860
  1. <template>
  2. <view class="upload-container">
  3. <!-- 说明提示 -->
  4. <view class="tip-banner">
  5. <text class="tip-icon">📋</text>
  6. <text class="tip-text">{{ tipText }}</text>
  7. </view>
  8. <!-- 表单 -->
  9. <view class="form-section">
  10. <!-- 步骤1:报告大类 -->
  11. <view class="form-item category-box">
  12. <text class="form-label">选择报告类型</text>
  13. <view class="category-row">
  14. <view
  15. :class="['category-card', reportKind === 'health' ? 'category-active' : '']"
  16. @click="selectReportKind('health')">
  17. <text class="category-icon">🏥</text>
  18. <text class="category-title">健康报告</text>
  19. <text class="category-desc">体检 / 菌群 / 舌诊 / 体脂</text>
  20. </view>
  21. <view
  22. :class="['category-card', reportKind === 'dan' ? 'category-active category-dan' : '']"
  23. @click="selectReportKind('dan')">
  24. <text class="category-icon">🧠</text>
  25. <text class="category-title">DAN测评</text>
  26. <text class="category-desc">A2 / B4 等成长测评</text>
  27. </view>
  28. </view>
  29. </view>
  30. <!-- 步骤2:DAN 维度(仅 DAN) -->
  31. <view class="form-item" v-if="reportKind === 'dan'">
  32. <text class="form-label">选择 DAN 测评维度</text>
  33. <view class="dim-grid">
  34. <view
  35. v-for="item in danDimensions"
  36. :key="item.code"
  37. :class="['dim-chip', danDimension === item.code ? 'dim-active' : '']"
  38. @click="selectDanDimension(item.code)">
  39. <text class="dim-chip-text">{{ item.label }}</text>
  40. </view>
  41. </view>
  42. </view>
  43. <!-- 上传方式 -->
  44. <view class="upload-methods" v-if="reportKind">
  45. <view class="upload-card card-file" @click="pickFile">
  46. <view class="upload-card-icon">📄</view>
  47. <text class="upload-card-title">从聊天选择文件</text>
  48. <text class="upload-card-desc" v-if="reportKind === 'health'">PDF / 图片<br/>体检、菌群等健康报告</text>
  49. <text class="upload-card-desc" v-else>PDF<br/>DAN 测评报告(推荐)</text>
  50. </view>
  51. <view class="upload-card card-photo" @click="takePhoto" v-if="reportKind === 'health'">
  52. <view class="upload-card-icon">📷</view>
  53. <text class="upload-card-title">拍照上传</text>
  54. <text class="upload-card-desc">拍摄舌象照片<br/>或单页纸质报告</text>
  55. </view>
  56. <view class="upload-card card-photo" @click="goBodyFatScale" v-if="reportKind === 'health'">
  57. <view class="upload-card-icon">⚖️</view>
  58. <text class="upload-card-title">体脂秤</text>
  59. <text class="upload-card-desc">拍摄体脂秤<br/>显示屏照片</text>
  60. </view>
  61. </view>
  62. <view class="kind-hint" v-if="!reportKind">
  63. <text class="kind-hint-text">请先选择「健康报告」或「DAN测评」,再上传文件</text>
  64. </view>
  65. <!-- 责任声明 -->
  66. <view class="form-item disclaimer-box">
  67. <view class="disclaimer-check" @click="toggleAgree">
  68. <view class="disclaimer-checkbox" :class="{ 'disclaimer-checked': agreedToTerms }">
  69. <text class="disclaimer-checkmark" v-if="agreedToTerms">✓</text>
  70. </view>
  71. <text class="disclaimer-label">我已阅读并同意以下声明</text>
  72. </view>
  73. <view class="disclaimer-content">
  74. <text class="disclaimer-text">我同意平台使用本报告数据进行分析,为我提供个性化健康解决方案;未经我授权,平台不会以任何形式将我的报告内容提供给其他任何个人或机构。</text>
  75. </view>
  76. </view>
  77. <!-- 上传中 -->
  78. <view class="form-item" v-if="uploading">
  79. <text class="form-label">上传中...</text>
  80. <view class="analyzing-status">
  81. <text class="analyzing-text">{{ uploadingText }}</text>
  82. </view>
  83. </view>
  84. </view>
  85. <!-- 上传说明:随类型切换 -->
  86. <view class="guide-section">
  87. <view class="guide-header">
  88. <text class="guide-header-icon">📖</text>
  89. <text class="guide-header-title">{{ reportKind === 'dan' ? 'DAN 测评说明' : '健康报告说明' }}</text>
  90. </view>
  91. <view class="guide-list" v-if="reportKind !== 'dan'">
  92. <view class="guide-item">
  93. <view class="guide-icon-box guide-icon-blue"><text class="guide-icon">📄</text></view>
  94. <view class="guide-info">
  95. <text class="guide-name">体检报告</text>
  96. <text class="guide-desc">血常规、尿常规、生化检验等,支持 PDF 或清晰照片</text>
  97. </view>
  98. </view>
  99. <view class="guide-item">
  100. <view class="guide-icon-box guide-icon-green"><text class="guide-icon">🦠</text></view>
  101. <view class="guide-info">
  102. <text class="guide-name">肠道菌群检测报告</text>
  103. <text class="guide-desc">支持 PDF 或清晰照片,AI 自动解读菌群健康</text>
  104. </view>
  105. </view>
  106. <view class="guide-item">
  107. <view class="guide-icon-box guide-icon-orange"><text class="guide-icon">👅</text></view>
  108. <view class="guide-info">
  109. <text class="guide-name">舌象照片</text>
  110. <text class="guide-desc">拍摄舌象照片,AI 辅助舌诊分析</text>
  111. </view>
  112. </view>
  113. <view class="guide-item">
  114. <view class="guide-icon-box guide-icon-teal"><text class="guide-icon">⚖️</text></view>
  115. <view class="guide-info">
  116. <text class="guide-name">体脂秤报告</text>
  117. <text class="guide-desc">拍摄体脂秤显示屏,自动提取体重、BMI、体脂率等</text>
  118. </view>
  119. </view>
  120. </view>
  121. <view class="guide-list" v-else>
  122. <view class="guide-item">
  123. <view class="guide-icon-box guide-icon-teal"><text class="guide-icon">💖</text></view>
  124. <view class="guide-info">
  125. <text class="guide-name">心维度 A2</text>
  126. <text class="guide-desc">人格、情绪、自我概念与自驱力等心理测评报告</text>
  127. </view>
  128. </view>
  129. <view class="guide-item">
  130. <view class="guide-icon-box guide-icon-purple"><text class="guide-icon">🧠</text></view>
  131. <view class="guide-info">
  132. <text class="guide-name">智维度 B4</text>
  133. <text class="guide-desc">认知能力、学习力等双培强基 DAN 智维度报告</text>
  134. </view>
  135. </view>
  136. <view class="guide-item">
  137. <view class="guide-icon-box guide-icon-blue"><text class="guide-icon">📚</text></view>
  138. <view class="guide-info">
  139. <text class="guide-name">其他 DAN 维度</text>
  140. <text class="guide-desc">认知 / 学习 / 行为 / 生涯 / 校园 / 青春期等专项报告</text>
  141. </view>
  142. </view>
  143. </view>
  144. <view class="guide-tips">
  145. <text class="guide-tips-title">温馨提示</text>
  146. <text class="guide-tips-item">· 请先选择报告类型,再选择文件上传</text>
  147. <text class="guide-tips-item">· 健康报告走菌群/体检解析;DAN 走测评维度解析</text>
  148. <text class="guide-tips-item">· 确认入库后将自动生成成长方案,可再分解为每日任务</text>
  149. </view>
  150. </view>
  151. <!-- 点击上传后的类型选择弹层(未预选时兜底) -->
  152. <view class="sheet-mask" v-if="showKindSheet" @click="closeKindSheet">
  153. <view class="sheet-panel" @click.stop>
  154. <text class="sheet-title">请选择要上传的报告</text>
  155. <view class="sheet-item" @click="onKindSheetPick('health')">
  156. <text class="sheet-item-title">健康报告</text>
  157. <text class="sheet-item-desc">体检、肠道菌群、舌诊、体脂等</text>
  158. </view>
  159. <view class="sheet-item" @click="onKindSheetPick('dan')">
  160. <text class="sheet-item-title">DAN测评</text>
  161. <text class="sheet-item-desc">A2 / B4 等成长测评 PDF</text>
  162. </view>
  163. <view class="sheet-cancel" @click="closeKindSheet">
  164. <text class="sheet-cancel-text">取消</text>
  165. </view>
  166. </view>
  167. </view>
  168. </view>
  169. </template>
  170. <script>
  171. import { uploadReportOnly, danParsePreview } from '../../utils/api.js'
  172. import config from '@/config.js'
  173. var DAN_DIMENSIONS = [
  174. { code: 'mind', label: '心 A2' },
  175. { code: 'wisdom', label: '智 B4' },
  176. { code: 'cognition', label: '认知' },
  177. { code: 'learning', label: '学习' },
  178. { code: 'behavior', label: '行为' },
  179. { code: 'career', label: '生涯' },
  180. { code: 'campus', label: '校园' },
  181. { code: 'adolescent', label: '青春期' }
  182. ]
  183. export default {
  184. data() {
  185. return {
  186. memberId: null,
  187. uploading: false,
  188. selectedFile: null,
  189. photoPath: null,
  190. agreedToTerms: false,
  191. currentMemberId: null,
  192. extractedMetrics: [],
  193. reportKind: '',
  194. danDimension: 'mind',
  195. danDimensions: DAN_DIMENSIONS,
  196. showKindSheet: false,
  197. pendingIsPhoto: false
  198. }
  199. },
  200. computed: {
  201. tipText: function() {
  202. if (this.reportKind === 'dan') {
  203. return '上传 DAN 测评 PDF(A2/B4 等),解析确认后生成个性化成长方案'
  204. }
  205. if (this.reportKind === 'health') {
  206. return '上传体检/菌群/舌诊等健康报告,解析确认后生成个性化健康方案'
  207. }
  208. return '请先选择「健康报告」或「DAN测评」,再上传文件生成方案'
  209. },
  210. uploadingText: function() {
  211. return this.reportKind === 'dan'
  212. ? '正在解析 DAN 测评报告...'
  213. : '正在上传文件,即将进入分析页面...'
  214. }
  215. },
  216. onLoad: function(options) {
  217. this.memberId = options.memberId ? parseInt(options.memberId) : null
  218. if (options.reportKind === 'health' || options.reportKind === 'dan') {
  219. this.reportKind = options.reportKind
  220. }
  221. if (options.dimension) {
  222. var codes = DAN_DIMENSIONS.map(function(d) { return d.code })
  223. if (codes.indexOf(options.dimension) >= 0) {
  224. this.danDimension = options.dimension
  225. this.reportKind = 'dan'
  226. }
  227. }
  228. if (options.bodyFatMetrics) {
  229. try {
  230. this.extractedMetrics = JSON.parse(decodeURIComponent(options.bodyFatMetrics))
  231. } catch (e) {}
  232. }
  233. },
  234. methods: {
  235. selectReportKind: function(kind) {
  236. this.reportKind = kind
  237. if (kind === 'dan' && !this.danDimension) {
  238. this.danDimension = 'mind'
  239. }
  240. },
  241. selectDanDimension: function(code) {
  242. this.danDimension = code
  243. },
  244. toggleAgree: function() {
  245. this.agreedToTerms = !this.agreedToTerms
  246. },
  247. ensureAgreed: function(callback) {
  248. if (this.agreedToTerms) {
  249. callback()
  250. return
  251. }
  252. var self = this
  253. uni.showModal({
  254. title: '数据使用声明',
  255. content: '上传报告即代表您同意平台使用本报告数据进行分析,为您提供个性化健康解决方案;未经您授权,平台不会以任何形式将您的报告内容提供给其他任何个人或机构。点击「同意继续」即表示您已阅读并同意。',
  256. confirmText: '同意继续',
  257. cancelText: '暂不',
  258. success: function(res) {
  259. if (res.confirm) {
  260. self.agreedToTerms = true
  261. callback()
  262. }
  263. }
  264. })
  265. },
  266. // 点击上传:未选类型时弹层;已选则直接走对应链路
  267. pickFile: function() {
  268. var self = this
  269. this.ensureAgreed(function() {
  270. self.beginUpload(false)
  271. })
  272. },
  273. takePhoto: function() {
  274. var self = this
  275. this.ensureAgreed(function() {
  276. self.beginUpload(true)
  277. })
  278. },
  279. beginUpload: function(isPhoto) {
  280. if (!this.reportKind) {
  281. this.pendingIsPhoto = isPhoto
  282. this.showKindSheet = true
  283. return
  284. }
  285. if (this.reportKind === 'dan') {
  286. if (!this.danDimension) {
  287. uni.showToast({ title: '请选择 DAN 测评维度', icon: 'none' })
  288. return
  289. }
  290. this.startPickDan()
  291. return
  292. }
  293. this.startPickHealth(isPhoto)
  294. },
  295. closeKindSheet: function() {
  296. this.showKindSheet = false
  297. },
  298. onKindSheetPick: function(kind) {
  299. this.reportKind = kind
  300. this.showKindSheet = false
  301. var isPhoto = this.pendingIsPhoto
  302. this.pendingIsPhoto = false
  303. if (kind === 'dan') {
  304. if (isPhoto) {
  305. uni.showToast({ title: 'DAN 请上传 PDF 文件', icon: 'none' })
  306. }
  307. this.startPickDan()
  308. return
  309. }
  310. this.startPickHealth(isPhoto)
  311. },
  312. startPickHealth: function(isPhoto) {
  313. var self = this
  314. if (isPhoto) {
  315. uni.chooseImage({
  316. count: 1,
  317. sourceType: ['camera', 'album'],
  318. success: function(res) {
  319. self.photoPath = res.tempFilePaths[0]
  320. self.uploadHealthAndGoConfirm(self.photoPath, 'image')
  321. }
  322. })
  323. } else {
  324. uni.chooseMessageFile({
  325. count: 1,
  326. type: 'file',
  327. extension: ['pdf'],
  328. success: function(res) {
  329. var files = res.tempFiles
  330. if (files && files.length > 0) {
  331. self.selectedFile = files[0]
  332. self.uploadHealthAndGoConfirm(files[0].path, '')
  333. }
  334. },
  335. fail: function(e) {
  336. console.log('选择文件取消或失败', e)
  337. }
  338. })
  339. }
  340. },
  341. startPickDan: function() {
  342. var self = this
  343. uni.chooseMessageFile({
  344. count: 1,
  345. type: 'file',
  346. extension: ['pdf'],
  347. success: function(res) {
  348. var files = res.tempFiles
  349. if (files && files.length > 0) {
  350. self.selectedFile = files[0]
  351. self.uploadDanAndGoPreview(files[0].path)
  352. }
  353. },
  354. fail: function() {
  355. uni.chooseImage({
  356. count: 1,
  357. success: function(res) {
  358. if (res.tempFiles && res.tempFiles.length > 0) {
  359. self.selectedFile = res.tempFiles[0]
  360. var path = res.tempFiles[0].path || (res.tempFilePaths && res.tempFilePaths[0])
  361. self.uploadDanAndGoPreview(path)
  362. }
  363. }
  364. })
  365. }
  366. })
  367. },
  368. // 健康报告:upload-only → 菌群/健康解析页
  369. uploadHealthAndGoConfirm: function(filePath, type) {
  370. if (!filePath) return
  371. var self = this
  372. self.uploading = true
  373. uni.showLoading({ title: '上传中...' })
  374. uploadReportOnly(filePath, type).then(function(res) {
  375. uni.hideLoading()
  376. self.uploading = false
  377. var draftId = res.data && res.data.draftId
  378. if (!draftId) {
  379. uni.showToast({ title: (res && res.message) || '上传失败', icon: 'none' })
  380. return
  381. }
  382. uni.redirectTo({ url: '/pages/health/gut-flora-detail?draftId=' + draftId })
  383. }).catch(function(err) {
  384. uni.hideLoading()
  385. self.uploading = false
  386. var msg = (err && err.message) || '上传失败,请重试'
  387. uni.showToast({ title: msg, icon: 'none' })
  388. })
  389. },
  390. // DAN测评:parse-preview → 预览确认页
  391. uploadDanAndGoPreview: function(filePath) {
  392. if (!filePath) return
  393. var self = this
  394. var memberId = self.memberId
  395. || (self.$store.state && self.$store.state.currentChildId)
  396. || uni.getStorageSync('currentChildId')
  397. || uni.getStorageSync('currentMemberId')
  398. if (!memberId) {
  399. uni.showToast({ title: '请先选择家庭成员', icon: 'none' })
  400. return
  401. }
  402. self.uploading = true
  403. uni.showLoading({ title: '解析中...' })
  404. danParsePreview(filePath, self.danDimension, memberId).then(function(res) {
  405. uni.hideLoading()
  406. self.uploading = false
  407. if (!res || res.code !== 200 || !res.data) {
  408. uni.showToast({ title: (res && res.message) || '解析失败', icon: 'none' })
  409. return
  410. }
  411. try {
  412. uni.setStorageSync('danUploadPreview', {
  413. draftId: res.data.draftId || res.data.uploadId,
  414. previewData: res.data,
  415. dimension: self.danDimension,
  416. memberId: memberId
  417. })
  418. } catch (e) {}
  419. uni.redirectTo({
  420. url: '/pages/dan-assessment/report-upload?resume=1&dimension=' + self.danDimension
  421. })
  422. }).catch(function(err) {
  423. uni.hideLoading()
  424. self.uploading = false
  425. uni.showToast({ title: (err && err.message) || '上传失败', icon: 'none' })
  426. })
  427. },
  428. goBodyFatScale: function() {
  429. var self = this
  430. this.ensureAgreed(function() {
  431. self.reportKind = 'health'
  432. self.startBodyFatUpload()
  433. })
  434. },
  435. startBodyFatUpload: function() {
  436. var self = this
  437. uni.chooseImage({
  438. count: 1,
  439. sourceType: ['camera', 'album'],
  440. success: function(res) {
  441. self.photoPath = res.tempFilePaths[0]
  442. self.uploadBodyFat(self.photoPath)
  443. }
  444. })
  445. },
  446. uploadBodyFat: function(filePath) {
  447. var self = this
  448. self.uploading = true
  449. uni.showLoading({ title: 'AI 识别中...' })
  450. var token = uni.getStorageSync('token')
  451. uni.uploadFile({
  452. url: config.API_BASE_URL + '/api/health/report/bodyfat-upload',
  453. filePath: filePath,
  454. name: 'file',
  455. header: { 'Authorization': 'Bearer ' + token },
  456. success: function(uploadRes) {
  457. var data
  458. try { data = JSON.parse(uploadRes.data) } catch (e) { data = uploadRes.data }
  459. self.uploading = false
  460. uni.hideLoading()
  461. if (data && data.code === 200) {
  462. self.currentMemberId = data.data && data.data.memberId
  463. self.extractedMetrics = data.data && data.data.metrics || []
  464. uni.navigateTo({ url: '/pages/health/bodyfat-confirm' })
  465. } else {
  466. uni.showToast({ title: (data && data.message) || '上传失败', icon: 'none' })
  467. }
  468. },
  469. fail: function() {
  470. self.uploading = false
  471. uni.hideLoading()
  472. uni.showToast({ title: '网络错误', icon: 'none' })
  473. }
  474. })
  475. }
  476. }
  477. }
  478. </script>
  479. <style scoped>
  480. .upload-container {
  481. min-height: 100vh;
  482. background: #F5F7FA;
  483. }
  484. .tip-banner {
  485. display: flex;
  486. flex-direction: row;
  487. align-items: center;
  488. background: #E3F2FD;
  489. margin: 20rpx 30rpx;
  490. padding: 20rpx 24rpx;
  491. border-radius: 16rpx;
  492. }
  493. .tip-icon {
  494. font-size: 32rpx;
  495. margin-right: 16rpx;
  496. flex-shrink: 0;
  497. }
  498. .tip-text {
  499. font-size: 24rpx;
  500. color: #1565C0;
  501. line-height: 1.5;
  502. }
  503. .form-section {
  504. margin: 0 30rpx;
  505. }
  506. .form-item {
  507. background: #fff;
  508. border-radius: 16rpx;
  509. padding: 24rpx;
  510. margin-bottom: 20rpx;
  511. }
  512. .form-label {
  513. font-size: 26rpx;
  514. font-weight: bold;
  515. color: #333;
  516. display: block;
  517. margin-bottom: 16rpx;
  518. }
  519. .category-row {
  520. display: flex;
  521. flex-direction: row;
  522. gap: 16rpx;
  523. }
  524. .category-card {
  525. flex: 1;
  526. display: flex;
  527. flex-direction: column;
  528. align-items: center;
  529. padding: 28rpx 16rpx;
  530. border-radius: 16rpx;
  531. background: #F8FAFC;
  532. border: 2rpx solid #E2E8F0;
  533. }
  534. .category-active {
  535. background: #EFF6FF;
  536. border-color: #3B82F6;
  537. }
  538. .category-dan.category-active {
  539. background: #F5F3FF;
  540. border-color: #8B5CF6;
  541. }
  542. .category-icon {
  543. font-size: 40rpx;
  544. margin-bottom: 10rpx;
  545. }
  546. .category-title {
  547. font-size: 28rpx;
  548. font-weight: 600;
  549. color: #1E293B;
  550. margin-bottom: 6rpx;
  551. }
  552. .category-desc {
  553. font-size: 20rpx;
  554. color: #94A3B8;
  555. text-align: center;
  556. }
  557. .dim-grid {
  558. display: flex;
  559. flex-direction: row;
  560. flex-wrap: wrap;
  561. }
  562. .dim-chip {
  563. width: 23%;
  564. margin-right: 2%;
  565. margin-bottom: 12rpx;
  566. padding: 16rpx 0;
  567. text-align: center;
  568. border-radius: 12rpx;
  569. background: #F1F5F9;
  570. border: 2rpx solid transparent;
  571. box-sizing: border-box;
  572. }
  573. .dim-active {
  574. background: #EDE9FE;
  575. border-color: #8B5CF6;
  576. }
  577. .dim-chip-text {
  578. font-size: 22rpx;
  579. color: #334155;
  580. }
  581. .kind-hint {
  582. background: #FFFBEB;
  583. border-radius: 12rpx;
  584. padding: 20rpx;
  585. margin-bottom: 20rpx;
  586. border: 2rpx dashed #FCD34D;
  587. }
  588. .kind-hint-text {
  589. font-size: 24rpx;
  590. color: #92400E;
  591. }
  592. .analyzing-status {
  593. display: flex;
  594. flex-direction: row;
  595. align-items: center;
  596. }
  597. .analyzing-text {
  598. font-size: 26rpx;
  599. color: #5B9BD5;
  600. }
  601. .disclaimer-box {
  602. background: #FFF8F0;
  603. border: 2rpx solid #FDE68A;
  604. }
  605. .disclaimer-check {
  606. display: flex;
  607. flex-direction: row;
  608. align-items: center;
  609. margin-bottom: 12rpx;
  610. }
  611. .disclaimer-checkbox {
  612. width: 36rpx;
  613. height: 36rpx;
  614. border-radius: 6rpx;
  615. border: 2rpx solid #CBD5E1;
  616. background: #fff;
  617. display: flex;
  618. align-items: center;
  619. justify-content: center;
  620. flex-shrink: 0;
  621. margin-right: 12rpx;
  622. }
  623. .disclaimer-checked {
  624. background: #5B9BD5;
  625. border-color: #5B9BD5;
  626. }
  627. .disclaimer-checkmark {
  628. font-size: 24rpx;
  629. color: #fff;
  630. font-weight: bold;
  631. }
  632. .disclaimer-label {
  633. font-size: 24rpx;
  634. color: #333;
  635. font-weight: 500;
  636. }
  637. .disclaimer-content {
  638. background: #FFFDF5;
  639. border-radius: 10rpx;
  640. padding: 16rpx;
  641. margin-left: 48rpx;
  642. }
  643. .disclaimer-text {
  644. font-size: 22rpx;
  645. color: #92400E;
  646. line-height: 1.6;
  647. }
  648. .upload-methods {
  649. display: flex;
  650. flex-direction: row;
  651. gap: 16rpx;
  652. margin-bottom: 20rpx;
  653. }
  654. .upload-card {
  655. flex: 1;
  656. display: flex;
  657. flex-direction: column;
  658. align-items: center;
  659. justify-content: center;
  660. padding: 32rpx 12rpx;
  661. border-radius: 20rpx;
  662. text-align: center;
  663. min-height: 220rpx;
  664. }
  665. .upload-card:active {
  666. opacity: 0.85;
  667. }
  668. .upload-card-icon {
  669. width: 80rpx;
  670. height: 80rpx;
  671. border-radius: 20rpx;
  672. font-size: 40rpx;
  673. display: flex;
  674. align-items: center;
  675. justify-content: center;
  676. margin-bottom: 16rpx;
  677. }
  678. .upload-card-title {
  679. font-size: 26rpx;
  680. font-weight: 600;
  681. color: #333;
  682. margin-bottom: 8rpx;
  683. }
  684. .upload-card-desc {
  685. font-size: 20rpx;
  686. color: #94A3B8;
  687. line-height: 1.5;
  688. }
  689. .card-file {
  690. background: #F0F7FF;
  691. border: 2rpx dashed #93C5FD;
  692. }
  693. .card-file .upload-card-icon {
  694. background: linear-gradient(135deg, #3B82F6, #1D4ED8);
  695. color: #fff;
  696. }
  697. .card-photo {
  698. background: #FFF7ED;
  699. border: 2rpx solid #FED7AA;
  700. }
  701. .card-photo .upload-card-icon {
  702. background: linear-gradient(135deg, #FB923C, #EA580C);
  703. color: #fff;
  704. }
  705. .guide-section {
  706. margin: 0 30rpx 30rpx;
  707. background: #fff;
  708. border-radius: 20rpx;
  709. padding: 28rpx 24rpx;
  710. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.04);
  711. }
  712. .guide-header {
  713. display: flex;
  714. flex-direction: row;
  715. align-items: center;
  716. margin-bottom: 20rpx;
  717. }
  718. .guide-header-icon {
  719. font-size: 32rpx;
  720. margin-right: 12rpx;
  721. }
  722. .guide-header-title {
  723. font-size: 28rpx;
  724. font-weight: 600;
  725. color: #1E293B;
  726. }
  727. .guide-item {
  728. display: flex;
  729. flex-direction: row;
  730. align-items: flex-start;
  731. margin-bottom: 20rpx;
  732. }
  733. .guide-icon-box {
  734. width: 64rpx;
  735. height: 64rpx;
  736. border-radius: 16rpx;
  737. display: flex;
  738. align-items: center;
  739. justify-content: center;
  740. margin-right: 16rpx;
  741. flex-shrink: 0;
  742. }
  743. .guide-icon {
  744. font-size: 32rpx;
  745. }
  746. .guide-icon-blue { background: #DBEAFE; }
  747. .guide-icon-green { background: #DCFCE7; }
  748. .guide-icon-orange { background: #FFEDD5; }
  749. .guide-icon-purple { background: #EDE9FE; }
  750. .guide-icon-teal { background: #CCFBF1; }
  751. .guide-info {
  752. flex: 1;
  753. }
  754. .guide-name {
  755. font-size: 26rpx;
  756. font-weight: 600;
  757. color: #334155;
  758. display: block;
  759. margin-bottom: 4rpx;
  760. }
  761. .guide-desc {
  762. font-size: 22rpx;
  763. color: #94A3B8;
  764. line-height: 1.5;
  765. }
  766. .guide-tips {
  767. margin-top: 8rpx;
  768. padding-top: 16rpx;
  769. border-top: 1rpx solid #F1F5F9;
  770. }
  771. .guide-tips-title {
  772. font-size: 24rpx;
  773. font-weight: 600;
  774. color: #64748B;
  775. display: block;
  776. margin-bottom: 8rpx;
  777. }
  778. .guide-tips-item {
  779. font-size: 22rpx;
  780. color: #94A3B8;
  781. display: block;
  782. line-height: 1.7;
  783. }
  784. .sheet-mask {
  785. position: fixed;
  786. left: 0;
  787. right: 0;
  788. top: 0;
  789. bottom: 0;
  790. background: rgba(15, 23, 42, 0.45);
  791. z-index: 1000;
  792. display: flex;
  793. flex-direction: column;
  794. justify-content: flex-end;
  795. }
  796. .sheet-panel {
  797. background: #fff;
  798. border-radius: 24rpx 24rpx 0 0;
  799. padding: 32rpx 28rpx calc(32rpx + env(safe-area-inset-bottom));
  800. }
  801. .sheet-title {
  802. font-size: 30rpx;
  803. font-weight: 600;
  804. color: #0F172A;
  805. display: block;
  806. text-align: center;
  807. margin-bottom: 24rpx;
  808. }
  809. .sheet-item {
  810. background: #F8FAFC;
  811. border-radius: 16rpx;
  812. padding: 28rpx 24rpx;
  813. margin-bottom: 16rpx;
  814. }
  815. .sheet-item:active {
  816. background: #EFF6FF;
  817. }
  818. .sheet-item-title {
  819. font-size: 28rpx;
  820. font-weight: 600;
  821. color: #1E293B;
  822. display: block;
  823. margin-bottom: 6rpx;
  824. }
  825. .sheet-item-desc {
  826. font-size: 22rpx;
  827. color: #94A3B8;
  828. }
  829. .sheet-cancel {
  830. margin-top: 8rpx;
  831. padding: 24rpx;
  832. text-align: center;
  833. }
  834. .sheet-cancel-text {
  835. font-size: 28rpx;
  836. color: #64748B;
  837. }
  838. </style>