report-upload.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836
  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. <view class="member-box">
  11. <text class="form-label">报告属于哪位成员</text>
  12. <view class="member-list" v-if="familyMembers.length > 0">
  13. <view
  14. class="member-item"
  15. v-for="(member, mIdx) in familyMembers"
  16. :key="getMemberKey(member)"
  17. :class="member._selected ? 'member-selected' : ''"
  18. hover-class="member-hover"
  19. @click="selectMemberByIndex(mIdx)">
  20. <text class="member-avatar">{{ memberInitial(member) }}</text>
  21. <text class="member-name">{{ member.nickname || '未命名' }}</text>
  22. </view>
  23. </view>
  24. <text class="member-empty" v-else>暂无家庭成员,请先在家庭中添加</text>
  25. </view>
  26. </view>
  27. <!-- 上传方式 -->
  28. <view class="form-section">
  29. <view class="upload-methods">
  30. <view class="upload-card card-chat" @click="pickFromChat">
  31. <view class="upload-card-icon">💬</view>
  32. <text class="upload-card-title">从聊天选取</text>
  33. <text class="upload-card-desc">微信聊天中的 PDF / 图片报告</text>
  34. </view>
  35. <view class="upload-card card-photo" @click="takePhoto">
  36. <view class="upload-card-icon">📷</view>
  37. <text class="upload-card-title">拍照上传</text>
  38. <text class="upload-card-desc">拍摄纸质报告(PDF 报告更佳)</text>
  39. </view>
  40. </view>
  41. <!-- 采集中面板 -->
  42. <view class="collecting-panel" v-if="collecting">
  43. <view class="collecting-card">
  44. <view class="collecting-icon">
  45. <view class="spinner" v-if="!collectError"></view>
  46. <text class="collecting-fail-mark" v-else>!</text>
  47. </view>
  48. <view class="collecting-info">
  49. <text class="collecting-title">{{ collectError ? '采集失败' : '数据采集中' }}</text>
  50. <text class="collecting-file">{{ collectFileName || '报告文件' }}</text>
  51. <text class="collecting-hint">{{ collectError || '后台正在识别报告类型并解析,完成后自动入库' }}</text>
  52. </view>
  53. </view>
  54. <view class="collecting-actions">
  55. <view class="collecting-btn" @click="goReportList">去报告列表查看</view>
  56. <view class="collecting-cancel" @click="cancelCollect">取消</view>
  57. </view>
  58. </view>
  59. <!-- 上传中 -->
  60. <view class="form-item" v-if="uploading">
  61. <text class="form-label">上传中...</text>
  62. <view class="analyzing-status">
  63. <text class="analyzing-text">{{ uploadingText }}</text>
  64. </view>
  65. </view>
  66. <!-- 责任声明 -->
  67. <view class="form-item disclaimer-box">
  68. <view class="disclaimer-check" @click="toggleAgree">
  69. <view class="disclaimer-checkbox" :class="{ 'disclaimer-checked': agreedToTerms }">
  70. <text class="disclaimer-checkmark" v-if="agreedToTerms">✓</text>
  71. </view>
  72. <text class="disclaimer-label">我已阅读并同意以下声明</text>
  73. </view>
  74. <view class="disclaimer-content">
  75. <text class="disclaimer-text">我同意平台使用本报告数据进行分析,为我提供个性化健康解决方案;未经我授权,平台不会以任何形式将我的报告内容提供给其他任何个人或机构。</text>
  76. </view>
  77. </view>
  78. </view>
  79. <!-- 上传说明 -->
  80. <view class="guide-section">
  81. <view class="guide-header">
  82. <text class="guide-header-icon">📖</text>
  83. <text class="guide-header-title">支持的报告类型</text>
  84. </view>
  85. <view class="guide-list">
  86. <view class="guide-item">
  87. <view class="guide-icon-box guide-icon-blue"><text class="guide-icon">📄</text></view>
  88. <view class="guide-info">
  89. <text class="guide-name">菌群检测报告</text>
  90. <text class="guide-desc">肠道菌群 PDF,后台采集解析菌群指标</text>
  91. </view>
  92. </view>
  93. <view class="guide-item">
  94. <view class="guide-icon-box guide-icon-purple"><text class="guide-icon">🧠</text></view>
  95. <view class="guide-info">
  96. <text class="guide-name">素质测评 A2</text>
  97. <text class="guide-desc">核心素养 PDF,解析认知、情绪、大五人格等</text>
  98. </view>
  99. </view>
  100. <view class="guide-item">
  101. <view class="guide-icon-box guide-icon-blue"><text class="guide-icon">📄</text></view>
  102. <view class="guide-info">
  103. <text class="guide-name">体检报告</text>
  104. <text class="guide-desc">血常规、尿常规、生化检验等,支持 PDF 或清晰照片</text>
  105. </view>
  106. </view>
  107. <view class="guide-item">
  108. <view class="guide-icon-box guide-icon-orange"><text class="guide-icon">👅</text></view>
  109. <view class="guide-info">
  110. <text class="guide-name">舌象照片</text>
  111. <text class="guide-desc">拍摄舌象照片,AI 辅助舌诊分析</text>
  112. </view>
  113. </view>
  114. <view class="guide-item">
  115. <view class="guide-icon-box guide-icon-teal"><text class="guide-icon">⚖️</text></view>
  116. <view class="guide-info">
  117. <text class="guide-name">体脂秤报告</text>
  118. <text class="guide-desc">拍摄体脂秤显示屏,自动提取体重、BMI、体脂率等</text>
  119. </view>
  120. </view>
  121. </view>
  122. <view class="guide-tips">
  123. <text class="guide-tips-title">温馨提示</text>
  124. <text class="guide-tips-item">· 上传后无需选择类型,后台自动识别报告种类并解析</text>
  125. <text class="guide-tips-item">· 请先选择报告归属成员,再上传文件</text>
  126. <text class="guide-tips-item">· 请确认报告清晰完整,以便准确解析</text>
  127. <text class="guide-tips-item">· 确认入库后将自动生成成长方案,可再分解为每日任务</text>
  128. </view>
  129. </view>
  130. </view>
  131. </template>
  132. <script>
  133. import { uploadReportOnly, getReportCollectStatus, getFamilyMemberList } from '../../utils/api.js'
  134. export default {
  135. data() {
  136. return {
  137. memberId: null,
  138. reportKind: '',
  139. uploadType: null, // 'tongue' | null;从 URL query reportType 读取
  140. familyMembers: [],
  141. uploading: false,
  142. agreedToTerms: false,
  143. uploadingText: '正在上传文件...',
  144. collectDraftId: null,
  145. collectTimer: null,
  146. collecting: false,
  147. collectFileName: '',
  148. collectError: '',
  149. collectPollCount: 0
  150. }
  151. },
  152. computed: {
  153. tipText: function() {
  154. return '上传报告后由系统自动识别类型并解析:菌群检测、素质测评 A2、体检报告等'
  155. }
  156. },
  157. onLoad: function(options) {
  158. this.memberId = options.memberId ? parseInt(options.memberId) : null
  159. if (options.type === 'a2' || options.reportKind === 'a2') {
  160. this.reportKind = 'a2'
  161. } else if (options.type === 'gut' || options.reportKind === 'gut') {
  162. this.reportKind = 'gut'
  163. }
  164. if (options.reportType === 'tongue' || options.type === 'tongue') {
  165. this.uploadType = 'tongue'
  166. }
  167. this.loadFamilyMembers()
  168. },
  169. onUnload: function() {
  170. this.stopCollectPolling()
  171. },
  172. methods: {
  173. resolveMemberId: function(member) {
  174. if (!member) return null
  175. var raw = member.id || member.userId
  176. if (raw === 0 || raw === '0') return 0
  177. if (!raw) return null
  178. var id = parseInt(raw)
  179. return isNaN(id) ? null : id
  180. },
  181. selectMemberByIndex: function(idx) {
  182. var list = this.familyMembers
  183. if (!list || idx < 0 || idx >= list.length) return
  184. var id = this.resolveMemberId(list[idx])
  185. if (id === null) {
  186. uni.showToast({ title: '该成员缺少编号,无法选择', icon: 'none' })
  187. return
  188. }
  189. this.memberId = id
  190. this.markSelectedMember(id)
  191. },
  192. markSelectedMember: function(memberId) {
  193. var list = this.familyMembers || []
  194. var target = memberId === null || memberId === undefined ? null : parseInt(memberId)
  195. for (var i = 0; i < list.length; i++) {
  196. var cur = this.resolveMemberId(list[i])
  197. this.$set(list[i], '_selected', target !== null && !isNaN(target) && cur === target)
  198. }
  199. },
  200. getMemberKey: function(member) {
  201. var id = this.resolveMemberId(member)
  202. return id === null ? 'm0' : ('m' + id)
  203. },
  204. memberInitial: function(member) {
  205. var name = (member && member.nickname) || '?'
  206. return name.substring(0, 1)
  207. },
  208. loadFamilyMembers: function() {
  209. var self = this
  210. getFamilyMemberList({ visibleOnly: true }).then(function(res) {
  211. var list = (res && res.data) || []
  212. self.familyMembers = list instanceof Array ? list : []
  213. if (!self.memberId && self.familyMembers.length === 1) {
  214. self.memberId = self.resolveMemberId(self.familyMembers[0])
  215. }
  216. self.markSelectedMember(self.memberId)
  217. }).catch(function() {
  218. self.familyMembers = []
  219. })
  220. },
  221. ensureMember: function() {
  222. if (this.memberId) return true
  223. uni.showToast({ title: '请先选择报告所属成员', icon: 'none' })
  224. return false
  225. },
  226. toggleAgree: function() {
  227. this.agreedToTerms = !this.agreedToTerms
  228. },
  229. ensureAgreed: function(callback) {
  230. if (this.agreedToTerms) {
  231. callback()
  232. return
  233. }
  234. var self = this
  235. uni.showModal({
  236. title: '数据使用声明',
  237. content: '上传报告即代表您同意平台使用本报告数据进行分析,为您提供个性化健康解决方案;未经您授权,平台不会以任何形式将您的报告内容提供给其他任何个人或机构。点击「同意继续」即表示您已阅读并同意。',
  238. confirmText: '同意继续',
  239. cancelText: '暂不',
  240. success: function(res) {
  241. if (res.confirm) {
  242. self.agreedToTerms = true
  243. callback()
  244. }
  245. }
  246. })
  247. },
  248. pickFromChat: function() {
  249. var self = this
  250. if (!this.ensureMember()) return
  251. this.ensureAgreed(function() {
  252. // type='all' 的选择器默认停留在图片 tab,用户难以发现可切换选文件。
  253. // 改为先弹 actionSheet 让用户明确选择图片或文件,分别走对应 type。
  254. uni.showActionSheet({
  255. itemList: ['聊天中的文件(PDF等)', '聊天中的图片'],
  256. success: function(res) {
  257. if (res.tapIndex === 0) {
  258. self.chooseChatFile('file', '聊天文件')
  259. } else if (res.tapIndex === 1) {
  260. self.chooseChatFile('image', '聊天图片')
  261. }
  262. },
  263. fail: function() {
  264. // 用户取消,静默处理
  265. }
  266. })
  267. })
  268. },
  269. chooseChatFile: function(type, fallbackName) {
  270. var self = this
  271. uni.chooseMessageFile({
  272. count: 1,
  273. type: type,
  274. success: function(res) {
  275. var files = res.tempFiles
  276. if (files && files.length > 0) {
  277. self.uploadReport(files[0].path, files[0].name || fallbackName)
  278. }
  279. },
  280. fail: function() {
  281. // 用户取消或失败,静默处理
  282. }
  283. })
  284. },
  285. takePhoto: function() {
  286. var self = this
  287. if (!this.ensureMember()) return
  288. this.ensureAgreed(function() {
  289. uni.chooseImage({
  290. count: 1,
  291. sourceType: ['camera', 'album'],
  292. success: function(res) {
  293. if (res.tempFilePaths && res.tempFilePaths.length > 0) {
  294. self.uploadReport(res.tempFilePaths[0], '照片')
  295. }
  296. }
  297. })
  298. })
  299. },
  300. uploadReport: function(filePath, fileName) {
  301. if (!filePath) return
  302. var self = this
  303. self.uploading = true
  304. self.uploadingText = '正在上传文件...'
  305. uni.showLoading({ title: '上传中...' })
  306. // 统一上传:舌诊照片(uploadType=tongue)走舌诊专用流程;其余 type=auto,后台指纹判定后走对应采集管道(dan_a2 → DAN入库 / 其余 → 健康报告)
  307. uploadReportOnly(filePath, self.uploadType || 'auto', self.memberId).then(function(res) {
  308. uni.hideLoading()
  309. self.uploading = false
  310. var data = res.data || {}
  311. // 舌诊照片:后端直接返回 recordId + 舌诊指标,不走 draft/collect 流程
  312. if (data.type === 'tongue' || data.recordId) {
  313. var tonguePayload = {
  314. type: 'tongue',
  315. recordId: data.recordId,
  316. indicators: data.indicators || [],
  317. summary: { overallAssessment: data.overallAssessment || '' }
  318. }
  319. var url = '/pages/health/report-confirm?payload=' + encodeURIComponent(JSON.stringify(tonguePayload))
  320. if (self.memberId) url += '&memberId=' + self.memberId
  321. uni.redirectTo({ url: url })
  322. return
  323. }
  324. // 处理重复上传:duplicate=true
  325. if (data.duplicate) {
  326. if (data.collecting) {
  327. self.collectDraftId = data.draftId
  328. self.collecting = true
  329. self.collectError = data.message || '该报告正在解析中,请稍候'
  330. self.collectFileName = fileName || '报告文件'
  331. self.startCollectPolling(data.draftId)
  332. } else {
  333. // 已完成,跳转详情
  334. var reportId = data.reportId
  335. if (reportId) {
  336. self.goToDetail(reportId, 'gut_flora')
  337. }
  338. }
  339. uni.showToast({ title: data.message || '该报告已上传过', icon: 'none', duration: 3000 })
  340. return
  341. }
  342. var draftId = data.draftId
  343. if (!draftId) {
  344. uni.showToast({ title: (res && res.message) || '上传失败', icon: 'none' })
  345. return
  346. }
  347. self.collectDraftId = draftId
  348. self.collecting = true
  349. self.collectError = ''
  350. self.collectFileName = fileName || '报告文件'
  351. self.startCollectPolling(draftId)
  352. }).catch(function(err) {
  353. uni.hideLoading()
  354. self.uploading = false
  355. var msg = (err && err.message) || '上传失败,请重试'
  356. uni.showToast({ title: msg, icon: 'none' })
  357. })
  358. },
  359. stopCollectPolling: function() {
  360. if (this.collectTimer) {
  361. clearInterval(this.collectTimer)
  362. this.collectTimer = null
  363. }
  364. },
  365. startCollectPolling: function(draftId) {
  366. var self = this
  367. self.stopCollectPolling()
  368. self.collectPollCount = 0
  369. self.pollCollectStatus(draftId)
  370. self.collectTimer = setInterval(function() {
  371. self.pollCollectStatus(draftId)
  372. }, 4000)
  373. },
  374. pollCollectStatus: function(draftId) {
  375. var self = this
  376. self.collectPollCount = (self.collectPollCount || 0) + 1
  377. // 约 6 分钟仍未完成:停轮询,提示去列表看进度
  378. if (self.collectPollCount > 90) {
  379. self.stopCollectPolling()
  380. self.collectError = '解析耗时较长,可去报告列表查看进度,无需重复上传'
  381. return
  382. }
  383. getReportCollectStatus(draftId).then(function(res) {
  384. var data = res.data || {}
  385. var status = data.parseStatus
  386. if (status === 'completed') {
  387. self.stopCollectPolling()
  388. self.collecting = false
  389. uni.showToast({ title: '报告已采集完成', icon: 'success', duration: 2000 })
  390. var reportId = data.reportId
  391. var reportType = data.reportType || 'gut_flora'
  392. setTimeout(function() {
  393. if (reportId) {
  394. // 后端指纹识别后统一入库:dan_a2 → DAN 报告页,其余 → 健康报告详情页
  395. if (reportType === 'dan_a2') {
  396. uni.redirectTo({ url: '/pages/dan-assessment/report-result?reportId=' + reportId })
  397. } else if (reportType === 'gut_flora') {
  398. uni.redirectTo({ url: '/pages/health/gut-flora-detail?reportId=' + reportId })
  399. } else {
  400. uni.redirectTo({ url: '/pages/health/report-detail?reportType=' + reportType + '&reportId=' + reportId })
  401. }
  402. } else {
  403. uni.redirectTo({ url: '/pages/health/report-list' })
  404. }
  405. }, 600)
  406. } else if (status === 'failed') {
  407. self.stopCollectPolling()
  408. self.collectError = data.parseError || '报告采集失败,请重试'
  409. uni.showToast({ title: self.collectError, icon: 'none', duration: 3000 })
  410. }
  411. }).catch(function() {
  412. // 轮询失败静默,下次继续
  413. })
  414. },
  415. goReportList: function() {
  416. this.stopCollectPolling()
  417. uni.redirectTo({ url: '/pages/health/report-list' })
  418. },
  419. goToDetail: function(reportId, reportType) {
  420. var url
  421. if (reportType === 'gut_flora') {
  422. url = '/pages/health/gut-flora-detail?reportId=' + reportId
  423. } else {
  424. url = '/pages/health/report-detail?reportType=' + (reportType || 'gut_flora') + '&reportId=' + reportId
  425. }
  426. uni.redirectTo({ url: url })
  427. },
  428. cancelCollect: function() {
  429. this.stopCollectPolling()
  430. this.collecting = false
  431. this.collectDraftId = null
  432. this.collectFileName = ''
  433. this.collectError = ''
  434. }
  435. }
  436. }
  437. </script>
  438. <style scoped>
  439. .upload-container {
  440. min-height: 100vh;
  441. background: #F5F7FA;
  442. padding-bottom: env(safe-area-inset-bottom);
  443. }
  444. .tip-banner {
  445. display: flex;
  446. flex-direction: row;
  447. align-items: center;
  448. background: #E3F2FD;
  449. margin: 20rpx 30rpx;
  450. padding: 20rpx 24rpx;
  451. border-radius: 16rpx;
  452. }
  453. .tip-icon {
  454. font-size: 32rpx;
  455. margin-right: 16rpx;
  456. flex-shrink: 0;
  457. }
  458. .tip-text {
  459. font-size: 24rpx;
  460. color: #1565C0;
  461. line-height: 1.5;
  462. }
  463. .form-section {
  464. margin: 0 30rpx;
  465. }
  466. .member-box {
  467. background: #fff;
  468. border-radius: 16rpx;
  469. padding: 24rpx;
  470. margin-bottom: 20rpx;
  471. }
  472. .member-list {
  473. display: flex;
  474. flex-direction: row;
  475. flex-wrap: wrap;
  476. gap: 16rpx;
  477. }
  478. .member-item {
  479. display: flex;
  480. flex-direction: column;
  481. align-items: center;
  482. padding: 16rpx 20rpx;
  483. background: #F5F7FA;
  484. border-radius: 16rpx;
  485. border: 2rpx solid transparent;
  486. min-width: 120rpx;
  487. }
  488. .member-selected {
  489. background: #EDE9FE;
  490. border-color: #8B5CF6;
  491. }
  492. .member-hover {
  493. opacity: 0.85;
  494. }
  495. .member-avatar {
  496. width: 64rpx;
  497. height: 64rpx;
  498. border-radius: 50%;
  499. background: #8B5CF6;
  500. color: #fff;
  501. font-size: 28rpx;
  502. font-weight: bold;
  503. text-align: center;
  504. line-height: 64rpx;
  505. margin-bottom: 8rpx;
  506. }
  507. .member-name {
  508. font-size: 24rpx;
  509. color: #333;
  510. }
  511. .member-empty {
  512. font-size: 24rpx;
  513. color: #94A3B8;
  514. }
  515. .form-item {
  516. background: #fff;
  517. border-radius: 16rpx;
  518. padding: 24rpx;
  519. margin-bottom: 20rpx;
  520. }
  521. .form-label {
  522. font-size: 26rpx;
  523. font-weight: bold;
  524. color: #333;
  525. display: block;
  526. margin-bottom: 16rpx;
  527. }
  528. /* 上传方式卡片 */
  529. .upload-methods {
  530. display: flex;
  531. flex-direction: row;
  532. gap: 16rpx;
  533. margin-bottom: 20rpx;
  534. }
  535. .upload-card {
  536. flex: 1;
  537. display: flex;
  538. flex-direction: column;
  539. align-items: center;
  540. justify-content: center;
  541. padding: 32rpx 12rpx;
  542. border-radius: 20rpx;
  543. text-align: center;
  544. min-height: 200rpx;
  545. }
  546. .upload-card:active {
  547. opacity: 0.85;
  548. }
  549. .upload-card-icon {
  550. width: 80rpx;
  551. height: 80rpx;
  552. border-radius: 20rpx;
  553. font-size: 40rpx;
  554. display: flex;
  555. align-items: center;
  556. justify-content: center;
  557. margin-bottom: 16rpx;
  558. }
  559. .upload-card-title {
  560. font-size: 26rpx;
  561. font-weight: 600;
  562. color: #333;
  563. margin-bottom: 8rpx;
  564. }
  565. .upload-card-desc {
  566. font-size: 20rpx;
  567. color: #94A3B8;
  568. line-height: 1.5;
  569. }
  570. .card-chat {
  571. background: #F0F7FF;
  572. border: 2rpx dashed #93C5FD;
  573. }
  574. .card-chat .upload-card-icon {
  575. background: linear-gradient(135deg, #3B82F6, #1D4ED8);
  576. color: #fff;
  577. }
  578. .card-photo {
  579. background: #FFF7ED;
  580. border: 2rpx solid #FED7AA;
  581. }
  582. .card-photo .upload-card-icon {
  583. background: linear-gradient(135deg, #FB923C, #EA580C);
  584. color: #fff;
  585. }
  586. /* 采集中面板 */
  587. .collecting-panel {
  588. margin-bottom: 20rpx;
  589. }
  590. .collecting-card {
  591. display: flex;
  592. flex-direction: row;
  593. align-items: flex-start;
  594. background: #FFF8E6;
  595. border: 1rpx solid #F5D78E;
  596. border-radius: 16rpx;
  597. padding: 28rpx 24rpx;
  598. }
  599. .collecting-icon {
  600. width: 56rpx;
  601. height: 56rpx;
  602. border-radius: 50%;
  603. background: #F0B429;
  604. display: flex;
  605. align-items: center;
  606. justify-content: center;
  607. margin-right: 20rpx;
  608. flex-shrink: 0;
  609. }
  610. .spinner {
  611. width: 28rpx;
  612. height: 28rpx;
  613. border: 4rpx solid rgba(255,255,255,0.4);
  614. border-top-color: #fff;
  615. border-radius: 50%;
  616. animation: collecting-spin 1s linear infinite;
  617. }
  618. @keyframes collecting-spin {
  619. 0% { transform: rotate(0deg); }
  620. 100% { transform: rotate(360deg); }
  621. }
  622. .collecting-fail-mark {
  623. font-size: 32rpx;
  624. color: #fff;
  625. font-weight: bold;
  626. }
  627. .collecting-info {
  628. flex: 1;
  629. display: flex;
  630. flex-direction: column;
  631. min-width: 0;
  632. }
  633. .collecting-title {
  634. font-size: 30rpx;
  635. font-weight: 600;
  636. color: #7A5C00;
  637. }
  638. .collecting-file {
  639. font-size: 24rpx;
  640. color: #A08A45;
  641. margin-top: 6rpx;
  642. overflow: hidden;
  643. text-overflow: ellipsis;
  644. white-space: nowrap;
  645. }
  646. .collecting-hint {
  647. font-size: 22rpx;
  648. color: #C0A75A;
  649. margin-top: 8rpx;
  650. line-height: 1.5;
  651. }
  652. .collecting-actions {
  653. display: flex;
  654. flex-direction: row;
  655. gap: 16rpx;
  656. margin-top: 16rpx;
  657. }
  658. .collecting-btn {
  659. flex: 1;
  660. height: 72rpx;
  661. line-height: 72rpx;
  662. text-align: center;
  663. background: #5B9BD5;
  664. color: #fff;
  665. font-size: 28rpx;
  666. border-radius: 12rpx;
  667. }
  668. .collecting-cancel {
  669. padding: 0 24rpx;
  670. height: 72rpx;
  671. line-height: 72rpx;
  672. text-align: center;
  673. background: #fff;
  674. border: 1rpx solid #D1D5DB;
  675. color: #666;
  676. font-size: 28rpx;
  677. border-radius: 12rpx;
  678. }
  679. /* 上传中状态 */
  680. .analyzing-status {
  681. display: flex;
  682. flex-direction: row;
  683. align-items: center;
  684. }
  685. .analyzing-text {
  686. font-size: 26rpx;
  687. color: #5B9BD5;
  688. }
  689. /* 责任声明 */
  690. .disclaimer-box {
  691. background: #FFF8F0;
  692. border: 2rpx solid #FDE68A;
  693. }
  694. .disclaimer-check {
  695. display: flex;
  696. flex-direction: row;
  697. align-items: center;
  698. margin-bottom: 12rpx;
  699. }
  700. .disclaimer-checkbox {
  701. width: 36rpx;
  702. height: 36rpx;
  703. border-radius: 6rpx;
  704. border: 2rpx solid #CBD5E1;
  705. background: #fff;
  706. display: flex;
  707. align-items: center;
  708. justify-content: center;
  709. flex-shrink: 0;
  710. margin-right: 12rpx;
  711. }
  712. .disclaimer-checked {
  713. background: #5B9BD5;
  714. border-color: #5B9BD5;
  715. }
  716. .disclaimer-checkmark {
  717. font-size: 24rpx;
  718. color: #fff;
  719. font-weight: bold;
  720. }
  721. .disclaimer-label {
  722. font-size: 24rpx;
  723. color: #333;
  724. font-weight: 500;
  725. }
  726. .disclaimer-content {
  727. background: #FFFDF5;
  728. border-radius: 10rpx;
  729. padding: 16rpx;
  730. margin-left: 48rpx;
  731. }
  732. .disclaimer-text {
  733. font-size: 22rpx;
  734. color: #92400E;
  735. line-height: 1.6;
  736. }
  737. /* 上传说明 */
  738. .guide-section {
  739. margin: 0 30rpx 30rpx;
  740. background: #fff;
  741. border-radius: 20rpx;
  742. padding: 28rpx 24rpx;
  743. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.04);
  744. }
  745. .guide-header {
  746. display: flex;
  747. flex-direction: row;
  748. align-items: center;
  749. margin-bottom: 20rpx;
  750. }
  751. .guide-header-icon {
  752. font-size: 32rpx;
  753. margin-right: 12rpx;
  754. }
  755. .guide-header-title {
  756. font-size: 28rpx;
  757. font-weight: 600;
  758. color: #1E293B;
  759. }
  760. .guide-item {
  761. display: flex;
  762. flex-direction: row;
  763. align-items: flex-start;
  764. margin-bottom: 20rpx;
  765. }
  766. .guide-icon-box {
  767. width: 64rpx;
  768. height: 64rpx;
  769. border-radius: 16rpx;
  770. display: flex;
  771. align-items: center;
  772. justify-content: center;
  773. margin-right: 16rpx;
  774. flex-shrink: 0;
  775. }
  776. .guide-icon {
  777. font-size: 32rpx;
  778. }
  779. .guide-icon-blue { background: #DBEAFE; }
  780. .guide-icon-green { background: #DCFCE7; }
  781. .guide-icon-orange { background: #FFEDD5; }
  782. .guide-icon-purple { background: #EDE9FE; }
  783. .guide-icon-teal { background: #CCFBF1; }
  784. .guide-info {
  785. flex: 1;
  786. }
  787. .guide-name {
  788. font-size: 26rpx;
  789. font-weight: 600;
  790. color: #334155;
  791. display: block;
  792. margin-bottom: 4rpx;
  793. }
  794. .guide-desc {
  795. font-size: 22rpx;
  796. color: #94A3B8;
  797. line-height: 1.5;
  798. }
  799. .guide-tips {
  800. margin-top: 8rpx;
  801. padding-top: 16rpx;
  802. border-top: 1rpx solid #F1F5F9;
  803. }
  804. .guide-tips-title {
  805. font-size: 24rpx;
  806. font-weight: 600;
  807. color: #64748B;
  808. display: block;
  809. margin-bottom: 8rpx;
  810. }
  811. .guide-tips-item {
  812. font-size: 22rpx;
  813. color: #94A3B8;
  814. display: block;
  815. line-height: 1.7;
  816. }
  817. </style>