Skip to content

Commit

Permalink
Merge pull request #292 from hjdhnx/main
Browse files Browse the repository at this point in the history
优化搜索逻辑问题,drpy/hipy系列非资源站禁用搜索无图自动请求二级的逻辑。提升搜索结果加载速度。优化搜索结果元素的文本显示。
  • Loading branch information
Hiram-Wong authored Jul 5, 2024
2 parents f4d1ee1 + 9b06169 commit ab1ecc2
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions src/renderer/src/pages/Film.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,20 @@
:loading="renderLoading" :error="renderError">
<template #overlayContent>
<div class="op">
<span v-if="item.relateSite"> {{ item.relateSite.name }}</span>
<!-- <span v-if="item.relateSite"> {{ item.relateSite.name }}</span>-->
<span v-if="item.vod_name"> {{ item.vod_name }}</span>
</div>
</template>
</t-image>
</div>
<div class="card-footer">
<p class="card-footer-title text-hide">{{ item.vod_name }}</p>
<!-- <p class="card-footer-title text-hide">{{ item.vod_name }}</p>-->
<p class="card-footer-title text-hide">
<span v-if="item.relateSite"> {{ item.relateSite.name }}</span>
<span v-else> {{ item.vod_name }}</span>
</p>
<p class="card-footer-desc text-hide">{{
item.vod_blurb ? item.vod_blurb.trim() :
item.vod_blurb ? item.vod_blurb.trim():
$t('pages.film.noDesc')
}}</p>
</div>
Expand Down Expand Up @@ -524,12 +529,20 @@ const getSearchList = async () => {
length = searchGroup.length > 1 ? 1 : 0;
return length;
}
// 更新详情为vod_content或者vod_remarks
if (resultSearch.length > 0 && !_.has(resultSearch[0], 'vod_blurb')) {
resultSearch.forEach(it=>{
it.vod_blurb = it.vod_content || it.vod_remarks;
});
}
// console.log('currentSite:', currentSite);
let resultDetail = resultSearch;
if (resultSearch.length > 0 && !_.has(resultSearch[0], 'vod_pic')) {
if ([0, 1].includes(currentSite.type)) {
const ids = resultSearch.map((item) => item.vod_id);
resultDetail = await fetchDetail(currentSite, ids.join(','));
} else if([2, 6, 7].includes(currentSite.type)){
console.log('[film][search] updatePic not use in drpy/hipy sites.');
} else {
const updatePic = async (item) => {
try {
Expand Down

0 comments on commit ab1ecc2

Please sign in to comment.