diff --git a/api/api.js b/api/api.js index 4d22dd9..d183532 100644 --- a/api/api.js +++ b/api/api.js @@ -36,16 +36,130 @@ const api = { getHomeData(){ return request('/expertAPI/index', {}, 'post', false); }, - // 视频相关API + //肝胆课件列表 + ganDanFileByKeyWords(data){ + return request('/expertAPI/ganDanFileByKeyWords', data, 'post', false); + }, + //肝胆课件详情 + ganDanFileDetials(data){ + return request('/expertAPI/ganDanFileDetials', data, 'post', false); + }, + //是否存在正在进行中的公益咨询 + isConsultIng(data){ + return request('/expertAPI/isConsultIng', data, 'post', false); + }, + //视频浏览记录列表 + videoWatchRecord(data){ + return request('/expertAPI/VideoWatchRecord', data, 'post', false); + }, + //修改备注和描述 + updateNicknameNote(data){ + return request('/expertAPI/updateNicknameNote', data, 'post', false); + }, + //获取未读数量 + unReadList(data){ + return request('/expertAPI/unReadList', data, 'post', false); + }, + //消息列表 + appMesageList(data){ + return request('/expertAPI/appMesageList', data, 'post', false); + }, + //阅读消息 + appMesageRead(data){ + return request('/expertAPI/appMesageRead', data, 'post', false); + }, + //阅读消息 + appMesageRead(data){ + return request('/expertAPI/appMesageRead', data, 'post', false); + }, + //最近30天的随访记录 + relationRecordLately(data){ + return request('/expertAPI/relationRecordLately', data, 'post', false); + }, + //我的页面(信息与统计) + getMyInfo(data){ + return request('/expertAPI/my', data, 'post', false); + }, + getVideoList(data) { return request('/video/list', data, 'get', true); }, getVideoDetail(data) { return request('/video/detail', data, 'get', true); }, - getBannerVideo(data) { - return request('/video/banner', data, 'get', true); + + // 新闻详情 + getNewsDetail(data) { + return request('/expertAPI/newsDetail', data, 'post', false); }, + + // 课件详情 + getGandanFileDetail(data) { + return request('/expertAPI/gandanFileDetail', data, 'post', false); + }, + + // 直播详情 + getLiveDetail(data) { + return request('/expertAPI/liveDetail', data, 'post', false); + }, + + // 视频详情 + getVideoDetail2(data) { + return request('/expertAPI/videoDetail2', data, 'post', false); + }, + + // 搜索医院列表 + getHospitalList(data) { + return request('/expertAPI/hospitalList', data, 'post', false); + }, + + // 省市地区列表 + getAreaList(data) { + return request('/expertAPI/areaList', data, 'post', false); + }, + + // 积分商城相关API + // 商品列表 + getGoodsList(data) { + return request('/expertAPI/goodsList', data, 'post', false); + }, + + // 商品列表_V2 + getGoodsListV2(data) { + return request('/expertAPI/goodsListV2', data, 'post', false); + }, + + // 积分商城商品类型列表 + getGoodsTagList(data) { + return request('/expertAPI/goodsTagList', data, 'post', false); + }, + + // 积分商城-查询快递100 + getOrderTrack(data) { + return request('/expertAPI/getOrderTrack', data, 'post', false); + }, + + // 福利版块相关API + // 我的福利卡 + getMyWelfareCard(data) { + return request('/expertAPI/myWelfareCard', data, 'post', false); + }, + + // 兑换福利卡 + exchangeWelfareCard(data) { + return request('/expertAPI/exchangeWelfareCard', data, 'post', false); + }, + + // U盘福利剩余个数 + getUpanWelfareCount(data) { + return request('/expertAPI/getUpanWelfareCount', data, 'post', false); + }, + + // 添加积分 + addBonusPointsN(data) { + return request('/expertAPI/addBonusPointsN', data, 'post', false); + }, + } export default api \ No newline at end of file diff --git a/components/dialog/dialog.vue b/components/dialog/dialog.vue index d562d9a..8586016 100644 --- a/components/dialog/dialog.vue +++ b/components/dialog/dialog.vue @@ -9,12 +9,34 @@ - {{ content }} + + {{item}} + - + + + {{cancelText}} + + + + + + {{confirmText}} + + + + { + console.log(val) + if(!val) return []; + // 将字符串按 \n 切割成数组,并过滤掉空字符串 + const lines = val.split('
').filter(line => line.trim() !== ''); + console.log('格式化后的内容数组:', lines); + return lines; + } const emit = defineEmits(['close']) @@ -110,6 +154,7 @@ justify-content: center; .default-content { + white-space:pre-wrap; font-size: 32rpx; color: #333; line-height: 1.5; @@ -163,4 +208,7 @@ } } } + .cancelFooter,.okFooter{ + padding: 0; + } diff --git a/components/tabBar/tabBar.vue b/components/tabBar/tabBar.vue index b027f00..add78d4 100644 --- a/components/tabBar/tabBar.vue +++ b/components/tabBar/tabBar.vue @@ -9,23 +9,19 @@ > - + - + - + @@ -82,9 +78,9 @@ text: '患教学堂', color: '#999999', activeColor: '#007aff', - badge: 5, + badge:0, showRedDot: false, - pagePath: '/pages/education/education' + pagePath: '/pages/patientClass/patientClass' }, { icon: live, @@ -93,8 +89,8 @@ color: '#999999', activeColor: '#007aff', badge: 0, - showRedDot: true, - pagePath: '/pages/meeting/meeting' + showRedDot: false, + pagePath: '/pages/live/live' }, { icon: education, @@ -102,9 +98,9 @@ text: '继续教育', color: '#999999', activeColor: '#007aff', - badge: 12, + badge: 0, showRedDot: false, - pagePath: '/pages/education/continuing' + pagePath: '/pages/education/education' }, { icon: my, @@ -114,7 +110,7 @@ activeColor: '#007aff', badge: 0, showRedDot: false, - pagePath: '/pages/profile/profile' + pagePath: '/pages/my/my' } ]); diff --git a/pages.json b/pages.json index efd622e..fd97fb6 100644 --- a/pages.json +++ b/pages.json @@ -299,6 +299,16 @@ } } }, + { + "path": "webview/webview", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "网页", + "app": { + "bounce": "none" + } + } + }, { "path": "pointGoods/pointGoods", "style": { @@ -491,6 +501,16 @@ } } }, + { + "path": "myVideo/myVideo", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "uni-app分页", + "app": { + "bounce": "none" + } + } + }, { "path": "patientMsg/patientMsg", "style": { diff --git a/pages/index/index.vue b/pages/index/index.vue index 425054d..513001a 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -4,9 +4,8 @@ - - - + + @@ -22,7 +21,7 @@ - + @@ -38,28 +37,14 @@ :mode="mode" :dots-styles="dotsStyles" > - + - @@ -69,9 +54,9 @@ - + - + {{ item.text }} @@ -79,7 +64,7 @@ - + @@ -101,7 +86,7 @@ - 8月6日 + {{ formatToMonthDay(item.date || item.time) }} @@ -121,17 +106,8 @@ 专题E站 - - - - {{ item.title }} - {{ item.desc }} - - - {{ item.icon }} - - - + + @@ -145,15 +121,15 @@ - + {{ item.title }} - {{ item.status }} - + 已完结 + 已更新{{item.upload_num}}课时 @@ -173,9 +149,7 @@ - - - + {{ item.content }} @@ -233,6 +207,7 @@ > + @@ -263,6 +238,7 @@ import unidialog from "@/components/dialog/dialog.vue" import api from '@/api/api.js' import navTo from "@/utils/navTo.js"; + import docUrl from "@/utils/docUrl.js"; import bg from "@/static/more_bg.png" import patient from "@/static/icon_home_my_patient.png" import video from "@/static/icon_home_video.png" @@ -276,11 +252,15 @@ import nosign from "@/static/home_no_qiandao_icon.png" import sign from "@/static/home_qiandao_icon.png" import signImg from "@/static/sign_in_bng_big.png" - + import dayjs from 'dayjs' + const expertDetail=reactive({}) const showSign=ref(false) // 定义refs const tabbarRef = ref(null); const visible=ref(false) + const hasUnread = ref(false) + const isSignedIn = ref(false) // 签到状态:false-未签到,true-已签到 + const hasSign=ref(false) // 滚动相关状态 const scrollTop = ref(0); const bannerHeight = 400; // 轮播图高度,单位rpx @@ -318,16 +298,12 @@ backgroundColor: '#ddd', border: '1px solid #ddd', color: '#fff', - selectedBackgroundColor: '#ff0000', - selectedBorder: '1px solid #ff0000' + selectedBackgroundColor: '#8B2316', + selectedBorder: '1px solid #8B2316' }); - // 轮播图数据 - const bannerList = reactive([{ - title: '邹建东专家工作室', - subtitle: '北京肝胆相照公益基金会', - background: 'linear-gradient(135deg, #007aff, #0056b3)' - }]); + // 轮播图数据(仅图片) + const bannerList = reactive([]); // 功能网格数据 const gridList = reactive([ @@ -370,98 +346,16 @@ ]); // 专题E站数据 - const specialList = reactive([ - { - title: '肝病医生的临床计算器和决策辅助工具', - desc: '肝胆相照®——医学常用工具', - icon: '🔧', - bgColor: '#1e3a8a' - }, - { - title: '徐医感染 疑难发热及感染分享', - desc: '', - icon: '🏥', - bgColor: '#10b981' - }, - { - title: '爱肝微视 全国首档爱肝科普短视频', - desc: '免费领取福利', - icon: '📱', - bgColor: '#1e3a8a' - } - ]); + const specialList = reactive([]); // 消息通知数据 - const noticeList = reactive([ - { - id: 1, - content: '欢迎使用肝胆相照医生版,新功能上线啦!', - time: '10:30', - type: 'system' - }, - { - id: 2, - content: '您有3个新的患者咨询待回复', - time: '09:15', - type: 'patient' - }, - { - id: 3, - content: '今日有2场直播会议即将开始', - time: '08:45', - type: 'meeting' - }, - { - id: 4, - content: '新的医学指南已更新,请及时查看', - time: '昨天', - type: 'guide' - } - ]); + const noticeList = reactive([]); // 精品课数据 - const courseList = reactive([ - { - title: '王晓光医生发起了新的病例讨论,邀请您参与', - status:'已完结' - }, - { - title: '王晓光医生发起了新的病例讨论,邀请您参与', - status:'已完结' - }, - { - title: '王晓光医生发起了新的病例讨论,邀请您参与', - status:'已完结' - }, - ]); + const courseList = reactive([]); // 精彩回放数据 - const replayList = reactive([ - { - id: 1, - avatar: '/static/c1.png', - content: 'Xxx医生发起了新的病例讨论,邀请您参与', - type: 'case_discussion' - }, - { - id: 2, - avatar: '/static/c2.png', - content: 'Xxx医生发起了新的', - type: 'new_topic' - }, - { - id: 3, - avatar: '/static/c3.png', - content: 'Xxx医生发起了新的病例讨论,邀请与......', - type: 'case_discussion' - }, - { - id: 4, - avatar: '/static/c4.png', - content: 'Xxx医生发起了新的病例讨论,邀请您参与', - type: 'case_discussion' - } - ]); + const replayList = reactive([]); // 实用指南标签页 const guideTabs = reactive([ @@ -472,44 +366,12 @@ // 当前选中的标签页 const currentGuideTab = ref(0); - // 实用指南数据 - const guideList = reactive([ - { - id: 1, - title: '一学就会的keynote教程番外篇】keynote 线下', - description: '实训你们要的带练来了', - actionType: 'view', - type: 'guide' - }, - { - id: 2, - title: '胆源性肝脏疾病——专题研讨会成功举行', - description: '', - actionType: 'view', - type: 'guide' - }, - { - id: 3, - title: '肝病学新领域:肝硬化合并慢性肾脏病|深度综', - description: '述大的并慢性肾脏病|深度综述并慢并慢性.......', - actionType: 'download', - type: 'guide' - }, - { - id: 4, - title: '【一学就会的keynote教程番外篇】keynote 线', - description: '下实训你们要的带练来了', - actionType: 'download', - type: 'guide' - }, - { - id: 5, - title: '段钟平教授:终末期肝病营养治疗的价值及研', - description: '究进展', - actionType: 'download', - type: 'guide' - } - ]); + // 实用指南展示数据(随标签切换填充) + const guideList = reactive([]); + + // 存储两类原始数据:指南 与 课件分享 + const guidesData = reactive([]); + const coursewareData = reactive([]); // 轮播图切换事件 const change = (e) => { @@ -521,6 +383,14 @@ console.log('消息通知切换:', e.detail.current); }; + // 使用 dayjs 格式化为 月日(如 8月6日) + const formatToMonthDay = (val) => { + if (!val) return ''; + const d = dayjs(val); + if (!d.isValid()) return ''; + return d.format('M月D日'); + }; + // 消息通知点击事件 const onNoticeClick = (item) => { console.log('点击消息通知:', item); @@ -589,22 +459,29 @@ }; // 网格点击事件 - const onClick = (e) => { - console.log('点击了第' + e.detail.index + '个'); - const clickedItem = gridList[e.detail.index]; - - // 处理开具发票的点击 - if (clickedItem.text === '开具发票') { - uni.navigateTo({ - url: '/pages_course/invoice/invoice' - }); - return; + const onClick = (index) => { + console.log('点击了第' + index + '个'); + let url='' + if(index==0){ + url='/pages_app/patientMsg/patientMsg' + }else if(index==1){ + url='/pages_app/video/video' + }else if(index==2){ + url='/pages_app/consult/consult' + }else if(index==3){ + url='/pages_app/zhinan/zhinan' + }else if(index==4){ + url='/pages_app/news/news' + }else if(index==5){ + url='/pages_app/ppt/ppt' + }else if(index==6){ + url='/pages_course/index/index' + }else{ + url='/pages_app/search/search' } - - uni.showToast({ - title: `点击了${clickedItem.text}`, - icon: 'none' - }); + navTo({ + url:url + }) }; // Tab切换事件 @@ -619,6 +496,13 @@ // 切换实用指南标签页 const switchGuideTab = (index) => { currentGuideTab.value = index; + // 0: 实用指南 -> guidesData;1: 课件分享 -> coursewareData + guideList.length = 0; + if (index === 0) { + guideList.push(...guidesData); + } else { + guideList.push(...coursewareData); + } }; // 查看更多实用指南 @@ -629,23 +513,111 @@ }); }; + // 点击顶部轮播图 + const onBannerClick = (item,index) => { + if (!item) return; + if(index==0){ + + }else{ + // 如果存在外链path,优先按平台打开 + if (item.path) { + // #ifdef H5 + window.open(item.path, '_blank'); + // #endif + + // #ifdef APP-PLUS + plus.runtime.openURL(item.path); + // #endif + + // #ifdef MP + const encoded = encodeURIComponent(item.path); + uni.navigateTo({ + url: `/pages_app/webview/webview?url=${encoded}` + }); + // #endif + return; + } + + // 如果是新闻类型且有uuid,可跳转新闻详情H5 + if (item.uuid) { + const url = `https://dev-doc.igandan.com/app/html/news/${item.uuid}.html`; + // #ifdef H5 + window.open(url, '_blank'); + // #endif + // #ifdef APP-PLUS + plus.runtime.openURL(url); + // #endif + // #ifdef MP + const encoded = encodeURIComponent(url); + uni.navigateTo({ url: `/pages_app/webview/webview?url=${encoded}` }); + // #endif + } + } + + }; + + // 点击专题E站图片 + const onEsiteClick = (item) => { + if (!item || !item.url) { + return; + } + // H5 端 + // #ifdef H5 + window.open(item.url, '_blank'); + // #endif + + // App 端 + // #ifdef APP-PLUS + plus.runtime.openURL(item.url); + // #endif + + // 小程序端:使用内嵌 webview 页面打开 + // #ifdef MP + const encoded = encodeURIComponent(item.url) + uni.navigateTo({ + url: `/pages_app/webview/webview?url=${encoded}` + }) + // #endif + }; + // 实用指南点击事件 const onGuideClick = (item) => { - console.log('点击实用指南:', item); - uni.showToast({ - title: `查看${item.title}`, - icon: 'none' - }); - // 根据类型跳转到不同页面 - if (item.type === 'guide') { - uni.navigateTo({ - url: '/pages/guide/detail?id=' + item.id - }); - } else if (item.type === 'courseware') { - uni.navigateTo({ - url: '/pages/courseware/list' - }); + // 如果有PDF链接,直接打开 + if (item.path) { + const pdfUrl = docUrl+item.path; + console.log(pdfUrl) + if (pdfUrl) { + // H5 端 + // #ifdef H5 + window.open(pdfUrl, '_blank'); + // #endif + + // App 端 + // #ifdef APP-PLUS + plus.runtime.openURL(pdfUrl); + // #endif + + // 小程序端:使用内嵌 webview 页面打开 + // #ifdef MP-WEIXIN + const encoded = encodeURIComponent(pdfUrl); + uni.navigateTo({ + url: `/pages_app/webview/webview?url=${encoded}` + }); + // #endif + return; + } } + + // 没有PDF链接时,根据类型跳转到不同页面 + // if (item.type === 'guide') { + // uni.navigateTo({ + // url: '/pages/guide/detail?id=' + item.id + // }); + // } else if (item.type === 'courseware') { + // uni.navigateTo({ + // url: '/pages/courseware/list' + // }); + // } }; // 测试tabbar功能的方法 @@ -685,47 +657,135 @@ if (res && res.data) { const data = res.data; + Object.assign(expertDetail,data.expertDetail) - // 更新轮播图数据 - if (data.bannerList && data.bannerList.length > 0) { - bannerList.length = 0; - bannerList.push(...data.bannerList); + // 未读消息红点 + hasUnread.value = !!data.has_unread; + + // 签到状态 + isSignedIn.value = data.sign_in === 1; + + // 福利待领取弹窗 + if (data.welfare_notice && data.welfare_notice.receive_notice) { + visible.value = true; } - // 更新功能网格数据 - if (data.gridList && data.gridList.length > 0) { + // 顶部轮播图:news_list(图片+可跳转) + bannerList.length = 0; + if (Array.isArray(data.news_list) && data.news_list.length > 0) { + bannerList.push( + ...data.news_list.map(item => ({ + image: item.headImg || '', + type: item.type, // 0: H5链接, 1: 图片无跳转 等 + path: item.path || '', + uuid: item.uuid || '' + })) + ); + } else if (Array.isArray(data.esite_list) && data.esite_list.length > 0) { + bannerList.push({ image: data.esite_list[0].img_path || '' }); + } + + // 功能网格:icons_list -> gridList + if (Array.isArray(data.icons_list) && data.icons_list.length > 0) { gridList.length = 0; - gridList.push(...data.gridList); + gridList.push( + ...data.icons_list.map(item => ({ + icon: item.img || '', + text: item.name || '' + })) + ); + gridList.push({ + icon:more, + text:'更多' + }) } - // 更新消息通知数据 - if (data.noticeList && data.noticeList.length > 0) { + // 消息通知:meeting_list -> noticeList(含日期) + if (Array.isArray(data.meeting_list) && data.meeting_list.length > 0) { noticeList.length = 0; - noticeList.push(...data.noticeList); + noticeList.push( + ...data.meeting_list.map((item, idx) => ({ + id: item.id || item.uuid || idx + 1, + content: item.title || item.name || '', + time: item.begin_date || item.start_time || item.time || item.create_date || '', + type: 'meeting', + path: item.path || '' + })) + ); } - // 更新专题E站数据 - if (data.specialList && data.specialList.length > 0) { + // 专题E站:esite_list -> specialList(仅图片,最多展示3个) + if (Array.isArray(data.esite_list) && data.esite_list.length > 0) { specialList.length = 0; - specialList.push(...data.specialList); + specialList.push( + ...data.esite_list.slice(0, 3).map(item => ({ + image: item.img_path || '', + url: item.url || '' + })) + ); } - // 更新精品课数据 - if (data.courseList && data.courseList.length > 0) { + // 精品课:excellencourse_list -> courseList + if (Array.isArray(data.excellencourse_list) && data.excellencourse_list.length > 0) { courseList.length = 0; - courseList.push(...data.courseList); + courseList.push( + ...data.excellencourse_list.map(item => ({ + title: item.title || '', + status: item.video_num != null ? `共${item.video_num}讲` : '', + avatar: item.index_img || '' + })) + ); } - // 更新精彩回放数据 - if (data.replayList && data.replayList.length > 0) { + // 精彩回放:video_list -> replayList + if (Array.isArray(data.video_list) && data.video_list.length > 0) { replayList.length = 0; - replayList.push(...data.replayList); + replayList.push( + ...data.video_list.map(item => ({ + id: item.uuid || item.polyv_uuid || Math.random().toString(36).slice(2), + avatar: item.imgpath || '', + content: item.name || '', + type: 'case_discussion' + })) + ); } - // 更新实用指南数据 - if (data.guideList && data.guideList.length > 0) { - guideList.length = 0; - guideList.push(...data.guideList); + // 实用指南:guide_ist(存 guidesData) + guidesData.length = 0; + if (Array.isArray(data.guide_ist) && data.guide_ist.length > 0) { + guidesData.push( + ...data.guide_ist.map(item => ({ + id: item.article_uuid || '', + title: item.title || '', + description: '', + actionType: 'download', + type: 'courseware', + path: item.path || '' + })) + ); + } + + // 课件分享:gandanfile_list(存 coursewareData) + coursewareData.length = 0; + if (Array.isArray(data.gandanfile_list) && data.gandanfile_list.length > 0) { + coursewareData.push( + ...data.gandanfile_list.map(item => ({ + id: item.article_uuid || '', + title: item.title || '', + description: '', + actionType: 'download', + type: 'courseware', + path: item.path || '' + })) + ); + } + + // 默认展示当前选中标签的数据 + guideList.length = 0; + if (currentGuideTab.value === 0) { + guideList.push(...guidesData); + } else { + guideList.push(...coursewareData); } } } catch (error) { @@ -774,11 +834,51 @@ }); }; + // 签到点击事件 + const onSignClick = async () => { + // 如果已经签到,显示提示 + if (isSignedIn.value) { + hasSign.value=true; + return; + } + + try { + // 调用添加积分接口 + const res = await api.addBonusPointsN({ + score_type:1 + }); + + if (res && res.code === 200) { + // 签到成功 + isSignedIn.value = true; + uni.showToast({ + title: '签到成功,获得10积分', + icon: 'success' + }); + + // 显示签到弹窗 + showSign.value = true; + } else { + uni.showToast({ + title: res?.msg || '签到失败', + icon: 'none' + }); + } + } catch (error) { + console.error('签到失败:', error); + uni.showToast({ + title: '签到失败,请重试', + icon: 'none' + }); + } + }; + // 暴露方法给父组件(如果需要) defineExpose({ testTabbar, getTabbarStatus, - goToCourseHome + goToCourseHome, + onSignClick }); @@ -991,7 +1091,19 @@ overflow: hidden; position: relative; } - + .doctorInfo{ + position: absolute; + top:200rpx; + z-index:9; + left:30rpx; + right:30rpx; + color:#fff; + font-size: 40rpx; + } + .doctorInfo .hospital{ + margin-top: 20rpx; + font-size: 32rpx; + } .banner-content { height: 100%; display: flex; @@ -1069,6 +1181,20 @@ display: flex; flex-direction: column; gap: 20rpx; + background-color: #fff; + padding: 20rpx; + border-radius: 10rpx; + } + + /* 专题E站图片项:宽度铺满,高度自适应 */ + .special-item { + position: relative; + width: 100%; + overflow: hidden; + } + .special-img { + width: 100%; + display: block; } .special-card { @@ -1148,19 +1274,20 @@ white-space: nowrap; margin-left: 30rpx; margin-right: 30rpx; + overflow: hidden; } .course-list { - display: flex; + display: inline-flex; gap: 30rpx; - width:auto; + width: auto; + padding-right: 60rpx; /* 让最后一项与右边留出更大间距 */ } .course-item { - flex:1; - background-color: #f4f4f4; + display: inline-block; + background-color: #f4f4f4; width: 464rpx; - margin-right: 30rpx; box-shadow: 0 4rpx 16rpx rgba(0,0,0,0.1); border-radius: 24rpx; overflow: hidden; @@ -1185,15 +1312,19 @@ font-size: 20rpx; } - .course-content { - margin-bottom: 30rpx; - } - .course-title { white-space: normal; font-size: 30rpx; color: #333333; margin: 20rpx; + /* 固定两行高度并省略 */ + line-height: 40rpx; + height: 80rpx; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; + text-overflow: ellipsis; } .course-subtitle { @@ -1240,8 +1371,7 @@ .replay-item { cursor: pointer; - height:305rpx; - } + } .replay-card { background-color: white; @@ -1255,9 +1385,8 @@ transform: scale(0.98); } - .replay-image { + .replay-image { /* 不再使用固定高容器,保留占位以防其它样式引用 */ width: 100%; - height: 200rpx; overflow: hidden; } @@ -1267,6 +1396,13 @@ object-fit: cover; } + /* 新增:精彩回放图片自适应 */ + .replay-img{ + width: 100%; + height: auto; + display: block; + } + .replay-content { padding: 20rpx; } diff --git a/pages/my/my.vue b/pages/my/my.vue index 718284f..c768e53 100644 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -1,27 +1,29 @@