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";
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"
});

View File

@ -247,7 +247,7 @@
:class="{active:selectYearContent.uuid==item.uuid}"
@click="selectContent(item)"
>
{{item.name }}
{{formatName(item.name) }}
</view>
<view v-if="filteredContent.length === 0" class="empty-content">
<text>该分类暂无内容</text>
@ -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 {

View File

@ -74,15 +74,15 @@
<!-- 内容区 -->
<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">{{
decodeURIComponent(pageParams.title)
}}</view>
<view v-if="pageParams.author" class="video-author">{{
decodeURIComponent(pageParams.author)
}}</view>
</view>
<view class="speaker">{{ videoInfo.public_name }}</view>
</view> -->
<!-- <view class="speaker">{{ videoInfo.public_name }}</view> -->
<text class="intro-text">{{ videoInfo.note }}</text>
</view>
<view v-else class="comments">
@ -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;
}
}

View File

@ -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);
}

View File

@ -84,7 +84,7 @@
<view v-else-if="loadMoreStatus === 'more'" class="more">
<text>上拉加载更多</text>
</view>
<view v-else-if="loadMoreStatus === 'noMore'" class="no-more">
<view v-else-if="loadMoreStatus === 'noMore' && currentPage > 1" class="no-more">
<text>没有更多数据了</text>
</view>
</view>
@ -92,7 +92,7 @@
<!-- 无数据提示 -->
<view class="no-data" v-if="guidelinesList.length === 0 && !isLoading">
<uni-icons type="info" size="60" color="#999"></uni-icons>
<text>暂无诊疗指南数据</text>
<text>暂无数据</text>
</view>
</scroll-view>
</view>
@ -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"
});

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');
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});

View File

@ -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{

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