| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061 |
- <template>
- <view class="upload-container" :style="{ '--font-scale': fontScale }">
- <!-- 说明提示 -->
- <view class="tip-banner">
- <text class="tip-icon">📋</text>
- <text class="tip-text">{{ tipText }}</text>
- </view>
- <!-- 成员归属(统一上传:后台按指纹自动识别报告类型,需指定成员以正确归属) -->
- <view class="form-section">
- <view class="member-box">
- <text class="form-label">报告属于哪位成员</text>
- <view class="member-list" v-if="familyMembers.length > 0">
- <view
- class="member-item"
- v-for="(member, mIdx) in familyMembers"
- :key="getMemberKey(member)"
- :class="member._selected ? 'member-selected' : ''"
- hover-class="member-hover"
- @click="selectMemberByIndex(mIdx)">
- <text class="member-avatar">{{ memberInitial(member) }}</text>
- <text class="member-name">{{ member.nickname || '未命名' }}</text>
- </view>
- </view>
- <text class="member-empty" v-else>暂无家庭成员,请先在家庭中添加</text>
- </view>
- </view>
- <!-- 上传方式 -->
- <view class="form-section">
- <view class="upload-methods">
- <view class="upload-card card-chat" @click="pickFromChat">
- <view class="upload-card-icon">💬</view>
- <text class="upload-card-title">从聊天选取</text>
- <text class="upload-card-desc">微信聊天中的 PDF / 图片报告</text>
- </view>
- <view class="upload-card card-photo" @click="takePhoto">
- <view class="upload-card-icon">📷</view>
- <text class="upload-card-title">拍照上传</text>
- <text class="upload-card-desc">拍摄纸质报告(PDF 报告更佳)</text>
- </view>
- </view>
- <!-- 采集中面板 -->
- <view class="collecting-panel" v-if="collecting">
- <view class="collecting-card">
- <view class="collecting-icon">
- <view class="spinner" v-if="!collectError"></view>
- <text class="collecting-fail-mark" v-else>!</text>
- </view>
- <view class="collecting-info">
- <text class="collecting-title">{{ collectError ? '采集失败' : '数据采集中' }}</text>
- <text class="collecting-file">{{ collectFileName || '报告文件' }}</text>
- <text class="collecting-hint">{{ collectError || '后台正在识别报告类型并解析,完成后自动入库' }}</text>
- </view>
- </view>
- <view class="collecting-actions">
- <view class="collecting-btn" @click="goReportList">去报告列表查看</view>
- <view class="collecting-cancel" @click="cancelCollect">取消</view>
- </view>
- </view>
- <!-- 上传中 -->
- <view class="form-item" v-if="uploading">
- <text class="form-label">上传中...</text>
- <view class="analyzing-status">
- <text class="analyzing-text">{{ uploadingText }}</text>
- </view>
- </view>
- <!-- 责任声明 -->
- <view class="form-item disclaimer-box">
- <view class="disclaimer-check" @click="toggleAgree">
- <view class="disclaimer-checkbox" :class="{ 'disclaimer-checked': agreedToTerms }">
- <text class="disclaimer-checkmark" v-if="agreedToTerms">✓</text>
- </view>
- <text class="disclaimer-label">我已阅读并同意以下声明</text>
- </view>
- <view class="disclaimer-content">
- <text class="disclaimer-text">我同意平台使用本报告数据进行分析,为我提供个性化健康解决方案;未经我授权,平台不会以任何形式将我的报告内容提供给其他任何个人或机构。</text>
- </view>
- </view>
- </view>
- <!-- 上传说明 -->
- <view class="guide-section">
- <view class="guide-header">
- <text class="guide-header-icon">📖</text>
- <text class="guide-header-title">支持的报告类型</text>
- </view>
- <view class="guide-list">
- <view class="guide-item">
- <view class="guide-icon-box guide-icon-blue"><text class="guide-icon">📄</text></view>
- <view class="guide-info">
- <text class="guide-name">菌群检测报告</text>
- <text class="guide-desc">肠道菌群 PDF,后台采集解析菌群指标</text>
- <view class="guide-link" v-if="getTypeLink('gut_flora')" @click="goProductDetail('gut_flora')">
- <text class="guide-link-label">查看商品</text>
- <text class="guide-link-name">{{ getTypeLink('gut_flora').productName }}</text>
- <text class="guide-link-arrow">›</text>
- </view>
- </view>
- </view>
- <view class="guide-item">
- <view class="guide-icon-box guide-icon-purple"><text class="guide-icon">🧠</text></view>
- <view class="guide-info">
- <text class="guide-name">素质测评</text>
- <text class="guide-desc">核心素养/认知发展 PDF,系统解析能力、人格、情绪等</text>
- <view class="guide-link" v-if="getTypeLink('dan_a1')" @click="goProductDetail('dan_a1')">
- <text class="guide-link-label">查看商品</text>
- <text class="guide-link-name">{{ getTypeLink('dan_a1').productName }}</text>
- <text class="guide-link-arrow">›</text>
- </view>
- </view>
- </view>
- <view class="guide-item">
- <view class="guide-icon-box guide-icon-blue"><text class="guide-icon">📄</text></view>
- <view class="guide-info">
- <text class="guide-name">体检报告</text>
- <text class="guide-desc">血常规、尿常规、生化检验等,支持 PDF 或清晰照片</text>
- </view>
- </view>
- <view class="guide-item">
- <view class="guide-icon-box guide-icon-orange"><text class="guide-icon">👅</text></view>
- <view class="guide-info">
- <text class="guide-name">舌象照片</text>
- <text class="guide-desc">拍摄舌象照片,AI 辅助舌诊分析</text>
- </view>
- </view>
- <view class="guide-item">
- <view class="guide-icon-box guide-icon-teal"><text class="guide-icon">⚖️</text></view>
- <view class="guide-info">
- <text class="guide-name">体脂秤报告</text>
- <text class="guide-desc">拍摄体脂秤显示屏,自动提取体重、BMI、体脂率等</text>
- </view>
- </view>
- </view>
- <view class="guide-tips">
- <text class="guide-tips-title">温馨提示</text>
- <text class="guide-tips-item">· 上传后无需选择类型,后台自动识别报告种类并解析</text>
- <text class="guide-tips-item">· 请先选择报告归属成员,再上传文件</text>
- <text class="guide-tips-item">· 请确认报告清晰完整,以便准确解析</text>
- <text class="guide-tips-item">· 确认入库后将自动生成成长方案,可再分解为每日任务</text>
- </view>
- </view>
- <!-- 关联商品(后台配置的报告类型→商品;按商品 id 去重,点击可查看并购买) -->
- <view class="linked-products-section" v-if="linkedProducts.length > 0">
- <view class="linked-products-header">
- <text class="linked-products-header-icon">🛒</text>
- <text class="linked-products-title">关联商品</text>
- </view>
- <text class="linked-products-desc">以下商品与您的报告类型对应,点击可查看并购买</text>
- <view class="linked-products-grid">
- <view
- class="linked-product-card"
- v-for="(product, pIdx) in linkedProducts"
- :key="getProductKey(product)"
- hover-class="linked-product-hover"
- @click="goProductDetailByProduct(product.productId)">
- <view class="linked-product-info">
- <text class="linked-product-name">{{ product.productName }}</text>
- <text class="linked-product-tag">报告关联商品</text>
- </view>
- <view class="linked-product-btn">查看 / 购买</view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import { normalizeMembers, memberIdOf } from '../../utils/memberNormalize.js'
- import { uploadReportOnly, getReportCollectStatus, getFamilyMemberList, requestReportTransfer, getReportTypeLinks } from '../../utils/api.js'
- import { pickImage } from '../../utils/image-picker.js'
- import fontScaleMixin from '@/mixins/font-scale.js'
- export default {
- mixins: [fontScaleMixin],
- data() {
- return {
- memberId: null,
- reportKind: '',
- uploadType: null, // 'tongue' | null;从 URL query reportType 读取
- familyMembers: [],
- uploading: false,
- agreedToTerms: false,
- uploadingText: '正在上传文件...',
- collectDraftId: null,
- collectTimer: null,
- collecting: false,
- collectFileName: '',
- collectError: '',
- collectPollCount: 0,
- reportTypeLinks: [] // 报告类型→商城商品链接配置(后台可配置),供「查看商品」入口展示
- }
- },
- computed: {
- tipText: function() {
- return '上传报告后由系统自动识别类型并解析:菌群检测、素质测评 A2、体检报告等'
- },
- // 关联商品:遍历报告类型→商品链接配置,按商品 id(linkedProductId)去重(Set 语义),
- // 多个报告类型关联同一商品时只展示一次;未配置/接口失败返回 [],页面静默隐藏卡片区
- linkedProducts: function() {
- var list = this.reportTypeLinks || []
- var seen = {}
- var result = []
- for (var i = 0; i < list.length; i++) {
- var link = list[i]
- if (!link || !link.linkedProductId) continue
- var pid = parseInt(link.linkedProductId)
- if (!pid || isNaN(pid) || pid <= 0) continue
- if (seen[pid]) continue
- seen[pid] = true
- result.push({ productId: pid, productName: link.productName || '' })
- }
- return result
- }
- },
- onLoad: function(options) {
- this.memberId = options.memberId ? parseInt(options.memberId) : null
- if (options.type === 'a2' || options.reportKind === 'a2') {
- this.reportKind = 'a2'
- } else if (options.type === 'gut' || options.reportKind === 'gut') {
- this.reportKind = 'gut'
- }
- if (options.reportType === 'tongue' || options.type === 'tongue') {
- this.uploadType = 'tongue'
- }
- this.loadFamilyMembers()
- this.loadReportTypeLinks()
- },
- onUnload: function() {
- this.stopCollectPolling()
- },
- methods: {
- resolveMemberId: function(member) {
- if (!member) return null
- var raw = memberIdOf(member)
- if (raw === 0 || raw === '0') return 0
- if (!raw) return null
- var id = parseInt(raw)
- return isNaN(id) ? null : id
- },
- selectMemberByIndex: function(idx) {
- var list = this.familyMembers
- if (!list || idx < 0 || idx >= list.length) return
- var id = this.resolveMemberId(list[idx])
- if (id === null) {
- uni.showToast({ title: '该成员缺少编号,无法选择', icon: 'none' })
- return
- }
- this.memberId = id
- this.markSelectedMember(id)
- },
- markSelectedMember: function(memberId) {
- var list = this.familyMembers || []
- var target = memberId === null || memberId === undefined ? null : parseInt(memberId)
- for (var i = 0; i < list.length; i++) {
- var cur = this.resolveMemberId(list[i])
- this.$set(list[i], '_selected', target !== null && !isNaN(target) && cur === target)
- }
- },
- getMemberKey: function(member) {
- var id = this.resolveMemberId(member)
- return id === null ? 'm0' : ('m' + id)
- },
- memberInitial: function(member) {
- var name = (member && member.nickname) || '?'
- return name.substring(0, 1)
- },
- loadFamilyMembers: function() {
- var self = this
- getFamilyMemberList({ visibleOnly: true }).then(function(res) {
- var list = (res && res.data) || []
- // 前端防御层:按 user_id 折叠同用户多行,isSelf 唯一;统一身份键 memberId
- var normalized = normalizeMembers(list instanceof Array ? list : [], { userId: uni.getStorageSync('userId') })
- self.familyMembers = normalized
- if (!self.memberId && self.familyMembers.length === 1) {
- self.memberId = self.resolveMemberId(self.familyMembers[0])
- }
- self.markSelectedMember(self.memberId)
- }).catch(function() {
- self.familyMembers = []
- })
- },
- // 拉取「报告类型→商城商品」链接配置;接口失败时静默回退纯展示(不阻断页面)
- loadReportTypeLinks: function() {
- var self = this
- getReportTypeLinks().then(function(res) {
- var list = (res && res.data) || []
- self.reportTypeLinks = list instanceof Array ? list : []
- }).catch(function() {
- self.reportTypeLinks = []
- })
- },
- // 根据 typeId 查找已配置的链接信息(未配置/接口失败返回 null,前端回退为纯展示)
- getTypeLink: function(typeId) {
- var list = this.reportTypeLinks || []
- for (var i = 0; i < list.length; i++) {
- if (list[i] && list[i].typeId === typeId) return list[i]
- }
- return null
- },
- // 点击「查看商品」跳转到配置的商城商品详情页
- goProductDetail: function(typeId) {
- var link = this.getTypeLink(typeId)
- if (!link || !link.linkedProductId) return
- uni.navigateTo({ url: '/pages/discover-detail/product-detail/product-detail?id=' + link.linkedProductId })
- },
- // 商品卡片 :key(按商品 id 唯一,避免多类型关联同商品时模板键冲突)
- getProductKey: function(product) {
- return 'lp' + (product && product.productId)
- },
- // 点击「关联商品」卡片 → 按商品 id 直接跳转商城商品详情页(详情页含购买/加购入口)
- goProductDetailByProduct: function(productId) {
- if (!productId) return
- uni.navigateTo({ url: '/pages/discover-detail/product-detail/product-detail?id=' + productId })
- },
- ensureMember: function() {
- if (this.memberId) return true
- uni.showToast({ title: '请先选择报告所属成员', icon: 'none' })
- return false
- },
- toggleAgree: function() {
- this.agreedToTerms = !this.agreedToTerms
- },
- ensureAgreed: function(callback) {
- if (this.agreedToTerms) {
- callback()
- return
- }
- var self = this
- uni.showModal({
- title: '数据使用声明',
- content: '上传报告即代表您同意平台使用本报告数据进行分析,为您提供个性化健康解决方案;未经您授权,平台不会以任何形式将您的报告内容提供给其他任何个人或机构。点击「同意继续」即表示您已阅读并同意。',
- confirmText: '同意继续',
- cancelText: '暂不',
- success: function(res) {
- if (res.confirm) {
- self.agreedToTerms = true
- callback()
- }
- }
- })
- },
- pickFromChat: function() {
- var self = this
- if (!this.ensureMember()) return
- this.ensureAgreed(function() {
- // type='all' 的选择器默认停留在图片 tab,用户难以发现可切换选文件。
- // 改为先弹 actionSheet 让用户明确选择图片或文件,分别走对应 type。
- uni.showActionSheet({
- itemList: ['聊天中的文件(PDF等)', '聊天中的图片'],
- success: function(res) {
- if (res.tapIndex === 0) {
- self.chooseChatFile('file', '聊天文件')
- } else if (res.tapIndex === 1) {
- self.chooseChatFile('image', '聊天图片')
- }
- },
- fail: function() {
- // 用户取消,静默处理
- }
- })
- })
- },
- chooseChatFile: function(type, fallbackName) {
- var self = this
- uni.chooseMessageFile({
- count: 1,
- type: type,
- success: function(res) {
- var files = res.tempFiles
- if (files && files.length > 0) {
- self.uploadReport(files[0].path, files[0].name || fallbackName)
- }
- },
- fail: function() {
- // 用户取消或失败,静默处理
- }
- })
- },
- takePhoto: function() {
- var self = this
- if (!this.ensureMember()) return
- this.ensureAgreed(function() {
- pickImage({
- count: 1,
- sourceType: ['camera', 'album'],
- success: function(res) {
- if (res.tempFilePaths && res.tempFilePaths.length > 0) {
- self.uploadReport(res.tempFilePaths[0], '照片')
- }
- }
- })
- })
- },
- uploadReport: function(filePath, fileName) {
- if (!filePath) return
- var self = this
- self.uploading = true
- self.uploadingText = '正在上传文件...'
- uni.showLoading({ title: '上传中...' })
-
- // 统一上传:舌诊照片(uploadType=tongue)走舌诊专用流程;其余 type=auto,后台指纹判定后走对应采集管道(dan_a2 → DAN入库 / 其余 → 健康报告)
- uploadReportOnly(filePath, self.uploadType || 'auto', self.memberId).then(function(res) {
- uni.hideLoading()
- self.uploading = false
- var data = res.data || {}
- // 舌诊照片:后端直接返回 recordId + 舌诊指标,不走 draft/collect 流程
- if (data.type === 'tongue' || data.recordId) {
- var tonguePayload = {
- type: 'tongue',
- recordId: data.recordId,
- indicators: data.indicators || [],
- summary: { overallAssessment: data.overallAssessment || '' }
- }
- var url = '/pages/health/report-confirm?payload=' + encodeURIComponent(JSON.stringify(tonguePayload))
- if (self.memberId) url += '&memberId=' + self.memberId
- uni.redirectTo({ url: url })
- return
- }
- // 处理重复上传:duplicate=true
- if (data.duplicate) {
- if (data.collecting) {
- self.collectDraftId = data.draftId
- self.collecting = true
- self.collectError = data.message || '该报告正在解析中,请稍候'
- self.collectFileName = fileName || '报告文件'
- self.startCollectPolling(data.draftId)
- } else if (data.crossFamily) {
- // 同一份报告已被其他家庭上传:弹窗确认后向原家庭发起转移申请,不跳详情
- self.confirmCrossFamilyTransfer(data)
- return
- } else {
- // 本家庭已完成,跳转详情
- var reportId = data.reportId
- if (reportId) {
- self.goToDetail(reportId, 'gut_flora')
- }
- }
- uni.showToast({ title: data.message || '该报告已上传过', icon: 'none', duration: 3000 })
- return
- }
- var draftId = data.draftId
- if (!draftId) {
- uni.showToast({ title: (res && res.message) || '上传失败', icon: 'none' })
- return
- }
- self.collectDraftId = draftId
- self.collecting = true
- self.collectError = ''
- self.collectFileName = fileName || '报告文件'
- self.startCollectPolling(draftId)
- }).catch(function(err) {
- uni.hideLoading()
- self.uploading = false
- var msg = (err && err.message) || '上传失败,请重试'
- uni.showToast({ title: msg, icon: 'none' })
- })
- },
- // 跨家庭重复上传:弹窗确认后向原家庭发起转移申请(原家庭同意后报告才转入本家庭)
- confirmCrossFamilyTransfer: function(data) {
- uni.showModal({
- title: '申请转移报告',
- content: '该报告已由其他家庭上传。发起申请后需对方家庭同意,报告才会转入您的家庭;同意前您无法查看该报告。是否发起申请?',
- confirmText: '发起申请',
- cancelText: '取消',
- success: function(res) {
- if (!res.confirm) return
- requestReportTransfer(data.reportId).then(function(r) {
- if (r && r.code === 200) {
- uni.showToast({ title: '申请已提交,等待对方家庭同意', icon: 'none', duration: 3000 })
- } else {
- uni.showToast({ title: (r && r.message) || '申请失败', icon: 'none' })
- }
- }).catch(function() {
- uni.showToast({ title: '申请失败,请重试', icon: 'none' })
- })
- }
- })
- },
- stopCollectPolling: function() {
- if (this.collectTimer) {
- clearInterval(this.collectTimer)
- this.collectTimer = null
- }
- },
- startCollectPolling: function(draftId) {
- var self = this
- self.stopCollectPolling()
- self.collectPollCount = 0
- self.pollCollectStatus(draftId)
- self.collectTimer = setInterval(function() {
- self.pollCollectStatus(draftId)
- }, 4000)
- },
- pollCollectStatus: function(draftId) {
- var self = this
- self.collectPollCount = (self.collectPollCount || 0) + 1
- // 约 6 分钟仍未完成:停轮询,提示去列表看进度
- if (self.collectPollCount > 90) {
- self.stopCollectPolling()
- self.collectError = '解析耗时较长,可去报告列表查看进度,无需重复上传'
- return
- }
- getReportCollectStatus(draftId).then(function(res) {
- var data = res.data || {}
- var status = data.parseStatus
- if (status === 'completed') {
- self.stopCollectPolling()
- self.collecting = false
- uni.showToast({ title: '报告已采集完成', icon: 'success', duration: 2000 })
- var reportId = data.reportId
- var reportType = data.reportType || 'gut_flora'
- setTimeout(function() {
- if (reportId) {
- // 后端指纹识别后统一入库:dan_* → DAN 报告页,其余 → 健康报告详情页
- if (reportType && reportType.indexOf('dan_') === 0) {
- uni.redirectTo({ url: '/pages/dan-assessment/report-result?reportId=' + reportId })
- } else if (reportType === 'gut_flora') {
- uni.redirectTo({ url: '/pages/health/gut-flora-detail?reportId=' + reportId })
- } else {
- uni.redirectTo({ url: '/pages/health/report-detail?reportType=' + reportType + '&reportId=' + reportId })
- }
- } else {
- uni.redirectTo({ url: '/pages/health/report-list' })
- }
- }, 600)
- } else if (status === 'failed') {
- self.stopCollectPolling()
- self.collectError = data.parseError || '报告采集失败,请重试'
- uni.showToast({ title: self.collectError, icon: 'none', duration: 3000 })
- }
- }).catch(function() {
- // 轮询失败静默,下次继续
- })
- },
- goReportList: function() {
- this.stopCollectPolling()
- uni.redirectTo({ url: '/pages/health/report-list' })
- },
- goToDetail: function(reportId, reportType) {
- var url
- if (reportType === 'gut_flora') {
- url = '/pages/health/gut-flora-detail?reportId=' + reportId
- } else {
- url = '/pages/health/report-detail?reportType=' + (reportType || 'gut_flora') + '&reportId=' + reportId
- }
- uni.redirectTo({ url: url })
- },
- cancelCollect: function() {
- this.stopCollectPolling()
- this.collecting = false
- this.collectDraftId = null
- this.collectFileName = ''
- this.collectError = ''
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .upload-container {
- min-height: 100vh;
- background: $app-bg;
- padding-bottom: env(safe-area-inset-bottom);
- }
- .tip-banner {
- display: flex;
- flex-direction: row;
- align-items: center;
- background: $mat-blue-tint;
- margin: 20rpx $uni-space-lg;
- padding: 20rpx 24rpx;
- border-radius: 16rpx;
- }
- .tip-icon {
- font-size: calc(32rpx * var(--font-scale, 1));
- margin-right: 16rpx;
- flex-shrink: 0;
- }
- .tip-text {
- font-size: calc(24rpx * var(--font-scale, 1));
- color: $mat-blue-strong;
- line-height: 1.5;
- }
- .form-section {
- margin: 0 $uni-space-lg;
- }
- .member-box {
- background: $app-surface;
- border-radius: 16rpx;
- padding: 24rpx;
- margin-bottom: 20rpx;
- }
- .member-list {
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- gap: 16rpx;
- }
- .member-item {
- display: flex;
- flex-direction: column;
- align-items: center;
- padding: 16rpx 20rpx;
- background: $app-bg;
- border-radius: 16rpx;
- border: 2rpx solid transparent;
- width: calc((100% - 48rpx) / 4);
- }
- .member-selected {
- background: $violet-tint-100;
- border-color: $facade-violet;
- }
- .member-hover {
- opacity: 0.85;
- }
- .member-avatar {
- width: 64rpx;
- height: 64rpx;
- border-radius: 50%;
- background: $facade-violet;
- color: $app-surface;
- font-size: calc(28rpx * var(--font-scale, 1));
- font-weight: bold;
- text-align: center;
- line-height: 64rpx;
- margin-bottom: 8rpx;
- }
- .member-name {
- font-size: calc(24rpx * var(--font-scale, 1));
- color: $facade-text-strong;
- }
- .member-empty {
- font-size: calc(24rpx * var(--font-scale, 1));
- color: $app-text-subtle;
- }
- .form-item {
- background: $app-surface;
- border-radius: 16rpx;
- padding: 24rpx;
- margin-bottom: 20rpx;
- }
- .form-label {
- font-size: calc(26rpx * var(--font-scale, 1));
- font-weight: bold;
- color: $facade-text-strong;
- display: block;
- margin-bottom: 16rpx;
- }
- /* 上传方式卡片 */
- .upload-methods {
- display: flex;
- flex-direction: row;
- gap: 16rpx;
- margin-bottom: 20rpx;
- }
- .upload-card {
- flex: 1;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- padding: 32rpx 12rpx;
- border-radius: 24rpx;
- text-align: center;
- min-height: 200rpx;
- }
- .upload-card:active {
- opacity: 0.85;
- }
- .upload-card-icon {
- width: 80rpx;
- height: 80rpx;
- border-radius: 24rpx;
- font-size: calc(40rpx * var(--font-scale, 1));
- display: flex;
- align-items: center;
- justify-content: center;
- margin-bottom: 16rpx;
- }
- .upload-card-title {
- font-size: calc(26rpx * var(--font-scale, 1));
- font-weight: 600;
- color: $facade-text-strong;
- margin-bottom: 8rpx;
- }
- .upload-card-desc {
- font-size: calc(20rpx * var(--font-scale, 1));
- color: $app-text-subtle;
- line-height: 1.5;
- }
- .card-chat {
- background: $tint-sky-ghost;
- border: 2rpx dashed $tint-blue-300;
- }
- .card-chat .upload-card-icon {
- background: linear-gradient(135deg, $status-info, $status-info-deep-3);
- color: $app-surface;
- }
- .card-photo {
- background: $uni-primary-pale;
- border: 2rpx solid $brand-primary-light-2;
- }
- .card-photo .upload-card-icon {
- background: linear-gradient(135deg, $brand-primary-light, $brand-primary-dark);
- color: $app-surface;
- }
- /* 采集中面板 */
- .collecting-panel {
- margin-bottom: 20rpx;
- }
- .collecting-card {
- display: flex;
- flex-direction: row;
- align-items: flex-start;
- background: #FFF8E6;
- border: 1rpx solid #F5D78E;
- border-radius: 16rpx;
- padding: 28rpx 24rpx;
- }
- .collecting-icon {
- width: 56rpx;
- height: 56rpx;
- border-radius: 50%;
- background: $status-warning-gold;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-right: 20rpx;
- flex-shrink: 0;
- }
- .spinner {
- width: 28rpx;
- height: 28rpx;
- border: 4rpx solid rgba(255,255,255,0.4);
- border-top-color: $app-surface;
- border-radius: 50%;
- animation: collecting-spin 1s linear infinite;
- }
- @keyframes collecting-spin {
- 0% { transform: rotate(0deg); }
- 100% { transform: rotate(360deg); }
- }
- .collecting-fail-mark {
- font-size: calc(32rpx * var(--font-scale, 1));
- color: $app-surface;
- font-weight: bold;
- }
- .collecting-info {
- flex: 1;
- display: flex;
- flex-direction: column;
- min-width: 0;
- }
- .collecting-title {
- font-size: calc(30rpx * var(--font-scale, 1));
- font-weight: 600;
- color: #7A5C00;
- }
- .collecting-file {
- font-size: calc(24rpx * var(--font-scale, 1));
- color: #A08A45;
- margin-top: 6rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .collecting-hint {
- font-size: calc(22rpx * var(--font-scale, 1));
- color: #C0A75A;
- margin-top: 8rpx;
- line-height: 1.5;
- }
- .collecting-actions {
- display: flex;
- flex-direction: row;
- gap: 16rpx;
- margin-top: 16rpx;
- }
- .collecting-btn {
- flex: 1;
- height: 72rpx;
- line-height: 72rpx;
- text-align: center;
- background: $brand-primary;
- color: $app-surface;
- font-size: calc(28rpx * var(--font-scale, 1));
- border-radius: 16rpx;
- }
- .collecting-cancel {
- padding: 0 24rpx;
- height: 72rpx;
- line-height: 72rpx;
- text-align: center;
- background: $app-surface;
- border: 1rpx solid $app-border-strong;
- color: $facade-text-body;
- font-size: calc(28rpx * var(--font-scale, 1));
- border-radius: 16rpx;
- }
- /* 上传中状态 */
- .analyzing-status {
- display: flex;
- flex-direction: row;
- align-items: center;
- }
- .analyzing-text {
- font-size: calc(26rpx * var(--font-scale, 1));
- color: $uni-info;
- }
- /* 责任声明 */
- .disclaimer-box {
- background: $dim-body-tint;
- border: 2rpx solid $status-warning-light;
- }
- .disclaimer-check {
- display: flex;
- flex-direction: row;
- align-items: center;
- margin-bottom: 12rpx;
- }
- .disclaimer-checkbox {
- width: 36rpx;
- height: 36rpx;
- border-radius: 8rpx;
- border: 2rpx solid $uni-border-color;
- background: $app-surface;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-shrink: 0;
- margin-right: 12rpx;
- }
- .disclaimer-checked {
- background: $brand-primary;
- border-color: $brand-primary;
- }
- .disclaimer-checkmark {
- font-size: calc(24rpx * var(--font-scale, 1));
- color: $app-surface;
- font-weight: bold;
- }
- .disclaimer-label {
- font-size: calc(24rpx * var(--font-scale, 1));
- color: $facade-text-strong;
- font-weight: 500;
- }
- .disclaimer-content {
- background: #FFFDF5;
- border-radius: 8rpx;
- padding: 16rpx;
- margin-left: 48rpx;
- }
- .disclaimer-text {
- font-size: calc(22rpx * var(--font-scale, 1));
- color: $status-warning-strong;
- line-height: 1.6;
- }
- /* 上传说明 */
- .guide-section {
- margin: 0 $uni-space-lg $uni-space-xl;
- background: $app-surface;
- border-radius: 24rpx;
- padding: 28rpx 24rpx;
- box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.04);
- }
- .guide-header {
- display: flex;
- flex-direction: row;
- align-items: center;
- margin-bottom: 20rpx;
- }
- .guide-header-icon {
- font-size: calc(32rpx * var(--font-scale, 1));
- margin-right: 12rpx;
- }
- .guide-header-title {
- font-size: calc(28rpx * var(--font-scale, 1));
- font-weight: 600;
- color: $uni-text-color;
- }
- .guide-item {
- display: flex;
- flex-direction: row;
- align-items: flex-start;
- margin-bottom: 20rpx;
- }
- .guide-icon-box {
- width: 64rpx;
- height: 64rpx;
- border-radius: 16rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-right: 16rpx;
- flex-shrink: 0;
- }
- .guide-icon {
- font-size: calc(32rpx * var(--font-scale, 1));
- }
- .guide-icon-blue { background: $status-info-soft; }
- .guide-icon-green { background: $status-success-soft-2; }
- .guide-icon-orange { background: $facade-brand-tint-2; }
- .guide-icon-purple { background: $violet-tint-100; }
- .guide-icon-teal { background: #CCFBF1; }
- .guide-info {
- flex: 1;
- }
- .guide-name {
- font-size: calc(26rpx * var(--font-scale, 1));
- font-weight: 600;
- color: $facade-text-slate-700;
- display: block;
- margin-bottom: 4rpx;
- }
- .guide-desc {
- font-size: calc(22rpx * var(--font-scale, 1));
- color: $app-text-subtle;
- line-height: 1.5;
- }
- .guide-link {
- display: flex;
- flex-direction: row;
- align-items: center;
- margin-top: 10rpx;
- padding: 8rpx 16rpx;
- border-radius: 10rpx;
- background: $facade-brand-tint-2;
- align-self: flex-start;
- }
- .guide-link-label {
- font-size: calc(22rpx * var(--font-scale, 1));
- color: $facade-violet;
- font-weight: 600;
- margin-right: 8rpx;
- }
- .guide-link-name {
- font-size: calc(22rpx * var(--font-scale, 1));
- color: $facade-text-strong;
- max-width: 320rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .guide-link-arrow {
- font-size: calc(26rpx * var(--font-scale, 1));
- color: $facade-violet;
- margin-left: 6rpx;
- }
- .guide-tips {
- margin-top: 8rpx;
- padding-top: 16rpx;
- border-top: 1rpx solid $facade-fill-slate;
- }
- .guide-tips-title {
- font-size: calc(24rpx * var(--font-scale, 1));
- font-weight: 600;
- color: $uni-text-color-secondary;
- display: block;
- margin-bottom: 8rpx;
- }
- .guide-tips-item {
- font-size: calc(22rpx * var(--font-scale, 1));
- color: $app-text-subtle;
- display: block;
- line-height: 1.7;
- }
- /* 关联商品卡片区(视觉与 guide-section 一致) */
- .linked-products-section {
- margin: 0 $uni-space-lg $uni-space-xl;
- background: $app-surface;
- border-radius: 24rpx;
- padding: 28rpx 24rpx;
- box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.04);
- }
- .linked-products-header {
- display: flex;
- flex-direction: row;
- align-items: center;
- margin-bottom: 8rpx;
- }
- .linked-products-header-icon {
- font-size: calc(32rpx * var(--font-scale, 1));
- margin-right: 12rpx;
- }
- .linked-products-title {
- font-size: calc(28rpx * var(--font-scale, 1));
- font-weight: 600;
- color: $uni-text-color;
- }
- .linked-products-desc {
- font-size: calc(22rpx * var(--font-scale, 1));
- color: $app-text-subtle;
- line-height: 1.5;
- display: block;
- margin-bottom: 20rpx;
- }
- .linked-products-grid {
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- gap: 16rpx;
- }
- .linked-product-card {
- width: calc((100% - 16rpx) / 2);
- display: flex;
- flex-direction: column;
- background: $app-bg;
- border: 2rpx solid $facade-fill-slate;
- border-radius: 16rpx;
- padding: 20rpx 16rpx;
- }
- .linked-product-hover {
- opacity: 0.85;
- }
- .linked-product-info {
- flex: 1;
- display: flex;
- flex-direction: column;
- min-width: 0;
- }
- .linked-product-name {
- font-size: calc(24rpx * var(--font-scale, 1));
- font-weight: 600;
- color: $facade-text-strong;
- display: block;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- margin-bottom: 6rpx;
- }
- .linked-product-tag {
- font-size: calc(20rpx * var(--font-scale, 1));
- color: $app-text-subtle;
- }
- .linked-product-btn {
- margin-top: 14rpx;
- height: 56rpx;
- line-height: 56rpx;
- text-align: center;
- background: $facade-brand-tint-2;
- color: $facade-violet;
- font-size: calc(24rpx * var(--font-scale, 1));
- font-weight: 600;
- border-radius: 12rpx;
- }
- </style>
|