From 2aa2d00033aced51f0eb090383abb35e22d9c3d6 Mon Sep 17 00:00:00 2001 From: ZhaoYang <565837861@qq.com> Date: Sat, 28 Feb 2026 18:39:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9C=E7=A8=8B=E8=AF=8A=E7=96=97=EF=BC=8C?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 4 +- pages/home/home.js | 7 + pages/home/home.wxml | 2 +- pagesA/images/kzt.png | Bin 0 -> 8661 bytes pagesA/pages/askingSy/askingSy.js | 66 + pagesA/pages/askingSy/askingSy.json | 4 + pagesA/pages/askingSy/askingSy.wxml | 98 ++ pagesA/pages/askingSy/askingSy.wxss | 428 +++++++ .../pages/askingSyDetails/askingSyDetails.js | 569 +++++++++ .../askingSyDetails/askingSyDetails.json | 4 + .../askingSyDetails/askingSyDetails.wxml | 243 ++++ .../askingSyDetails/askingSyDetails.wxss | 1067 +++++++++++++++++ utils/api.js | 16 +- 13 files changed, 2504 insertions(+), 4 deletions(-) create mode 100644 pagesA/images/kzt.png create mode 100644 pagesA/pages/askingSy/askingSy.js create mode 100644 pagesA/pages/askingSy/askingSy.json create mode 100644 pagesA/pages/askingSy/askingSy.wxml create mode 100644 pagesA/pages/askingSy/askingSy.wxss create mode 100644 pagesA/pages/askingSyDetails/askingSyDetails.js create mode 100644 pagesA/pages/askingSyDetails/askingSyDetails.json create mode 100644 pagesA/pages/askingSyDetails/askingSyDetails.wxml create mode 100644 pagesA/pages/askingSyDetails/askingSyDetails.wxss diff --git a/app.json b/app.json index 337f3eb..dedf6ec 100644 --- a/app.json +++ b/app.json @@ -9,7 +9,9 @@ { "root": "pagesA", "pages": [ - "pages/carouselDetail/carouselDetail" + "pages/carouselDetail/carouselDetail", + "pages/askingSy/askingSy", + "pages/askingSyDetails/askingSyDetails" ] }, { diff --git a/pages/home/home.js b/pages/home/home.js index d76aa24..50c0168 100644 --- a/pages/home/home.js +++ b/pages/home/home.js @@ -40,6 +40,13 @@ Page({ }) }, + // 远程诊疗 + bindYczl() { + wx.navigateTo({ + url: '/pagesA/pages/askingSy/askingSy', + }) + }, + // 在线问答列表 getforumList() { diff --git a/pages/home/home.wxml b/pages/home/home.wxml index da8165c..3e1b99e 100644 --- a/pages/home/home.wxml +++ b/pages/home/home.wxml @@ -53,7 +53,7 @@ 快捷回复 - + 远程诊疗 足不出户方便快捷 diff --git a/pagesA/images/kzt.png b/pagesA/images/kzt.png new file mode 100644 index 0000000000000000000000000000000000000000..39886b60a44d93598fa425ca4e517b5d047c924b GIT binary patch literal 8661 zcmX9@by!pX_us|_VaRD`N`?o<<%8I|NmHj;2~ihof0$%2!Vfeaz+^A;OOLk{hS{h9TV*Tmm+8$93Jl<9OD+3506g|4vr5G zkN5Tu@droCtLuc&-24Ke4T3>fhleKzhe!Wg|E2HY5BCp`@%x8_q6ES9jV;0;yZeXx z2Sx8?&29YB$~vJOVa)Z- z?d@Is*7h!8>J-C_NW!_s`j{Ht2V}b@KhE^2O!f0D`H&IBRFoG`{hhrap`4dSqKW*r zhB-9mrM26=+Gp9yy`gbApRsyj-gRCy^qk<+ZNJmEUnFurzPQ&lM{ zvYsev1G6sbuFw{!82G}^FR()XQt!~$qQrXjka&JzeWO3>MjI3_)x+rc-*zdmQIEbH zIU85tps&M*{ZwG#5dGrLW{C(fd@4S4MN3@phAe57EUUQHyJp5wNN;t9gumpU@J#ER z!&Cry7Wm6cSE1QAwUu6gZG({N91+{Yd|nUvo7NuaB+Kt4*Zp~tdFgL_XYFQRB|Y)5hB7 z%ls?EgYe`7m&FNVNwwYiNy-fq-$tPuHpYyM7K+wMKL z53iNpiMm}G$_x9!HbV_z`VN2#lrHF?n39*tDbI&K!96_~?Nshz0dp$NkCi(|k<`Hf z=hUwI+*vI{Z1sTpB53IW@V(w)q_IcN5`Do#QFex;PpplR&YK2@zGSHiD(7*Iq3_<; zNabbpyf>}|{P;&(a3>M@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u5YN0mTB^@~YI5|7{aTYDD_TJ`wOrfUF3FYb3lm*A-*p2{&%#9XJpkL#Y? zn5)!ueynlPc`;<+v(4XZz9UB+FLiM%UOssi@6mNY4B3Br|YlYXQ1FCN=(=}>x)4@WuN4~C_1 z_xOTeQ?CUlqlqTG*C!Pt%L2?>MeQ}ti}~-mTB7~g$+=3oH4`~a7HM^)-Ee({aC!g2 zvH*rxCao3s53-l1Jn2Rx)yC9g89S+Xbqk({^0CMfbe_x^x9BaE1$zvQkuZ3%rQ5#MdWZ4*qG@8LGalT#$KP{<_LPL0Fha zGm%T@&_9dZeK}VAX_^1CvX^Sd6q_4pro@s3PpYzJkDevI1U(_aYuF&lpkNF?S~%Nd3$;&-Xyz-R#w@WL~T3ub1~~WMa2+ zuTEb`74?YW9#+>Yh45VNIfhKhh4KFI#*t0Ea23(Z=4Fy`$EjA=7)hi%k7=a}q7QP@ z)VaF~&`T#B-ivFoye4(53Y5{7<>-2~vE!efYJ58~l9B5Rc { + console.log(1111, res); + this.setData({ + diagnosisList: res.rows + }) + } + }) + }, + + + + // 格式化日期显示 + formatDate: function (dateString) { + const date = new Date(dateString); + const now = new Date(); + const diff = now - date; + const diffDays = Math.floor(diff / (1000 * 60 * 60 * 24)); + const diffHours = Math.floor(diff / (1000 * 60 * 60)); + const diffMinutes = Math.floor(diff / (1000 * 60)); + + if (diffMinutes < 60) { + return `${diffMinutes}分钟前`; + } else if (diffHours < 24) { + return `${diffHours}小时前`; + } else if (diffDays === 1) { + return '昨天'; + } else if (diffDays === 2) { + return '前天'; + } else if (diffDays < 7) { + return `${diffDays}天前`; + } else { + const month = date.getMonth() + 1; + const day = date.getDate(); + return `${month}月${day}日`; + } + }, + + + // 查看详情 + viewDetail: function (e) { + const data = e.currentTarget.dataset.value + wx.navigateTo({ + url: `/pagesA/pages/askingSyDetails/askingSyDetails?data=${encodeURIComponent(JSON.stringify(data))}`, + }); + }, + +}); \ No newline at end of file diff --git a/pagesA/pages/askingSy/askingSy.json b/pagesA/pages/askingSy/askingSy.json new file mode 100644 index 0000000..bd4f970 --- /dev/null +++ b/pagesA/pages/askingSy/askingSy.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText":"问诊单列表", + "usingComponents": {} +} \ No newline at end of file diff --git a/pagesA/pages/askingSy/askingSy.wxml b/pagesA/pages/askingSy/askingSy.wxml new file mode 100644 index 0000000..9c89855 --- /dev/null +++ b/pagesA/pages/askingSy/askingSy.wxml @@ -0,0 +1,98 @@ + + + + + + 远程诊疗 + 专业兽医在线解答 + + + + + + + + + + + + + + 暂无问诊记录 + 开始您的第一次问诊吧 + + + + + + 问诊记录 + {{diagnosisList.length}}条 + + + + + + + + {{item.farmerName || '用户'}} + + + {{item.status}} + + + + + + + + + 牲畜信息 + + + + + + + {{item.animalType}} + + + {{item.animalAge}} + + + {{item.animalGender}} + + + + + + + + {{item.description}} + + + + + + + + {{item.createdTime}} + + + + + + {{item.replyCount}}条回复 + + + + + + + + + 已显示全部记录 + + + + + \ No newline at end of file diff --git a/pagesA/pages/askingSy/askingSy.wxss b/pagesA/pages/askingSy/askingSy.wxss new file mode 100644 index 0000000..b9c6ccf --- /dev/null +++ b/pagesA/pages/askingSy/askingSy.wxss @@ -0,0 +1,428 @@ +/* 全局样式 */ +.wzbox{ + min-height: 100vh; + position: relative; + background: linear-gradient(180deg, #F8FBFF 0%, #F0F7FF 100%); +} + +/* 头部样式优化 */ +.header { + padding: 20rpx 40rpx 20rpx; + background: linear-gradient(135deg, #6D9EFF 0%, #4A7CFF 100%); + border-radius: 0 0 36rpx 36rpx; + box-shadow: 0 4rpx 20rpx rgba(74, 144, 226, 0.15); + position: relative; + overflow: hidden; +} + +.header-content { + position: relative; + z-index: 2; +} + +.title-section { + display: flex; + flex-direction: column; + gap: 8rpx; +} + +.title { + font-size: 44rpx; + font-weight: 700; + color: #FFFFFF; + letter-spacing: 0.5rpx; + text-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1); +} + +.subtitle { + font-size: 28rpx; + color: rgba(255, 255, 255, 0.9); + font-weight: 400; +} + +/* 头部装饰元素 */ +.header-decoration { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + overflow: hidden; + z-index: 1; +} + +.decoration-circle { + position: absolute; + border-radius: 50%; + background: rgba(255, 255, 255, 0.08); +} + +.circle-1 { + width: 200rpx; + height: 200rpx; + top: -80rpx; + right: -40rpx; +} + +.circle-2 { + width: 120rpx; + height: 120rpx; + bottom: -40rpx; + left: -20rpx; +} + +/* 问诊记录列表 */ +.record-list { + height: calc(100vh - 200rpx); + padding: 0 32rpx 20rpx; + box-sizing: border-box; +} + +.records-container { + padding-top: 24rpx; +} + +/* 列表头部 */ +.section-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 24rpx; + padding: 0 4rpx; +} + +.section-title { + font-size: 32rpx; + font-weight: 700; + color: #1A1A1A; + position: relative; + padding-left: 16rpx; +} + +.section-title::before { + content: ''; + position: absolute; + left: 0; + top: 50%; + transform: translateY(-50%); + width: 4rpx; + height: 20rpx; + background: linear-gradient(180deg, #6D9EFF 0%, #4A7CFF 100%); + border-radius: 2rpx; +} + +.section-count { + font-size: 26rpx; + color: #666; + background: #F0F7FF; + padding: 6rpx 16rpx; + border-radius: 16rpx; + font-weight: 500; +} + +/* 问诊记录卡片 */ +.record-card { + background: #FFFFFF; + border-radius: 24rpx; + margin-bottom: 24rpx; + box-shadow: 0 6rpx 24rpx rgba(74, 144, 226, 0.08); + position: relative; + overflow: hidden; + transition: all 0.3s cubic-bezier(0.2, 0, 0.2, 1); + border: 1rpx solid #F0F7FF; +} + +.record-card:active { + transform: translateY(-2rpx); + box-shadow: 0 10rpx 30rpx rgba(74, 144, 226, 0.15); +} + +/* 卡片头部 */ +.card-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 24rpx 28rpx; + border-bottom: 1rpx solid #F5F9FF; +} + +.user-section { + display: flex; + align-items: center; + gap: 16rpx; + flex: 1; +} + +.user-avatar { + width: 60rpx; + height: 60rpx; + border-radius: 50%; + border: 2rpx solid rgba(255, 255, 255, 0.8); + box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08); +} + +.user-name { + font-size: 28rpx; + color: #1A1A1A; + font-weight: 600; +} + +/* 状态标签 */ +.status-tag { + padding: 8rpx 20rpx; + border-radius: 20rpx; + font-size: 22rpx; + font-weight: 600; + min-width: 80rpx; + text-align: center; + flex-shrink: 0; +} + +.status-replied { + background: linear-gradient(135deg, rgba(76, 217, 100, 0.12) 0%, rgba(46, 204, 113, 0.12) 100%); + color: #2ECC71; + border: 1rpx solid rgba(46, 204, 113, 0.2); +} + +.status-pending { + background: linear-gradient(135deg, rgba(255, 149, 0, 0.12) 0%, rgba(255, 127, 0, 0.12) 100%); + color: #FF9500; + border: 1rpx solid rgba(255, 149, 0, 0.2); +} + +/* 牲畜信息 */ +.livestock-section { + padding: 20rpx 28rpx; +} + +/* 牲畜信息标题优化 */ +.livestock-title-wrapper { + display: flex; + align-items: center; + justify-content: center; + margin-bottom: 20rpx; + position: relative; +} + +.livestock-title-line { + flex: 1; + height: 2rpx; + background: linear-gradient(90deg, transparent, #4A7CFF 50%, transparent); + opacity: 0.3; +} + +.livestock-title-content { + display: flex; + align-items: center; + gap: 12rpx; + padding: 0 20rpx; + position: relative; +} + +.livestock-title-text { + font-size: 30rpx; + font-weight: 700; + color: #333; + background: linear-gradient(135deg, #4A7CFF 0%, #8CB4FF 100%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-clip: text; + text-shadow: 0 2rpx 4rpx rgba(74, 124, 255, 0.1); + letter-spacing: 1rpx; +} + + +@keyframes cowPulse { + 0%, 100% { + transform: scale(1) rotate(0deg); + } + 50% { + transform: scale(1.1) rotate(5deg); + } +} + +.livestock-tags { + display: flex; + gap: 16rpx; + flex-wrap: wrap; +} + +.livestock-tag { + padding: 5rpx 20rpx; + border-radius: 20rpx; + font-size: 26rpx; + font-weight: 600; + display: flex; + align-items: center; + justify-content: center; + box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1); +} + +.type-tag { + background: linear-gradient(135deg, #6D9EFF 0%, #4A7CFF 100%); + color: #FFFFFF; + border: 2rpx solid rgba(255, 255, 255, 0.3); +} + +.age-tag { + background: linear-gradient(135deg, #FFB347 0%, #FFA033 100%); + color: #FFFFFF; + border: 2rpx solid rgba(255, 255, 255, 0.3); +} + +.gender-tag { + background: linear-gradient(135deg, #42E695 0%, #3BB2B8 100%); + color: #FFFFFF; + border: 2rpx solid rgba(255, 255, 255, 0.3); +} + +.tag-text { + font-size: 26rpx; + font-weight: 600; + color: #FFFFFF; +} + +/* 症状描述 */ +.symptom-section { + padding: 24rpx 28rpx 28rpx; +} + +.symptom-content { + background: #F9FAFF; + padding: 20rpx 24rpx; + border-radius: 16rpx; + border: 1rpx solid #E6ECFF; + position: relative; +} + +.symptom-content::before { + content: '症状描述'; + position: absolute; + top: -12rpx; + left: 24rpx; + background: #FFFFFF; + padding: 0 12rpx; + font-size: 24rpx; + font-weight: 600; + color: #4A7CFF; + z-index: 1; +} + +.symptom-text { + font-size: 28rpx; + color: #333; + line-height: 1.6; + font-weight: 400; +} + +/* 卡片底部 */ +.card-footer { + display: flex; + justify-content: space-between; + align-items: center; + padding: 20rpx 28rpx; + border-top: 1rpx solid #F5F9FF; +} + +.time-info { + display: flex; + align-items: center; + gap: 8rpx; +} + +.time-text { + font-size: 24rpx; + color: #999; + font-weight: 400; +} + +.reply-info { + display: flex; + align-items: center; + gap: 8rpx; + padding: 8rpx 16rpx; + background: #F0F7FF; + border-radius: 16rpx; + border: 1rpx solid #E5EFFF; +} + +.reply-count { + font-size: 24rpx; + font-weight: 500; + color: #4A7CFF; +} + +/* 空状态优化 */ +.empty-state { + display: flex; + flex-direction: column; + align-items: center; + padding-top: 120rpx; + text-align: center; +} + +.empty-icon { + width: 400rpx; + margin-bottom: 32rpx; + opacity: 0.5; +} + +.empty-text { + font-size: 32rpx; + color: #666; + margin-bottom: 12rpx; + font-weight: 600; +} + +.empty-tip { + font-size: 26rpx; + color: #999; + margin-bottom: 40rpx; + line-height: 1.4; +} + +/* 列表底部 */ +.list-footer { + text-align: center; + padding: 40rpx 0; + color: #999; + font-size: 24rpx; +} + +.footer-text { + opacity: 0.6; + letter-spacing: 1rpx; +} + + +/* 卡片入场动画 */ +@keyframes cardSlideIn { + from { + opacity: 0; + transform: translateY(30rpx); + } + to { + opacity: 1; + transform: translateY(0); + } +} + +.record-card { + animation: cardSlideIn 0.4s ease-out forwards; + opacity: 0; +} + +.record-card:nth-child(1) { animation-delay: 0.1s; } +.record-card:nth-child(2) { animation-delay: 0.15s; } +.record-card:nth-child(3) { animation-delay: 0.2s; } +.record-card:nth-child(4) { animation-delay: 0.25s; } +.record-card:nth-child(5) { animation-delay: 0.3s; } + +/* 响应式适配 */ +@media screen and (min-width: 768px) { + .record-card { + max-width: 600rpx; + margin-left: auto; + margin-right: auto; + } +} \ No newline at end of file diff --git a/pagesA/pages/askingSyDetails/askingSyDetails.js b/pagesA/pages/askingSyDetails/askingSyDetails.js new file mode 100644 index 0000000..2594584 --- /dev/null +++ b/pagesA/pages/askingSyDetails/askingSyDetails.js @@ -0,0 +1,569 @@ +// 第一个页面的完整JS代码 - pages/diagnosisDetail/diagnosisDetail.js +import http from '../../../utils/api' +const baseUrl = require('../../../utils/baseUrl') + +Page({ + /** + * 页面的初始数据 + */ + data: { + diagnosisData: {}, + replies: [], + baseUrl: baseUrl, + refreshing: false, + + // 新增回复相关数据 + showReplyInput: true, + replyContent: '', + replyImages: [], + replyImagesTemp: [], // 本地临时路径,用于预览 + uploadingImage: false, + submittingReply: false, + isUploading: false // 防止重复上传 + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + if (options.data) { + // 根据id加载兽医回复数据 + const data = JSON.parse(decodeURIComponent(options.data)); + // 处理用户图片 - 确保是数组格式 + if (data.images) { + if (typeof data.images === 'string') { + data.images = data.images.split(',') + } + console.log('用户图片:', data.images); + } else { + data.images = []; + } + + this.setData({ + diagnosisData: data, + }) + this.loadDiagnosisData(data.formId); + } + }, + + /** + * 加载问诊数据(兽医回复) + * @param {string} id - 问诊ID + */ + loadDiagnosisData(id) { + console.log('加载问诊数据:', id); + wx.showLoading({ + title: '加载中...', + mask: true + }); + + http.wzdxq({ + data: { + consultationId: id + }, + success: res => { + wx.hideLoading(); + // 处理兽医回复的图片 + let replies = []; + + if (res && res.rows) { + replies = res.rows || []; + + // 遍历每个回复,处理图片字段 + for (let i = 0; i < replies.length; i++) { + const item = replies[i]; + + // 处理图片 - 确保是数组格式 + if (item.images) { + if (typeof item.images === 'string') { + // 如果是空字符串,设为空数组 + if (item.images.trim() === '') { + item.images = []; + } else { + // 按逗号分割字符串 + item.images = item.images.split(','); + } + } else if (Array.isArray(item.images)) { + // 已经是数组,但需要过滤空值 + item.images = item.images.filter(img => img && img.trim() !== ''); + } else { + item.images = []; + } + } else { + item.images = []; + } + + console.log(`兽医回复[${i}]图片:`, item.images); + } + } + + console.log('兽医回复数据:', replies); + this.setData({ + replies: replies + }) + }, + fail: err => { + wx.hideLoading(); + console.error('加载回复失败:', err); + wx.showToast({ + title: '加载失败', + icon: 'none' + }); + } + }) + }, + + /** + * 回复内容输入 + */ + onReplyContentInput(e) { + this.setData({ + replyContent: e.detail.value + }); + }, + + /** + * 清空所有图片 + */ + clearAllImages() { + if (this.data.replyImages.length === 0) return; + + wx.showModal({ + title: '提示', + content: '确定要清空所有已选图片吗?', + success: (res) => { + if (res.confirm) { + this.setData({ + replyImages: [], + replyImagesTemp: [] + }); + } + } + }); + }, + + /** + * 选择回复图片 - 优化后的版本 + */ + chooseReplyImage() { + if (this.data.isUploading) { + wx.showToast({ + title: '正在上传中,请稍候', + icon: 'none' + }); + return; + } + + if (this.data.replyImages.length >= 9) { + wx.showToast({ + title: '最多上传9张图片', + icon: 'none' + }); + return; + } + + wx.chooseMedia({ + count: 9 - this.data.replyImages.length, + mediaType: ['image'], + sourceType: ['album', 'camera'], + sizeType: ['compressed'], + success: (res) => { + if (res.tempFiles && res.tempFiles.length > 0) { + this.setData({ + isUploading: true + }); + + // 显示加载提示 + wx.showLoading({ + title: '上传图片中...', + mask: true + }); + + // 获取临时文件路径列表 + const tempPaths = res.tempFiles.map(file => file.tempFilePath); + + // 保存临时路径用于预览 + const newTempPaths = [...this.data.replyImagesTemp, ...tempPaths]; + this.setData({ + replyImagesTemp: newTempPaths + }); + + // 逐张上传图片 + this.uploadImages(tempPaths); + } + } + }); + }, + + /** + * 上传多张图片 - 优化后的版本 + */ + uploadImages(filePaths) { + const uploadTasks = filePaths.map(path => { + return new Promise((resolve, reject) => { + wx.uploadFile({ + url: baseUrl + '/common/upload', + filePath: path, + name: 'file', + header: { + 'Authorization': 'Bearer ' + wx.getStorageSync('token') + }, + success: (res) => { + try { + const data = JSON.parse(res.data); + if (data.code === 200 || data.fileName) { + const imagePath = data.fileName || data.url; + resolve(imagePath); + } else { + reject(new Error(data.msg || '上传失败')); + } + } catch (e) { + reject(e); + } + }, + fail: (err) => { + reject(err); + } + }); + }); + }); + + Promise.all(uploadTasks) + .then((imagePaths) => { + wx.hideLoading(); + + // 将新上传的图片添加到现有图片数组中 + const newReplyImages = [...this.data.replyImages, ...imagePaths]; + + this.setData({ + replyImages: newReplyImages, + isUploading: false + }); + + wx.showToast({ + title: '上传成功', + icon: 'success' + }); + }) + .catch((err) => { + wx.hideLoading(); + console.error('上传失败:', err); + + // 上传失败时,移除对应的临时预览图片 + const failedCount = filePaths.length; + const currentTempPaths = [...this.data.replyImagesTemp]; + for (let i = 0; i < failedCount; i++) { + currentTempPaths.pop(); + } + + this.setData({ + replyImagesTemp: currentTempPaths, + isUploading: false + }); + + wx.showToast({ + title: '上传失败,请重试', + icon: 'none' + }); + }); + }, + + /** + * 移除单张回复图片 + */ + removeReplyImage(e) { + const index = e.currentTarget.dataset.index; + const replyImages = this.data.replyImages.filter((_, i) => i !== index); + const replyImagesTemp = this.data.replyImagesTemp.filter((_, i) => i !== index); + + this.setData({ + replyImages: replyImages, + replyImagesTemp: replyImagesTemp + }); + }, + + /** + * 提交回复 - 优化后的版本 + */ + submitReply() { + const content = this.data.replyContent.trim(); + const images = this.data.replyImages; + + // 检查内容 + if (!content && images.length === 0) { + wx.showToast({ + title: '请输入回复内容或上传图片', + icon: 'none' + }); + return; + } + + if (this.data.submittingReply || this.data.isUploading) { + wx.showToast({ + title: this.data.isUploading ? '图片上传中,请稍后' : '提交中,请稍后', + icon: 'none' + }); + return; + } + + this.setData({ submittingReply: true }); + + // 显示加载提示 + wx.showLoading({ + title: '发送中...', + mask: true + }); + + // 准备提交数据 + const submitData = { + consultationId: this.data.diagnosisData.formId, + content: content + }; + + // 如果有图片,将图片数组转为逗号分隔的字符串 + if (images.length > 0) { + submitData.images = images.join(','); + } + + console.log('提交回复数据:', submitData); + + // 调用回复接口 + http.wzdAdd({ + data: submitData, + success: res => { + wx.hideLoading(); + + if (res.code === 200 || res.success) { + // 清空输入 + this.setData({ + replyContent: '', + replyImages: [], + replyImagesTemp: [], + submittingReply: false + }); + + wx.showToast({ + title: '回复成功', + icon: 'success' + }); + + // 重新加载回复列表 + this.loadDiagnosisData(this.data.diagnosisData.formId); + + // 滚动到底部 + setTimeout(() => { + wx.createSelectorQuery().select('.page-content').boundingClientRect(rect => { + wx.pageScrollTo({ + scrollTop: rect.height, + duration: 300 + }); + }).exec(); + }, 500); + } else { + this.setData({ submittingReply: false }); + wx.showToast({ + title: res.message || '回复失败', + icon: 'none' + }); + } + }, + fail: err => { + wx.hideLoading(); + this.setData({ submittingReply: false }); + console.error('回复失败:', err); + wx.showToast({ + title: '网络错误,请重试', + icon: 'none' + }); + } + }); + }, + + /** + * 返回上一页 + */ + goBack() { + wx.navigateBack(); + }, + + /** + * 分享 + */ + onShare() { + wx.showActionSheet({ + itemList: ['分享给好友', '保存到相册'], + success: (res) => { + if (res.tapIndex === 0) { + wx.showToast({ + title: '已分享', + icon: 'success' + }); + } + } + }); + }, + + /** + * 下拉刷新 + */ + onRefresh() { + this.setData({ + refreshing: true + }); + + if (this.data.diagnosisData && this.data.diagnosisData.formId) { + this.loadDiagnosisData(this.data.diagnosisData.formId) + } + + setTimeout(() => { + this.setData({ + refreshing: false + }); + wx.showToast({ + title: '刷新成功', + icon: 'success' + }); + }, 1000); + }, + + /** + * 预览用户图片 + */ + previewImage(e) { + const dataset = e.currentTarget.dataset; + const current = dataset.url; + const urls = dataset.urls || []; + + // 构建完整URL数组 + const urlsArray = urls.map(item => { + if (typeof item === 'string' && (item.startsWith('http://') || item.startsWith('https://'))) { + return item; + } + return baseUrl + item; + }); + + console.log('预览用户图片:', urlsArray); + wx.previewImage({ + current: current, + urls: urlsArray + }); + }, + + /** + * 预览兽医回复图片 + */ + previewReplyImage(e) { + const dataset = e.currentTarget.dataset; + + const currentFileName = dataset.url; + const currentFullUrl = dataset.fullurl; + const urlsArray = dataset.urls || []; + const currentIndex = dataset.currentIndex || 0; + const replyIndex = dataset.replyIndex; + + console.log('预览兽医图片 - 数据集:', dataset); + + // 从replies数据中获取当前回复的图片列表 + let targetUrls = []; + let targetCurrentUrl = ''; + + if (replyIndex !== undefined && this.data.replies[replyIndex]) { + const reply = this.data.replies[replyIndex]; + if (reply.images && reply.images.length > 0) { + targetUrls = reply.images; + + const fullUrls = targetUrls.map(img => { + if (typeof img === 'string' && (img.startsWith('http://') || img.startsWith('https://'))) { + return img; + } + return baseUrl + img; + }); + + if (currentIndex < fullUrls.length) { + targetCurrentUrl = fullUrls[currentIndex]; + } else if (currentFullUrl) { + targetCurrentUrl = currentFullUrl; + } else if (currentFileName) { + targetCurrentUrl = baseUrl + currentFileName; + } + + console.log('预览兽医回复图片:', fullUrls, '当前:', targetCurrentUrl); + + wx.previewImage({ + current: targetCurrentUrl, + urls: fullUrls + }); + return; + } + } + + // 使用dataset中的数据 + if (urlsArray && urlsArray.length > 0) { + const fullUrls = urlsArray.map(item => { + if (typeof item === 'string' && (item.startsWith('http://') || item.startsWith('https://'))) { + return item; + } + return baseUrl + item; + }); + + let currentUrl = ''; + if (currentFullUrl) { + currentUrl = currentFullUrl; + } else if (currentIndex < fullUrls.length) { + currentUrl = fullUrls[currentIndex]; + } else if (currentFileName) { + currentUrl = baseUrl + currentFileName; + } + + console.log('预览兽医回复图片(从dataset):', fullUrls, '当前:', currentUrl); + + wx.previewImage({ + current: currentUrl, + urls: fullUrls + }); + return; + } + + // 预览单张图片 + if (currentFullUrl) { + console.log('预览单张兽医图片:', [currentFullUrl]); + wx.previewImage({ + current: currentFullUrl, + urls: [currentFullUrl] + }); + } else if (currentFileName) { + const fullUrl = baseUrl + currentFileName; + console.log('预览单张兽医图片(拼接后):', [fullUrl]); + wx.previewImage({ + current: fullUrl, + urls: [fullUrl] + }); + } else { + wx.showToast({ + title: '图片预览失败', + icon: 'none' + }); + } + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + // 如果已经有数据,刷新列表 + if (this.data.diagnosisData && this.data.diagnosisData.formId) { + this.loadDiagnosisData(this.data.diagnosisData.formId); + } + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + // 页面卸载时重置状态 + this.setData({ + submittingReply: false, + isUploading: false + }); + } +}); \ No newline at end of file diff --git a/pagesA/pages/askingSyDetails/askingSyDetails.json b/pagesA/pages/askingSyDetails/askingSyDetails.json new file mode 100644 index 0000000..9ffffad --- /dev/null +++ b/pagesA/pages/askingSyDetails/askingSyDetails.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText":"问诊详情", + "usingComponents": {} +} \ No newline at end of file diff --git a/pagesA/pages/askingSyDetails/askingSyDetails.wxml b/pagesA/pages/askingSyDetails/askingSyDetails.wxml new file mode 100644 index 0000000..99c88c5 --- /dev/null +++ b/pagesA/pages/askingSyDetails/askingSyDetails.wxml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + 症状描述 + + + + + " + + {{diagnosisData.description}} + + + + + + + 相关图片 + {{diagnosisData.images.length}}张 + + + + + + + + + + + + + + + + + + + + + + + + 兽医回复 + + {{replies.length}} + 条回复 + + + + + + + + + + + + + + + + {{item.replyName || '兽医'}} + + {{item.title}} + + + + + {{item.hospital}} + + + {{item.experience}} + + + + + + + + + {{item.content}} + + + + + + + + + + + +{{item.images.length - 4}} + + + + + + + + + + + {{item.createdAt || item.createTime || ''}} + + + + + + + + + 等待兽医回复中 + 专业兽医通常会在24小时内为您解答 + + + + + + + + + + + + + + + + + + + + 已选图片 ({{replyImagesTemp.length}}/9) + + 🗑️ + 清空全部 + + + + + + + + + × + + + + + + + + + + + + + + 📷 + 图片 + + + {{replyImagesTemp.length}} + + + + + + + + + + + + + 仅兽医可回复 + + + \ No newline at end of file diff --git a/pagesA/pages/askingSyDetails/askingSyDetails.wxss b/pagesA/pages/askingSyDetails/askingSyDetails.wxss new file mode 100644 index 0000000..c869204 --- /dev/null +++ b/pagesA/pages/askingSyDetails/askingSyDetails.wxss @@ -0,0 +1,1067 @@ +.xqbox { + background: linear-gradient(180deg, #F8FBFF 0%, #F0F7FF 100%); + min-height: 100vh; +} + +/* 页面内容 */ +.page-content { + height: calc(100vh - 120rpx); + box-sizing: border-box; +} + +/* 动画效果 */ +@keyframes cardEnter { + 0% { + opacity: 0; + transform: translateY(40rpx) scale(0.95); + } + 100% { + opacity: 1; + transform: translateY(0) scale(1); + } +} + +@keyframes fadeInUp { + 0% { + opacity: 0; + transform: translateY(30rpx); + } + 100% { + opacity: 1; + transform: translateY(0); + } +} + +@keyframes fadeIn { + from { opacity: 0; } + to { opacity: 1; } +} + +@keyframes pulse { + 0% { transform: scale(1); } + 50% { transform: scale(1.05); } + 100% { transform: scale(1); } +} + +.card-enter { + animation: cardEnter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; +} + +.fade-in-up { + animation: fadeInUp 0.5s ease-out forwards; + opacity: 0; +} + +.fade-in { + animation: fadeIn 0.8s ease-out forwards; + opacity: 0; +} + +.pulse { + animation: pulse 2s infinite; +} + +.hover-effect { + transition: all 0.3s ease; +} + +.hover-effect:active { + transform: scale(0.95); +} + +/* 渐变背景 */ +.gradient-blue { + background: linear-gradient(135deg, #6D9EFF 0%, #4A7CFF 100%); + color: white !important; +} + +.gradient-orange { + background: linear-gradient(135deg, #FF9500 0%, #FF7F00 100%); + color: white !important; +} + +.gradient-pink { + background: linear-gradient(135deg, #FF6B9D 0%, #FF4081 100%); + color: white !important; +} + +.gradient-purple { + background: linear-gradient(135deg, #9D4BFF 0%, #7C3AED 100%); + color: white !important; +} + +.gradient-gold { + background: linear-gradient(135deg, #FFD700 0%, #FFB300 100%); + color: white !important; +} + +/* 用户问诊卡片 */ +.user-query-card { + background: #FFFFFF; + margin: 24rpx; + border-radius: 28rpx; + box-shadow: 0 12rpx 48rpx rgba(74, 144, 226, 0.15); + border: 2rpx solid #FFFFFF; + overflow: hidden; + position: relative; + backdrop-filter: blur(20rpx); +} + +/* 卡片装饰 */ +.card-decoration { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + pointer-events: none; + z-index: 1; +} + +.decoration-dot { + position: absolute; + border-radius: 50%; + background: linear-gradient(135deg, rgba(109, 158, 255, 0.1) 0%, rgba(74, 124, 255, 0.1) 100%); +} + +.dot-1 { + width: 120rpx; + height: 120rpx; + top: -40rpx; + right: -40rpx; +} + +.dot-2 { + width: 80rpx; + height: 80rpx; + bottom: 60rpx; + left: -20rpx; +} + +.dot-3 { + width: 60rpx; + height: 60rpx; + bottom: -20rpx; + right: 80rpx; +} + +/* 用户信息区域 */ +.user-info-section { + padding: 40rpx 32rpx 32rpx; + display: flex; + align-items: flex-start; + position: relative; + z-index: 2; +} + +.avatar-wrapper { + position: relative; + margin-right: 24rpx; + flex-shrink: 0; +} + +.user-avatar { + width: 88rpx; + height: 88rpx; + border-radius: 50%; + border: 3rpx solid #FFFFFF; + box-shadow: 0 8rpx 24rpx rgba(74, 144, 226, 0.3); +} + +.user-details { + flex: 1; +} + +.user-name-row { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 16rpx; +} + +.user-name { + font-size: 34rpx; + font-weight: 700; + color: #1A1A1A; + line-height: 1.2; + text-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.1); +} + +.status-badge { + padding: 10rpx 24rpx; + border-radius: 24rpx; + font-size: 26rpx; + font-weight: 700; + min-width: 88rpx; + text-align: center; + box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1); +} + +.status-replied { + background: linear-gradient(135deg, #2ECC71 0%, #27AE60 100%); + color: white; +} + +.status-pending { + background: linear-gradient(135deg, #FF9500 0%, #F39C12 100%); + color: white; +} + +.pet-info { + display: flex; + flex-direction: column; + gap: 16rpx; +} + +.pet-info-tags { + display: flex; + gap: 12rpx; + flex-wrap: wrap; +} + +.pet-tag { + padding: 6rpx 20rpx; + border-radius: 20rpx; + font-size: 24rpx; + font-weight: 600; + box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1); +} + +.time-info { + display: flex; + align-items: center; + gap: 8rpx; + background: rgba(109, 158, 255, 0.08); + padding: 8rpx 16rpx; + border-radius: 20rpx; + align-self: flex-start; +} + +.time-text { + font-size: 24rpx; + color: #6D9EFF; + font-weight: 500; +} + +/* 症状描述区域 */ +.symptom-section { + padding: 32rpx; + position: relative; + z-index: 2; +} + +.section-header { + display: flex; + align-items: center; + margin-bottom: 28rpx; +} + +.section-title { + font-size: 32rpx; + font-weight: 700; + color: #1A1A1A; + position: relative; + padding-right: 16rpx; +} + +.title-decoration { + flex: 1; + height: 2rpx; + background: linear-gradient(90deg, #E5F0FF 0%, #6D9EFF 50%, #E5F0FF 100%); + margin-left: 16rpx; + border-radius: 1rpx; +} + +.symptom-content { + background: #F8FBFF; + border-radius: 24rpx; + padding: 36rpx 32rpx; + border: 2rpx solid #E5F0FF; + position: relative; + box-shadow: 0 4rpx 16rpx rgba(74, 144, 226, 0.1); + transition: all 0.3s ease; +} + +.symptom-content:active { + transform: translateY(-2rpx); + box-shadow: 0 8rpx 24rpx rgba(74, 144, 226, 0.15); +} + +.quote-left { + position: absolute; + top: 20rpx; + left: 20rpx; + font-size: 48rpx; + color: #6D9EFF; + font-weight: 700; + opacity: 0.3; +} + +.symptom-text { + font-size: 30rpx; + color: #333; + line-height: 1.8; + font-weight: 400; + text-align: left; +} + +/* 图片展示区域 */ +.image-section { + padding: 32rpx; + position: relative; + z-index: 2; +} + +.image-count { + margin-left: auto; + padding: 6rpx 16rpx; + border-radius: 20rpx; + font-size: 24rpx; + font-weight: 600; +} + +.images-scroll { + width: 100%; +} + +.images-container { + display: flex; + padding: 8rpx 0; +} + +.image-wrapper { + margin-right: 20rpx; + position: relative; + border-radius: 20rpx; + overflow: hidden; + box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.15); + transition: all 0.3s ease; +} + +.image-wrapper:last-child { + margin-right: 0; +} + +.image-wrapper:active { + transform: scale(0.98); +} + +.symptom-image { + width: 220rpx; + height: 220rpx; + border-radius: 20rpx; +} + +/* 兽医回复区域 */ +.replies-section { + margin: 24rpx; +} + +.reply-count { + margin-left: auto; + padding: 8rpx 20rpx; + border-radius: 24rpx; + display: flex; + align-items: center; + gap: 4rpx; + box-shadow: 0 4rpx 12rpx rgba(157, 75, 255, 0.3); +} + +.count-number { + font-size: 30rpx; + font-weight: 700; +} + +.count-text { + font-size: 24rpx; + font-weight: 500; + opacity: 0.9; +} + +/* 回复列表 */ +.replies-list { + display: flex; + flex-direction: column; + gap: 24rpx; + padding-bottom: 30rpx; +} + +.vet-reply-card { + background: #FFFFFF; + border-radius: 28rpx; + padding: 36rpx; + box-shadow: 0 12rpx 48rpx rgba(74, 144, 226, 0.15); + border: 2rpx solid #FFFFFF; + position: relative; + overflow: hidden; + backdrop-filter: blur(20rpx); +} + +/* 兽医信息 */ +.vet-info { + display: flex; + align-items: center; + margin-bottom: 32rpx; +} + +.vet-avatar { + width: 80rpx; + height: 80rpx; + border-radius: 50%; + border: 3rpx solid #FFFFFF; + box-shadow: 0 8rpx 24rpx rgba(255, 215, 0, 0.3); + margin-right: 20rpx; + flex-shrink: 0; +} + +.vet-verified { + position: absolute; + bottom: 2rpx; + right: 2rpx; + width: 20rpx; + height: 20rpx; + background: #2ECC71; + border: 2rpx solid white; + border-radius: 50%; +} + +.vet-details { + flex: 1; +} + +.vet-name-row { + display: flex; + align-items: center; + margin-bottom: 12rpx; +} + +.vet-name { + font-size: 32rpx; + font-weight: 700; + color: #1A1A1A; + margin-right: 16rpx; + text-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.1); +} + +.vet-badge { + padding: 2rpx 10rpx; + border-radius: 20rpx; + box-shadow: 0 4rpx 12rpx rgba(255, 215, 0, 0.3); +} + +.vet-title { + font-size: 24rpx; + font-weight: 700; + letter-spacing: 0.5rpx; +} + +.vet-meta { + display: flex; + align-items: center; + gap: 20rpx; +} + +.meta-item { + display: flex; + align-items: center; + gap: 6rpx; + background: rgba(109, 158, 255, 0.08); + padding: 6rpx 12rpx; + border-radius: 16rpx; +} + +.vet-hospital, +.vet-experience { + font-size: 24rpx; + color: #6D9EFF; + font-weight: 500; +} + +/* 回复内容 */ +.reply-content { + margin-bottom: 28rpx; +} + +.reply-bubble { + background: #F8FBFF; + border-radius: 24rpx; + padding: 32rpx; + border: 2rpx solid #E5F0FF; + position: relative; + box-shadow: 0 4rpx 16rpx rgba(74, 144, 226, 0.1); +} + +.reply-bubble::before { + content: ''; + position: absolute; + top: -12rpx; + left: 40rpx; + width: 0; + height: 0; + border-left: 12rpx solid transparent; + border-right: 12rpx solid transparent; + border-bottom: 12rpx solid #F8FBFF; +} + +.reply-text { + font-size: 28rpx; + color: #333; + line-height: 1.8; + font-weight: 400; +} + +/* 回复底部 */ +.reply-footer { + display: flex; + justify-content: space-between; + align-items: center; + padding-top: 24rpx; + border-top: 2rpx dashed #E5F0FF; +} + +.reply-time { + display: flex; + align-items: center; + gap: 10rpx; + background: rgba(109, 158, 255, 0.1); + padding: 8rpx 20rpx; + border-radius: 20rpx; +} + +/* 无回复状态 */ +.no-replies { + background: #FFFFFF; + border-radius: 28rpx; + padding: 80rpx 40rpx; + text-align: center; + box-shadow: 0 12rpx 48rpx rgba(74, 144, 226, 0.15); + border: 2rpx solid #FFFFFF; + position: relative; + overflow: hidden; +} + +.no-replies-title { + font-size: 32rpx; + color: #333; + font-weight: 700; + margin-bottom: 16rpx; + display: block; + text-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.1); +} + +.no-replies-desc { + font-size: 26rpx; + color: #999; + line-height: 1.4; + max-width: 400rpx; + margin: 0 auto; +} + +.waiting-animation { + display: flex; + justify-content: center; + gap: 12rpx; + margin-top: 40rpx; +} + +.loading-dot { + width: 16rpx; + height: 16rpx; + border-radius: 50%; + background: #6D9EFF; + animation: pulse 1.5s infinite ease-in-out; +} + +.loading-dot.dot-1 { animation-delay: 0s; } +.loading-dot.dot-2 { animation-delay: 0.2s; } +.loading-dot.dot-3 { animation-delay: 0.4s; } + +/* 页面底部安全区域 */ +.page-bottom { + height: 60rpx; +} + +/* 新增兽医回复图片预览 */ +.reply-images-section { + margin-top: 24rpx; + padding: 0 8rpx; +} + +.reply-images-grid { + display: grid; + gap: 12rpx; + width: 100%; +} + +/* 根据图片数量自适应网格 */ +.reply-images-grid.grid-1 { + grid-template-columns: repeat(1, minmax(200rpx, 320rpx)); + justify-content: start; +} + +.reply-images-grid.grid-2 { + grid-template-columns: repeat(2, 1fr); +} + +.reply-images-grid.grid-3, +.reply-images-grid.grid-4, +.reply-images-grid:not(.grid-1):not(.grid-2) { + grid-template-columns: repeat(2, 1fr); +} + +.reply-image-wrapper { + position: relative; + border-radius: 16rpx; + overflow: hidden; + background-color: #f5f5f5; + aspect-ratio: 1 / 1; + box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1); + transition: transform 0.2s ease; +} + +.reply-image-wrapper:active { + transform: scale(0.98); +} + +.reply-image { + width: 100%; + height: 100%; + border-radius: 16rpx; + object-fit: cover; +} + +/* 图片数量遮罩 */ +.image-more-mask { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); + display: flex; + align-items: center; + justify-content: center; + border-radius: 16rpx; +} + +.more-count { + color: #fff; + font-size: 36rpx; + font-weight: 700; + text-shadow: 0 2rpx 4rpx rgba(0,0,0,0.3); +} + +/* 底部回复输入区域 */ +.reply-input-section { + position: fixed; + bottom: 0; + left: 0; + right: 0; + background: #FFFFFF; + box-shadow: 0 -8rpx 30rpx rgba(74, 144, 226, 0.15); + border-top: 2rpx solid #E5F0FF; + transform: translateY(100%); + transition: transform 0.3s ease; + z-index: 1000; + backdrop-filter: blur(20rpx); +} + +.reply-input-section.show { + transform: translateY(0); +} + +.reply-input-container { + padding: 20rpx 24rpx; + max-height: 600rpx; + overflow-y: auto; +} + +/* 图片预览区 */ +.reply-image-preview { + margin-bottom: 20rpx; +} + +.preview-scroll { + width: 100%; + white-space: nowrap; +} + +.preview-list { + display: flex; + gap: 16rpx; + padding: 8rpx 0; +} + +.preview-item { + position: relative; + width: 120rpx; + height: 120rpx; + border-radius: 16rpx; + overflow: hidden; + box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1); +} + +.preview-img { + width: 100%; + height: 100%; + object-fit: cover; +} + +.preview-remove { + position: absolute; + top: 4rpx; + right: 4rpx; + width: 32rpx; + height: 32rpx; + background: rgba(0, 0, 0, 0.5); + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + border: 2rpx solid #FFFFFF; +} + +.remove-icon { + color: #FFFFFF; + font-size: 28rpx; + font-weight: 700; + line-height: 1; +} + +/* 输入工具栏 */ +.input-toolbar { + display: flex; + flex-direction: column; + gap: 16rpx; +} + +.reply-textarea { + width: 100%; + min-height: 80rpx; + max-height: 200rpx; + padding: 16rpx 24rpx; + background: #F8FBFF; + border-radius: 24rpx; + font-size: 28rpx; + color: #333; + border: 2rpx solid #E5F0FF; + box-sizing: border-box; +} + +.textarea-placeholder { + color: #999; + font-size: 28rpx; +} + +.toolbar-actions { + display: flex; + align-items: center; + justify-content: space-between; +} + +.action-item { + display: flex; + align-items: center; + gap: 8rpx; + padding: 12rpx 24rpx; + background: #F0F7FF; + border-radius: 40rpx; + border: 2rpx solid #E5F0FF; +} + +.action-icon { + font-size: 32rpx; +} + +.action-text { + font-size: 26rpx; + color: #6D9EFF; + font-weight: 500; +} + +.submit-reply-btn { + min-width: 160rpx; + height: 72rpx; + line-height: 72rpx; + text-align: center; + background: linear-gradient(135deg, #CCCCCC 0%, #999999 100%); + color: #FFFFFF; + font-size: 28rpx; + font-weight: 600; + border-radius: 40rpx; + margin: 0; + padding: 0 24rpx; + border: none; + transition: all 0.3s ease; +} + +.submit-reply-btn.active { + background: linear-gradient(135deg, #6D9EFF 0%, #4A7CFF 100%); + box-shadow: 0 8rpx 24rpx rgba(74, 144, 226, 0.3); +} + +.submit-reply-btn:active { + transform: scale(0.95); +} + +.submit-reply-btn[disabled] { + opacity: 0.5; +} + +/* 底部占位 */ +.bottom-placeholder { + height: 160rpx; +} + +/* 回复输入区域的样式补充 */ + +/* 图片预览区头部 */ +.preview-header { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 16rpx; + padding: 0 8rpx; +} + +.preview-title { + font-size: 26rpx; + color: #666; + font-weight: 500; +} + +.clear-all-btn { + display: flex; + align-items: center; + gap: 6rpx; + padding: 8rpx 16rpx; + background: rgba(255, 107, 107, 0.1); + border-radius: 24rpx; + border: 1rpx solid rgba(255, 107, 107, 0.3); +} + +.clear-icon { + font-size: 28rpx; +} + +.clear-text { + font-size: 24rpx; + color: #FF6B6B; + font-weight: 500; +} + +.clear-all-btn:active { + opacity: 0.7; + transform: scale(0.95); +} + +/* 图片预览区优化 */ +.reply-image-preview { + margin-bottom: 24rpx; + background: #F8FBFF; + border-radius: 24rpx; + padding: 20rpx; + border: 2rpx solid #E5F0FF; +} + +.preview-scroll { + width: 100%; + white-space: nowrap; +} + +.preview-list { + display: flex; + gap: 16rpx; + padding: 4rpx 0; +} + +.preview-item { + position: relative; + width: 140rpx; + height: 140rpx; + border-radius: 20rpx; + overflow: hidden; + box-shadow: 0 6rpx 20rpx rgba(74, 144, 226, 0.2); + border: 2rpx solid #FFFFFF; +} + +.preview-img { + width: 100%; + height: 100%; + object-fit: cover; +} + +.preview-remove { + position: absolute; + top: 6rpx; + right: 6rpx; + width: 36rpx; + height: 36rpx; + background: rgba(0, 0, 0, 0.6); + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + border: 2rpx solid #FFFFFF; + backdrop-filter: blur(4rpx); +} + +.remove-icon { + color: #FFFFFF; + font-size: 32rpx; + font-weight: 700; + line-height: 1; +} + +/* 输入工具栏优化 */ +.input-toolbar { + display: flex; + flex-direction: column; + gap: 20rpx; +} + +.reply-textarea { + width: 100%; + min-height: 100rpx; + max-height: 240rpx; + padding: 20rpx 28rpx; + background: #F8FBFF; + border-radius: 28rpx; + font-size: 30rpx; + color: #333; + border: 2rpx solid #E5F0FF; + box-sizing: border-box; + transition: all 0.3s ease; +} + +.reply-textarea:focus { + border-color: #6D9EFF; + box-shadow: 0 0 0 4rpx rgba(109, 158, 255, 0.2); +} + +.textarea-placeholder { + color: #AAA; + font-size: 30rpx; +} + +.toolbar-actions { + display: flex; + align-items: center; + justify-content: space-between; +} + +.action-left { + display: flex; + align-items: center; + gap: 16rpx; + position: relative; +} + +.action-item { + display: flex; + align-items: center; + gap: 8rpx; + padding: 16rpx 28rpx; + background: #F0F7FF; + border-radius: 44rpx; + border: 2rpx solid #E5F0FF; + transition: all 0.2s ease; +} + +.action-item:active { + background: #E5F0FF; + transform: scale(0.96); +} + +.action-icon { + font-size: 34rpx; +} + +.action-text { + font-size: 28rpx; + color: #4A7CFF; + font-weight: 600; +} + +.image-count-badge { + background: linear-gradient(135deg, #FF6B9D 0%, #FF4081 100%); + color: white; + min-width: 36rpx; + height: 36rpx; + border-radius: 36rpx; + display: flex; + align-items: center; + justify-content: center; + padding: 0 8rpx; + border: 2rpx solid #FFFFFF; + box-shadow: 0 4rpx 12rpx rgba(255, 64, 129, 0.3); + margin-left: -10rpx; +} + +.image-count-badge .count-text { + font-size: 22rpx; + font-weight: 700; + color: white; +} + +.action-right { + flex-shrink: 0; +} + +.submit-reply-btn { + min-width: 180rpx; + height: 80rpx; + line-height: 80rpx; + text-align: center; + background: linear-gradient(135deg, #CCCCCC 0%, #999999 100%); + color: #FFFFFF; + font-size: 30rpx; + font-weight: 700; + border-radius: 44rpx; + margin: 0; + padding: 0 32rpx; + border: none; + transition: all 0.3s ease; + box-shadow: 0 6rpx 16rpx rgba(0, 0, 0, 0.1); +} + +.submit-reply-btn.active { + background: linear-gradient(135deg, #6D9EFF 0%, #4A7CFF 100%); + box-shadow: 0 8rpx 24rpx rgba(74, 144, 226, 0.4); +} + +.submit-reply-btn:active { + transform: scale(0.94); +} + +.submit-reply-btn[disabled] { + opacity: 0.6; + background: linear-gradient(135deg, #CCCCCC 0%, #999999 100%); + box-shadow: none; +} + +/* 无回复权限提示 */ +.no-reply-permission { + position: fixed; + bottom: 0; + left: 0; + right: 0; + background: #FFFFFF; + box-shadow: 0 -4rpx 20rpx rgba(74, 144, 226, 0.1); + padding: 24rpx 0; + text-align: center; + border-top: 2rpx solid #E5F0FF; + backdrop-filter: blur(20rpx); +} + +.no-permission-text { + font-size: 28rpx; + color: #999; + font-weight: 500; +} + +/* 底部占位优化 */ +.bottom-placeholder { + height: 200rpx; +} + diff --git a/utils/api.js b/utils/api.js index e77e778..e52bcb0 100644 --- a/utils/api.js +++ b/utils/api.js @@ -77,8 +77,20 @@ function videoZd(params) { http('/system/dict/data/list', 'get', params) } +// 问诊列表 +function wzd(params) { + http('/muhu/consultation/list', 'get', params) +} +// 问诊单回复列表 +function wzdxq(params) { + http('/vet/comments/list', 'get', params) +} +// 新增问诊单回复 +function wzdAdd(params) { + http('/vet/comments', 'post', params) +} @@ -150,8 +162,8 @@ function today(params) { export default { // 暴露接口 - login,carousel,getPhoneNumber,article,articleDetails,articleZd, + login,carousel,getPhoneNumber,article,articleDetails,articleZd,wzd,wzdAdd, areaChildren,userCode,UserInfo,videoList,videoZd,videoDetails,forumList,forumAdd,forumDetails, forumReply,commentReply,experience,experiencezd,experienceDetails,realName,revise,feedback, - today,carouselDetail,videoAdd,articleAdd + today,carouselDetail,videoAdd,articleAdd,wzdxq }