修改数据显示

master
于肖磊 2026-02-13 16:11:14 +08:00
parent 322e7fb21f
commit b0725ea0c5
2 changed files with 75 additions and 17 deletions

View File

@ -139,7 +139,13 @@
</scroll-view>
<view v-if="base_config_data && base_config_data.is_video_comments_add && base_config_data.is_video_comments_add == 1" class="comment-input-container">
<view class="comment-input-content flex-col jc-c">
<view class="flex-row align-c gap-10 wh-auto ht-auto">
<view v-if="!isEmpty(comments_data)" class="comment-reply-content flex-row align-c jc-sb gap-10">
<text class="size-12 cr-f text-line-1">@{{ comments_data.user.user_name_view }}:{{ comments_data.content }}</text>
<view data-type="image" @tap="comment_data_delete">
<iconfont name="icon-close-line" size="24rpx" color="#fff"></iconfont>
</view>
</view>
<view class="flex-row align-c gap-10 wh-auto ht-auto pr-16 box-border-box">
<input :value="comment_input_value" class="comment-input" type="text" confirm-type="send" :adjust-position="false" :placeholder="input_placeholder" @focus="add_comment" @input="comment_input_event" @confirm="send_comment" />
<view data-type="image" @tap="comment_input_change">
<iconfont name="icon-layout-module-single-images" size="32rpx" color="#999"></iconfont>
@ -195,10 +201,27 @@
</view>
</view>
</component-popup>
<!-- 添加评论 -->
<!-- 添加评论弹出框 -->
<view v-if="is_add_comment" class="keyboard-input br-top-shadow" :style="'width:100%;bottom:' + listener_height + 'px;'">
<view class="keyboard-input-border">
<input :value="comment_input_value" :focus="is_add_comment" type="text" confirm-type="done" :adjust-position="false" :auto-blur="true" :placeholder="input_placeholder" @input="comment_input_event" @blur="() => is_add_comment = false" @confirm="send_comment" />
<view class="comment-input-content flex-col jc-c">
<view v-if="!isEmpty(comments_data)" class="comment-reply-content flex-row align-c jc-sb gap-10">
<text class="size-12 cr-f text-line-1">@{{ comments_data.user.user_name_view }}:{{ comments_data.content }}</text>
<view data-type="image" @tap="comment_data_delete">
<iconfont name="icon-close-line" size="24rpx" color="#fff"></iconfont>
</view>
</view>
<view class="flex-row align-c gap-10 wh-auto ht-auto pr-16 box-border-box">
<input :value="comment_input_value" :focus="is_add_comment" class="comment-input" type="text" confirm-type="done" :adjust-position="false" :auto-blur="true" :placeholder="input_placeholder" @input="comment_input_event" @blur="() => is_add_comment = false" @confirm="send_comment" />
<view data-type="image" @tap="comment_input_change">
<iconfont name="icon-layout-module-single-images" size="32rpx" color="#999"></iconfont>
</view>
</view>
<view v-if="form_images_list.length > 0" class="pr w h comment-input-img-container">
<view v-for="(item, index) in form_images_list" :key="index" class="comment-input-img pr">
<iconfont name="icon-close" size="10" color="#000" class="comment-input-img-close" :data-index="index" @tap="comment_input_img_close"></iconfont>
<image :src="item.url" :data-index="index" @tap="upload_show_event" mode="aspectFill" class="wh-auto ht-auto"></image>
</view>
</view>
</view>
</view>
<!-- 分享弹窗 -->
@ -293,6 +316,7 @@
is_add_comment: false,
//
listener_height: 0,
comments_data: {}
};
},
computed: {
@ -838,7 +862,7 @@
},
//
comment_input_img_close(e) {
const { index } = e.currentTarget.dataset;
const index = e?.currentTarget?.dataset?.index || 0;
var list = this.form_images_list;
list.splice(index, 1);
this.setData({
@ -1249,11 +1273,15 @@
this.active_dropdown_id = null;
if (!isEmpty(comments)) {
this.setData({
input_placeholder: `@${comments.user.user_name_view}`,
comments_data: comments,
});
}
},
comment_data_delete() {
this.setData({
comments_data: {},
});
},
//
comment_like(id) {
this.active_dropdown_id = null;
@ -1858,17 +1886,20 @@
.comment-input-content {
flex: 1;
border: 2rpx solid #eee;
border-radius: 8rpx;
padding-right: 16rpx;
border-radius: 16rpx;
// padding-right: 16rpx;
font-size: 28rpx;
}
.pr-16 {
padding-right: 16rpx;
}
.comment-input-img-container {
padding: 10rpx 16rpx 16rpx 16rpx;
}
.comment-input-img-close {
position: absolute;
right: -10rpx;
top: -10rpx;
right: -15rpx;
top: -15rpx;
z-index: 2;
}
.comment-input-img {
@ -1944,12 +1975,20 @@
left: 0;
z-index: 99;
background: #fff;
padding: 20rpx 16rpx;
padding: 20rpx;
box-sizing: border-box;
}
.keyboard-input-border {
padding: 16rpx 22rpx;
border: 2rpx solid #ddd;
border-radius: 50rpx;
border-radius: 16rpx;
}
.keyboard-input-content {
padding: 16rpx 22rpx;
}
.comment-reply-content {
background-color: rgba(0, 0, 0, 0.6);
padding: 10rpx;
border-radius: 16rpx;
color: #fff;
}
</style>

View File

@ -44,14 +44,22 @@
</scroll-view>
</view>
<view class="hot-list flex-col align-c gap-10">
<view v-for="(item, index) in search_history_data[hot_current_tab].data" :key="index" :class="'cp wh-auto flex-row align-c jc-sb gap-10 hot-item' + (index < 3 ? ' hot-item-top' : '')" :data-value="item.title" @tap.stop="perform_search">
<view v-for="(item, index) in search_history_data[hot_current_tab].data" :key="index" :class="'cp wh-auto flex-row align-c jc-sb gap-10 hot-item' + (index < 3 ? ' hot-item-top' : '')" :data-url="item.url" @tap.stop="perform_url">
<view class="flex-1 flex-row align-c gap-10">
<view class="hot-num flex-row align-c jc-c">
<view :class="index < 3 ? `hexagon-top hexagon-top-${index + 1}` : 'hexagon-no-top'"><span>{{ index + 1 }}</span></view>
</view>
<view class="hot-title">{{ item.title }}</view>
</view>
<view class="hot-hotness">热度 {{ item.hotness }}</view>
<view class="hot-hotness flex-row align-c gap-5">
<template v-if="search_history_data[hot_current_tab].field == 'add_time_tips'">
<iconfont name="icon-time" size="32rpx" color="#999"></iconfont>
</template>
<template v-else>
<iconfont name="icon-fire" size="32rpx" color="#999"></iconfont>
</template>
{{ item[search_history_data[hot_current_tab].field] }}
</view>
</view>
</view>
</view>
@ -183,8 +191,19 @@ export default {
this.handle_search(value);
},
delete_history(e) {
const index = e.currentTarget.dataset.index;
this.search_history.splice(index, 1);
const index = e?.currentTarget?.dataset?.index;
const data = this.show_search_history[index];
if (!isEmpty(data)) {
const newIndex = this.search_history.findIndex(item => item == data);
this.search_history.splice(newIndex, 1);
}
this.show_search_history.splice(index, 1);
},
perform_url(e) {
const url = e?.currentTarget?.dataset?.url || '';
if (!isEmpty(url)) {
app.globalData.url_open(url);
}
},
view_more_history() {
//