feat(文章组件): 添加国内新闻处理逻辑

为文章组件添加 isDomestic 属性,用于控制国内新闻的显示逻辑
调整首页搜索框和国内新闻列表的显示条件及间距
This commit is contained in:
zzp 2025-08-30 21:21:49 +08:00
parent d74ce73971
commit cda80c62d6
3 changed files with 12 additions and 5 deletions

View File

@ -8,7 +8,7 @@
</text>
<view class="author">
<view class="name">
<view class="name" v-if="!isDomestic">
<text class="text">来源:</text>
<text class="text">{{ props.data.tag }}</text>
</view>
@ -53,7 +53,10 @@
<!-- 两个标签 end -->
<!-- 摘要 -->
<view :class="['desc', isLogin ? '' : 'mohu']" v-if="props.data.summary">
<view
:class="['desc', isLogin ? '' : 'mohu']"
v-if="props.data.summary && !isDomestic"
>
<!-- <view class="bill_icon"></view> -->
{{ props.data.summary }}
</view>
@ -100,6 +103,10 @@ const props = defineProps({
type: Object,
default: () => {},
},
isDomestic: {
type: Boolean,
default: false,
},
});
const tagList1 = ref([
{

View File

@ -37,7 +37,7 @@
</view>
<!-- 文章正文 start -->
<Article :data="data" />
<Article :data="data" :isDomestic="isDomestic" />
<!-- 分割 -->
<view class="line"></view>
<!-- 推荐栏目 -->

View File

@ -45,7 +45,7 @@
>
</image>
<view class="sreach" @click="goSreach">
<view class="sreach" @click="goSreach" v-if="tabIndex == 0">
<view class="sreach_icon">
<image
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/icon_search_line.png"
@ -77,7 +77,7 @@
<RankListMini :newsList="newsList"></RankListMini>
</view>
<!-- 列表区域 -->
<view style="margin-top: 30rpx" v-if="tabIndex == 2">
<view style="margin-top: 50rpx" v-if="tabIndex == 2">
<Domestic />
</view>