12.2提交

This commit is contained in:
zoujiandong 2025-12-02 15:24:51 +08:00
parent 9788e723a2
commit 60531b339e
11 changed files with 93 additions and 45 deletions

View File

@ -108,9 +108,7 @@ const innerSortTitle=ref('上传时间');
import downloadStore from "@/store/downloadStoreFile.js"; import downloadStore from "@/store/downloadStoreFile.js";
const downloadTasks=ref([]); const downloadTasks=ref([]);
const downLoadtaskList=computed(()=>{ const downLoadtaskList=computed(()=>{
console.log('downLoadtaskList'); return downloadTasks.value.filter((item)=>item.status == "completed").map((item)=>item.id);
console.log(downloadTasks.value.map((item)=>item.id));
return downloadTasks.value.map((item)=>item.id);
}); });
const chooseInnerSort=(index)=>{ const chooseInnerSort=(index)=>{
sort.value=index; sort.value=index;
@ -396,15 +394,24 @@ const viewGuideline = (cell) => {
}); });
return; return;
} }
console.log('下载列表');
console.log(downloadTasks.value);
downloadTasks.value.forEach(item => { downloadTasks.value.forEach(item => {
if(item.id == cell.uuid) { if(item.id == cell.uuid) {
uni.openDocument({ uni.openDocument({
filePath: item.localPath, filePath: item.localPath,
fileType: 'pdf',
success: () => console.log('打开成功'), 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); const taskItem = downloadStore.getTask(index);
if (!taskItem) return; if (!taskItem) return;
if(taskItem.status == "loading"){ if(taskItem.status == "loading"){
uni.showToast({
title: "正在下载",
icon: "none",
});
return false; return false;
}; };
uni.showToast({
title: "正在下载中",
icon: "none",
});
downloadStore.updateTask(index, { downloadStore.updateTask(index, {
status: "loading" status: "loading"
}); });

View File

@ -247,7 +247,7 @@
:class="{active:selectYearContent.uuid==item.uuid}" :class="{active:selectYearContent.uuid==item.uuid}"
@click="selectContent(item)" @click="selectContent(item)"
> >
{{item.name }} {{formatName(item.name) }}
</view> </view>
<view v-if="filteredContent.length === 0" class="empty-content"> <view v-if="filteredContent.length === 0" class="empty-content">
<text>该分类暂无内容</text> <text>该分类暂无内容</text>
@ -278,7 +278,7 @@
import searchImg from "@/static/search.png" import searchImg from "@/static/search.png"
import lazyImg from "@/static/default_video.png" import lazyImg from "@/static/default_video.png"
import lazyVideoImg from "@/static/videoPlaceholder.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 formatNumber from '@/utils/formatNumber.js';
import navBar from '@/components/navBar/navBar.vue'; import navBar from '@/components/navBar/navBar.vue';
const isAllActive=ref(false) const isAllActive=ref(false)
@ -350,7 +350,13 @@
onMounted(() => { onMounted(() => {
}); });
const formatName=(name)=>{
let index=name.lastIndexOf('-');
if(index>-1){
return name.substring(index+1,name.length);
}
return name;
}
onShow(() => { onShow(() => {
// API // API
currentPage.value = 1; currentPage.value = 1;
@ -508,14 +514,14 @@
try { try {
// API // 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('请求参数:', { console.log('请求参数:', {
page: currentPage.value, page: currentPage.value,
pageSize: pageSize.value, pageSize: pageSize.value,
keywords: keywords.value, keywords: keywords.value,
sort: sort.value, sort: sort.value,
typeUuid:typeUuid.value, typeUuid:typeUuid.value,
tags: selectedTags tags: keywords.value
}); });
const response = await api.videoByKeyWordsNew({ const response = await api.videoByKeyWordsNew({
@ -543,7 +549,7 @@
console.log('解析后的视频数据:', videoData); console.log('解析后的视频数据:', videoData);
if (videoData && videoData.list) { if (videoData && videoData.list) {
const { list, hasMore, total } = videoData; const { list, pageNumber,totalPage } = videoData;
console.log('视频列表数据:', list); console.log('视频列表数据:', list);
if (isRefresh) { if (isRefresh) {
@ -553,7 +559,8 @@
videoList.value = [...videoList.value, ...(list || [])]; videoList.value = [...videoList.value, ...(list || [])];
} }
hasMoreData.value = hasMore !== false; //const { list, pageNumber,totalPage } = videoData;
hasMoreData.value = totalPage>pageNumber;
loadMoreStatus.value = hasMoreData.value ? 'more' : 'noMore'; loadMoreStatus.value = hasMoreData.value ? 'more' : 'noMore';
} else { } else {
throw new Error(response?.message || '获取数据失败'); throw new Error(response?.message || '获取数据失败');
@ -671,10 +678,10 @@
console.log('解析后的搜索数据:', searchData); console.log('解析后的搜索数据:', searchData);
if (searchData && searchData.list) { if (searchData && searchData.list) {
const { list, hasMore } = searchData; const { list,totalPage,pageNumber} = searchData;
console.log('搜索结果:', list);
videoList.value = list || []; videoList.value = list || [];
hasMoreData.value = hasMore !== false; hasMoreData.value = totalPage>pageNumber;
console.log('hasMoreData:'+hasMoreData.value)
loadMoreStatus.value = hasMoreData.value ? 'more' : 'noMore'; loadMoreStatus.value = hasMoreData.value ? 'more' : 'noMore';
currentPage.value = 1; currentPage.value = 1;
} }
@ -764,18 +771,21 @@
}; };
const confirmFilter = () => { const confirmFilter = () => {
let str='';
const selectedTags = filterTags.value.filter(tag => tag.selected); const selectedTags = filterTags.value.filter(tag => tag.selected);
console.log('选中的筛选标签:', selectedTags); console.log('选中的筛选标签:', selectedTags);
for (var i = 0; i < selectedTags.length; i++) { for (var i = 0; i < selectedTags.length; i++) {
if(keywords.value){ if(str){
keywords.value+=","+selectedTags[i].NAME str+=","+selectedTags[i].NAME
}else{ }else{
keywords.value=selectedTags[i].NAME str=selectedTags[i].NAME
} }
} }
keywords.value=str;
console.log('keywords:'+keywords.value)
isFilterActive.value=true; isFilterActive.value=true;
hideFilterPopup(); hideFilterPopup();
// //
@ -907,7 +917,7 @@
.scroll-view { .scroll-view {
position: fixed; position: fixed;
bottom:0rpx; 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; background-color: #f5f5f5;
margin-bottom: 200rpx; margin-bottom: 200rpx;
top: calc(var(--status-bar-height) + 54px + 400rpx); /* 为固定的banner和Filter Tabs留出空间 */ top: calc(var(--status-bar-height) + 54px + 400rpx); /* 为固定的banner和Filter Tabs留出空间 */
@ -1105,13 +1115,17 @@
margin-top: 100rpx; /* 为固定的Filter Tabs留出空间 */ margin-top: 100rpx; /* 为固定的Filter Tabs留出空间 */
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 16rpx; /* 卡片间距 */ /* 卡片间距 */
}
.video-list .video-item:nth-child(2n+2) {
margin-left: 16rpx;
} }
.video-item { .video-item {
background-color: #fff; background-color: #fff;
border-radius: 16rpx; border-radius: 16rpx;
margin-bottom: 0; margin-bottom: 0;
margin-top: 16rpx;
overflow: hidden; overflow: hidden;
box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.1); box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.1);
width: calc(50% - 8rpx); /* 两列布局减半gap */ width: calc(50% - 8rpx); /* 两列布局减半gap */
@ -1167,6 +1181,10 @@
.author { .author {
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #999;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-right: 20rpx;
} }
.stats { .stats {

View File

@ -74,15 +74,15 @@
<!-- 内容区 --> <!-- 内容区 -->
<view v-if="activeTab === 'info'" class="intro"> <view v-if="activeTab === 'info'" class="intro">
<!-- 显示传递过来的视频信息 --> <!-- 显示传递过来的视频信息 -->
<view v-if="pageParams.title" class="video-info"> <!-- <view v-if="pageParams.title" class="video-info">
<view class="video-title">{{ <view class="video-title">{{
decodeURIComponent(pageParams.title) decodeURIComponent(pageParams.title)
}}</view> }}</view>
<view v-if="pageParams.author" class="video-author">{{ <view v-if="pageParams.author" class="video-author">{{
decodeURIComponent(pageParams.author) decodeURIComponent(pageParams.author)
}}</view> }}</view>
</view> </view> -->
<view class="speaker">{{ videoInfo.public_name }}</view> <!-- <view class="speaker">{{ videoInfo.public_name }}</view> -->
<text class="intro-text">{{ videoInfo.note }}</text> <text class="intro-text">{{ videoInfo.note }}</text>
</view> </view>
<view v-else class="comments"> <view v-else class="comments">
@ -277,6 +277,7 @@ const startDownload = (index) => {
uni.getSavedFileInfo({ uni.getSavedFileInfo({
filePath: res2.savedFilePath, filePath: res2.savedFilePath,
success: function (res) { success: function (res) {
console.log("res:"+JSON.stringify(res)); console.log("res:"+JSON.stringify(res));
console.log("size:"+res.size); console.log("size:"+res.size);
downloadStore.updateTask(index, { downloadStore.updateTask(index, {
@ -284,6 +285,7 @@ const startDownload = (index) => {
localPath: res2.savedFilePath, localPath: res2.savedFilePath,
size: res.size, size: res.size,
}); });
VideoDownloadRecord();
}, },
}); });
}, },
@ -1032,7 +1034,7 @@ $theme-color: #8b2316;
} }
.intro { .intro {
// background: #fff; // background: #fff;
padding: 24rpx 28rpx 100rpx; padding: 30rpx 28rpx 100rpx;
// margin-top: calc(var(--status-bar-height) + 44px + 220px + 88rpx); // margin-top: calc(var(--status-bar-height) + 44px + 220px + 88rpx);
// height: calc(100vh - var(--status-bar-height) - 44px - 220px - 88rpx); // height: calc(100vh - var(--status-bar-height) - 44px - 220px - 88rpx);
// overflow-y: scroll; // overflow-y: scroll;
@ -1054,6 +1056,9 @@ $theme-color: #8b2316;
.video-author { .video-author {
font-size: 26rpx; font-size: 26rpx;
color: #666; color: #666;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
} }

View File

@ -619,19 +619,21 @@ $accent-color: #4A90E2;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
padding: 30rpx; padding: 30rpx;
gap: 20rpx;
margin:0 30rpx; margin:0 30rpx;
margin-top: calc(var(--status-bar-height) + 44px + 106rpx); // (80rpx + ) margin-top: calc(var(--status-bar-height) + 44px + 106rpx); // (80rpx + )
.guideline-item { .guideline-item {
margin-top: 20rpx;
width: calc(33.333% - 14rpx); width: calc(33.333% - 14rpx);
background-color: $white; background-color: $white;
margin-left: 20rpx;
overflow: hidden; overflow: hidden;
transition: transform 0.2s ease; transition: transform 0.2s ease;
&:nth-child(3n+1){
margin-left: 0;
}
&:active { &:active {
transform: scale(0.98); transform: scale(0.98);
} }

View File

@ -84,7 +84,7 @@
<view v-else-if="loadMoreStatus === 'more'" class="more"> <view v-else-if="loadMoreStatus === 'more'" class="more">
<text>上拉加载更多</text> <text>上拉加载更多</text>
</view> </view>
<view v-else-if="loadMoreStatus === 'noMore'" class="no-more"> <view v-else-if="loadMoreStatus === 'noMore' && currentPage > 1" class="no-more">
<text>没有更多数据了</text> <text>没有更多数据了</text>
</view> </view>
</view> </view>
@ -92,7 +92,7 @@
<!-- 无数据提示 --> <!-- 无数据提示 -->
<view class="no-data" v-if="guidelinesList.length === 0 && !isLoading"> <view class="no-data" v-if="guidelinesList.length === 0 && !isLoading">
<uni-icons type="info" size="60" color="#999"></uni-icons> <uni-icons type="info" size="60" color="#999"></uni-icons>
<text>暂无诊疗指南数据</text> <text>暂无数据</text>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
@ -170,9 +170,7 @@ const innerSortTitle = ref("上传时间");
import downloadStore from "@/store/downloadStoreFile.js"; import downloadStore from "@/store/downloadStoreFile.js";
const downloadTasks=ref([]); const downloadTasks=ref([]);
const downLoadtaskList=computed(()=>{ const downLoadtaskList=computed(()=>{
console.log('downLoadtaskList'); return downloadTasks.value.filter((item)=>item.status == "completed").map((item)=>item.id);
console.log(downloadTasks.value.map((item)=>item.id));
return downloadTasks.value.map((item)=>item.id);
}); });
const chooseInnerSort = (index) => { const chooseInnerSort = (index) => {
sort.value = index; sort.value = index;
@ -451,13 +449,24 @@ const viewGuideline = (cell) => {
return; return;
} }
const pdfUrl = docUrl + cell.path; const pdfUrl = docUrl + cell.path;
console.log('下载列表');
console.log(downloadTasks.value); console.log(downloadTasks.value);
downloadTasks.value.forEach(item => { downloadTasks.value.forEach(item => {
if(item.id == cell.uuid) { if(item.id == cell.uuid) {
uni.openDocument({ uni.openDocument({
filePath: item.localPath, filePath: item.localPath,
fileType: 'pdf',
success: () => console.log('打开成功'), 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); const taskItem = downloadStore.getTask(index);
if (!taskItem) return; if (!taskItem) return;
if(taskItem.status == "loading"){ if(taskItem.status == "loading"){
uni.showToast({
title: "正在下载",
icon: "none",
});
return false; return false;
}; };
uni.showToast({
title: "正在下载中",
icon: "none",
});
downloadStore.updateTask(index, { downloadStore.updateTask(index, {
status: "loading" status: "loading"
}); });

BIN
static/meetIcon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
static/videoIcon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -69,6 +69,9 @@

View File

@ -1,6 +1,7 @@
console.log('打印app'); 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 { // try {
// const app = getApp({allowDefault: true}); // const app = getApp({allowDefault: true});

View File

@ -1,5 +1,6 @@
//const app = getApp(); //const app = getApp({allowDefault: true});
let DOC_URL='https://dev-doc.igandan.com/app/'; //let DOC_URL='https://dev-doc.igandan.com/app/';
let DOC_URL='https://doc.igandan.com/app/'
// if(app.globalData.apiHost.indexOf('dev')>-1){ // if(app.globalData.apiHost.indexOf('dev')>-1){
// DOC_URL='https://dev-doc.igandan.com/app/' // DOC_URL='https://dev-doc.igandan.com/app/'
// }else{ // }else{

View File

@ -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}); //const app = getApp({allowDefault: true});
// if(app.globalData.apiHost && app.globalData.apiHost.indexOf('dev')>-1){ // if(app.globalData.apiHost && app.globalData.apiHost.indexOf('dev')>-1){
// OTHER_HOST='https://dev-wx.igandan.com' // OTHER_HOST='https://dev-wx.igandan.com'