diff --git a/pages_app/hot/hot.vue b/pages_app/hot/hot.vue index 3d5aa0c..926042c 100644 --- a/pages_app/hot/hot.vue +++ b/pages_app/hot/hot.vue @@ -108,9 +108,7 @@ const innerSortTitle=ref('上传时间'); import downloadStore from "@/store/downloadStoreFile.js"; const downloadTasks=ref([]); const downLoadtaskList=computed(()=>{ - console.log('downLoadtaskList'); - console.log(downloadTasks.value.map((item)=>item.id)); - return downloadTasks.value.map((item)=>item.id); + return downloadTasks.value.filter((item)=>item.status == "completed").map((item)=>item.id); }); const chooseInnerSort=(index)=>{ sort.value=index; @@ -396,15 +394,24 @@ const viewGuideline = (cell) => { }); return; } + console.log('下载列表'); + console.log(downloadTasks.value); downloadTasks.value.forEach(item => { if(item.id == cell.uuid) { uni.openDocument({ filePath: item.localPath, + fileType: 'pdf', success: () => console.log('打开成功'), - fail: (err) => console.error('打开失败', err) + fail: (err) => { + uni.showToast({ + title: err, + icon: "none", + }); + } }); } }); + } @@ -464,12 +471,12 @@ const startDownload = (index) => { const taskItem = downloadStore.getTask(index); if (!taskItem) return; if(taskItem.status == "loading"){ - uni.showToast({ - title: "正在下载", - icon: "none", - }); return false; }; + uni.showToast({ + title: "正在下载中", + icon: "none", + }); downloadStore.updateTask(index, { status: "loading" }); diff --git a/pages_app/video/video.vue b/pages_app/video/video.vue index 175cd68..6b9b816 100644 --- a/pages_app/video/video.vue +++ b/pages_app/video/video.vue @@ -247,7 +247,7 @@ :class="{active:selectYearContent.uuid==item.uuid}" @click="selectContent(item)" > - {{item.name }} + {{formatName(item.name) }} 该分类暂无内容 @@ -278,7 +278,7 @@ import searchImg from "@/static/search.png" import lazyImg from "@/static/default_video.png" import lazyVideoImg from "@/static/videoPlaceholder.png"; - import meetImg from "@/static/sfewm.png" + import meetImg from "@/static/videoIcon.png" import formatNumber from '@/utils/formatNumber.js'; import navBar from '@/components/navBar/navBar.vue'; const isAllActive=ref(false) @@ -350,7 +350,13 @@ onMounted(() => { }); - + const formatName=(name)=>{ + let index=name.lastIndexOf('-'); + if(index>-1){ + return name.substring(index+1,name.length); + } + return name; + } onShow(() => { // 调用真实API获取数据 currentPage.value = 1; @@ -508,14 +514,14 @@ try { // 调用真实API - const selectedTags = filterTags.value.filter(tag => tag.selected).map(tag => tag.id).join(','); + //const selectedTags = filterTags.value.filter(tag => tag.selected).map(tag => tag.id).join(','); console.log('请求参数:', { page: currentPage.value, pageSize: pageSize.value, keywords: keywords.value, sort: sort.value, typeUuid:typeUuid.value, - tags: selectedTags + tags: keywords.value }); const response = await api.videoByKeyWordsNew({ @@ -543,7 +549,7 @@ console.log('解析后的视频数据:', videoData); if (videoData && videoData.list) { - const { list, hasMore, total } = videoData; + const { list, pageNumber,totalPage } = videoData; console.log('视频列表数据:', list); if (isRefresh) { @@ -553,7 +559,8 @@ videoList.value = [...videoList.value, ...(list || [])]; } - hasMoreData.value = hasMore !== false; + //const { list, pageNumber,totalPage } = videoData; + hasMoreData.value = totalPage>pageNumber; loadMoreStatus.value = hasMoreData.value ? 'more' : 'noMore'; } else { throw new Error(response?.message || '获取数据失败'); @@ -671,10 +678,10 @@ console.log('解析后的搜索数据:', searchData); if (searchData && searchData.list) { - const { list, hasMore } = searchData; - console.log('搜索结果:', list); + const { list,totalPage,pageNumber} = searchData; videoList.value = list || []; - hasMoreData.value = hasMore !== false; + hasMoreData.value = totalPage>pageNumber; + console.log('hasMoreData:'+hasMoreData.value) loadMoreStatus.value = hasMoreData.value ? 'more' : 'noMore'; currentPage.value = 1; } @@ -764,18 +771,21 @@ }; const confirmFilter = () => { + let str=''; const selectedTags = filterTags.value.filter(tag => tag.selected); console.log('选中的筛选标签:', selectedTags); for (var i = 0; i < selectedTags.length; i++) { - if(keywords.value){ - keywords.value+=","+selectedTags[i].NAME + if(str){ + str+=","+selectedTags[i].NAME }else{ - keywords.value=selectedTags[i].NAME + str=selectedTags[i].NAME } } + keywords.value=str; + console.log('keywords:'+keywords.value) isFilterActive.value=true; hideFilterPopup(); // 根据选中的标签重新加载数据 @@ -907,7 +917,7 @@ .scroll-view { position: fixed; bottom:0rpx; - height: calc(100vh - var(--status-bar-height) - 54px - 400rpx); /* 固定高度,减去固定的banner和Filter Tabs空间 */ + height: calc(100vh - var(--status-bar-height) - 54px - 430rpx); /* 固定高度,减去固定的banner和Filter Tabs空间 */ background-color: #f5f5f5; margin-bottom: 200rpx; top: calc(var(--status-bar-height) + 54px + 400rpx); /* 为固定的banner和Filter Tabs留出空间 */ @@ -1105,13 +1115,17 @@ margin-top: 100rpx; /* 为固定的Filter Tabs留出空间 */ display: flex; flex-wrap: wrap; - gap: 16rpx; /* 卡片间距 */ + /* 卡片间距 */ +} +.video-list .video-item:nth-child(2n+2) { + margin-left: 16rpx; } .video-item { background-color: #fff; border-radius: 16rpx; margin-bottom: 0; + margin-top: 16rpx; overflow: hidden; box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.1); width: calc(50% - 8rpx); /* 两列布局,减半gap */ @@ -1167,6 +1181,10 @@ .author { font-size: 24rpx; color: #999; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + margin-right: 20rpx; } .stats { diff --git a/pages_app/videoDetail/videoDetail.vue b/pages_app/videoDetail/videoDetail.vue index 701e556..f6dba56 100644 --- a/pages_app/videoDetail/videoDetail.vue +++ b/pages_app/videoDetail/videoDetail.vue @@ -74,15 +74,15 @@ - + + {{ videoInfo.note }} @@ -277,6 +277,7 @@ const startDownload = (index) => { uni.getSavedFileInfo({ filePath: res2.savedFilePath, success: function (res) { + console.log("res:"+JSON.stringify(res)); console.log("size:"+res.size); downloadStore.updateTask(index, { @@ -284,6 +285,7 @@ const startDownload = (index) => { localPath: res2.savedFilePath, size: res.size, }); + VideoDownloadRecord(); }, }); }, @@ -1032,7 +1034,7 @@ $theme-color: #8b2316; } .intro { // background: #fff; - padding: 24rpx 28rpx 100rpx; + padding: 30rpx 28rpx 100rpx; // margin-top: calc(var(--status-bar-height) + 44px + 220px + 88rpx); // height: calc(100vh - var(--status-bar-height) - 44px - 220px - 88rpx); // overflow-y: scroll; @@ -1054,6 +1056,9 @@ $theme-color: #8b2316; .video-author { font-size: 26rpx; color: #666; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } } diff --git a/pages_app/zhinan/zhinan.vue b/pages_app/zhinan/zhinan.vue index f3b4039..da467b3 100644 --- a/pages_app/zhinan/zhinan.vue +++ b/pages_app/zhinan/zhinan.vue @@ -619,19 +619,21 @@ $accent-color: #4A90E2; display: flex; flex-wrap: wrap; padding: 30rpx; - gap: 20rpx; + margin:0 30rpx; margin-top: calc(var(--status-bar-height) + 44px + 106rpx); // 为固定搜索栏留出空间 (搜索栏高度约80rpx + 边距) .guideline-item { - + margin-top: 20rpx; width: calc(33.333% - 14rpx); background-color: $white; - + margin-left: 20rpx; overflow: hidden; transition: transform 0.2s ease; - + &:nth-child(3n+1){ + margin-left: 0; + } &:active { transform: scale(0.98); } diff --git a/pages_app/zhinanList/zhinanList.vue b/pages_app/zhinanList/zhinanList.vue index 5f34360..44c796c 100644 --- a/pages_app/zhinanList/zhinanList.vue +++ b/pages_app/zhinanList/zhinanList.vue @@ -84,7 +84,7 @@ 上拉加载更多 - + 没有更多数据了 @@ -92,7 +92,7 @@ - 暂无诊疗指南数据 + 暂无数据 @@ -170,9 +170,7 @@ const innerSortTitle = ref("上传时间"); import downloadStore from "@/store/downloadStoreFile.js"; const downloadTasks=ref([]); const downLoadtaskList=computed(()=>{ - console.log('downLoadtaskList'); - console.log(downloadTasks.value.map((item)=>item.id)); - return downloadTasks.value.map((item)=>item.id); + return downloadTasks.value.filter((item)=>item.status == "completed").map((item)=>item.id); }); const chooseInnerSort = (index) => { sort.value = index; @@ -451,13 +449,24 @@ const viewGuideline = (cell) => { return; } const pdfUrl = docUrl + cell.path; + console.log('下载列表'); console.log(downloadTasks.value); downloadTasks.value.forEach(item => { if(item.id == cell.uuid) { uni.openDocument({ filePath: item.localPath, + fileType: 'pdf', success: () => console.log('打开成功'), - fail: (err) => console.error('打开失败', err) + fail: (err) => { + uni.showModal({ + title: '提示', + content: JSON.stringify(err), + showCancel: false, + confirmText: '确定', + success: (res) => { + if(res.confirm){ + } + } }); } }); @@ -497,12 +506,13 @@ const startDownload = (index) => { const taskItem = downloadStore.getTask(index); if (!taskItem) return; if(taskItem.status == "loading"){ - uni.showToast({ - title: "正在下载", - icon: "none", - }); + return false; }; + uni.showToast({ + title: "正在下载中", + icon: "none", + }); downloadStore.updateTask(index, { status: "loading" }); diff --git a/static/meetIcon.png b/static/meetIcon.png new file mode 100644 index 0000000..56e1cc8 Binary files /dev/null and b/static/meetIcon.png differ diff --git a/static/videoIcon.png b/static/videoIcon.png new file mode 100644 index 0000000..56e1cc8 Binary files /dev/null and b/static/videoIcon.png differ diff --git a/tsconfig.json b/tsconfig.json index 764f644..0cef6d3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -69,6 +69,9 @@ + + + diff --git a/utils/config.js b/utils/config.js index ca59088..b2d361d 100644 --- a/utils/config.js +++ b/utils/config.js @@ -1,6 +1,7 @@ console.log('打印app'); -let BASE_URL='https://dev-app.igandan.com/app'; +//let BASE_URL='https://dev-app.igandan.com/app'; +let BASE_URL='https://app.igandan.com/app' // try { // const app = getApp({allowDefault: true}); diff --git a/utils/docUrl.js b/utils/docUrl.js index 4f5546f..3224076 100644 --- a/utils/docUrl.js +++ b/utils/docUrl.js @@ -1,5 +1,6 @@ -//const app = getApp(); -let DOC_URL='https://dev-doc.igandan.com/app/'; +//const app = getApp({allowDefault: true}); +//let DOC_URL='https://dev-doc.igandan.com/app/'; +let DOC_URL='https://doc.igandan.com/app/' // if(app.globalData.apiHost.indexOf('dev')>-1){ // DOC_URL='https://dev-doc.igandan.com/app/' // }else{ diff --git a/utils/otherHost.js b/utils/otherHost.js index 3ca83e8..11eb0ef 100644 --- a/utils/otherHost.js +++ b/utils/otherHost.js @@ -1,4 +1,5 @@ -let OTHER_HOST='https://dev-wx.igandan.com' +//let OTHER_HOST='https://dev-wx.igandan.com' +let OTHER_HOST='https://wx.igandan.com' //const app = getApp({allowDefault: true}); // if(app.globalData.apiHost && app.globalData.apiHost.indexOf('dev')>-1){ // OTHER_HOST='https://dev-wx.igandan.com'