修改搜索处理逻辑

master
于肖磊 2026-02-13 11:32:35 +08:00
parent 50bd68bd19
commit 673f0051f9
4 changed files with 15 additions and 6 deletions

View File

@ -101,7 +101,7 @@ export default {
left: 0;
width: 100%;
height: 100%;
z-index: 1;
z-index: 99;
}
}
</style>

View File

@ -11,7 +11,7 @@
</view>
<!-- #endif -->
<view class="wh-auto ht-auto" :style="header_padding_left">
<search-component :propIsDisabled="true" @disabledSearch="handle_search" />
<search-component :propSearchQuery="search_query" propIsDisabled @disabledSearch="handle_search" />
</view>
</view>
</view>
@ -293,6 +293,7 @@
is_add_comment: false,
//
listener_height: 0,
search_query: '',
};
},
computed: {
@ -912,6 +913,7 @@
//
close_comment_modal() {
this.setData({
active_dropdown_id: null,
show_comment_modal: false,
move_distance: 0,
})
@ -1245,6 +1247,7 @@
},
//
comment_reply(comments) {
this.active_dropdown_id = null;
if (!isEmpty(comments)) {
this.setData({
input_placeholder: `@${comments.user.user_name_view}`,
@ -1254,6 +1257,7 @@
},
//
comment_like(id) {
this.active_dropdown_id = null;
this.set_givethumbs_num(this.current_video_id, id);
},
handle_slider_change(e) {
@ -1548,6 +1552,7 @@
add_comment() {
//#ifndef H5
this.is_add_comment = true;
this.active_dropdown_id = null;
//#endif
},
/**

View File

@ -7,7 +7,7 @@
<view class="header-top">
<view class="ht-auto" :style="top_content_style + menu_button_info">
<view id="search-height" class="wh-auto ht-auto" :style="header_padding_left">
<search-component :propSearchQuery="search_query" :propIsDisabled="true" @disabledSearch="handle_search"/>
<search-component :propSearchQuery="search_query" propIsDisabled @disabledSearch="handle_search"/>
</view>
</view>
<template v-if="tabs.length > 0">

View File

@ -33,7 +33,7 @@
<scroll-view scroll-y :show-scrollbar="false" class="recommend-scroll" @scrolltolower="on_scroll_lower_event" lower-threshold="60" scroll-with-animation="true">
<template v-if="recommend_videos.length > 0">
<view class="video-grid">
<view v-for="(item, index) in recommend_videos" :key="index" class="video-card" :data-value="item" @click="navigate_to_detail">
<view v-for="(item, index) in recommend_videos" :key="index" class="video-card" :data-id="item.id" @tap="navigate_to_detail">
<image class="video-thumbnail" :src="item.cover" mode="widthFix"></image>
<view class="video-info flex-col jc-c">
<view class="video-title text-line-2">{{ item.title }}</view>
@ -327,8 +327,12 @@ export default {
});
},
navigate_to_detail(e) {
const item = e.currentTarget.dataset.value;
app.globalData.url_open(`/pages/plugins/video/detail/detail?id=${item.detailId}`, false);
const id = e?.currentTarget?.dataset?.id || '';
if (id == '') {
return false;
} else {
app.globalData.url_open(`/pages/plugins/video/detail/detail?id=${id}`, false);
}
},
on_scroll_lower_event() {
debugger;