|
@@ -21,38 +21,44 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="news-card" v-for="item in filteredList" :key="item.id">
|
|
|
|
|
- <view class="news-content">
|
|
|
|
|
- <view v-if="item.coverImage" class="news-image-container">
|
|
|
|
|
- <image class="news-image" :src="(isProtectedUrl(resolveImageUrl(item.coverImage)) ? (downloadedCovers[resolveImageUrl(item.coverImage)] || defaultCover) : (resolveImageUrl(item.coverImage) || defaultCover))" mode="aspectFill" @load="onCoverImageLoad" @error="onCoverImageError(item.coverImage, $event)" />
|
|
|
|
|
- </view>
|
|
|
|
|
- <view v-else class="news-placeholder">
|
|
|
|
|
- <image class="placeholder-icon" src="/static/icons/remixicon/image-line.svg" />
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="meta">
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <view v-if="!isLoading">
|
|
|
|
|
+ <view class="news-card" v-for="item in filteredList" :key="item.id">
|
|
|
|
|
+ <view class="news-header">
|
|
|
<text class="title">{{ item.title }}</text>
|
|
<text class="title">{{ item.title }}</text>
|
|
|
- <text class="summary">{{ item.summary }}</text>
|
|
|
|
|
- <text class="author">作者: {{ item.authorName }}</text>
|
|
|
|
|
- <text class="time">发布时间: {{ item.publishTime }}</text>
|
|
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
|
+ <view class="news-content">
|
|
|
|
|
+ <view v-if="item.coverImage" class="news-image-container">
|
|
|
|
|
+ <image class="news-image" :src="(isProtectedUrl(resolveImageUrl(item.coverImage)) ? (downloadedCovers[resolveImageUrl(item.coverImage)] || defaultCover) : (resolveImageUrl(item.coverImage) || defaultCover))" mode="aspectFill" @load="onCoverImageLoad" @error="onCoverImageError(item.coverImage, $event)" />
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view v-else class="news-placeholder">
|
|
|
|
|
+ <image class="placeholder-icon" src="/static/icons/remixicon/image-line.svg" />
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="meta">
|
|
|
|
|
+ <text class="summary">{{ item.summary }}</text>
|
|
|
|
|
+ <text class="author">作者: {{ item.authorName }}</text>
|
|
|
|
|
+ <text class="time">发布时间: {{ item.publishTime }}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
- <view class="action-buttons">
|
|
|
|
|
- <button class="action-btn primary" @click="viewNews(item)">查看</button>
|
|
|
|
|
- <button class="action-btn secondary" @click="editNews(item)">编辑</button>
|
|
|
|
|
- <button class="action-btn danger" @click="removeNews(item)">删除</button>
|
|
|
|
|
|
|
+ <view class="action-buttons">
|
|
|
|
|
+ <button class="action-btn primary" @click="viewNews(item)">查看</button>
|
|
|
|
|
+ <button class="action-btn secondary" @click="editNews(item)">编辑</button>
|
|
|
|
|
+ <button class="action-btn danger" @click="removeNews(item)">删除</button>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
|
|
|
|
- <view class="empty-state" v-if="!isLoading && filteredList.length === 0">
|
|
|
|
|
- <view class="news-placeholder">
|
|
|
|
|
- <image class="placeholder-icon" src="/static/icons/remixicon/image-line.svg" />
|
|
|
|
|
- </view>
|
|
|
|
|
- <text class="empty-text">暂无资讯</text>
|
|
|
|
|
- <button class="create-cta" @click="onCreateNews">现在创建</button>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="loadmore" v-if="hasMore">
|
|
|
|
|
- <button class="load-btn" @click="loadMore">加载更多</button>
|
|
|
|
|
|
|
+ <view class="empty-state" v-if="filteredList.length === 0">
|
|
|
|
|
+ <view class="news-placeholder">
|
|
|
|
|
+ <image class="placeholder-icon" src="/static/icons/remixicon/image-line.svg" />
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <text class="empty-text">暂无资讯</text>
|
|
|
|
|
+ <button class="create-cta" @click="onCreateNews">现在创建</button>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="loadmore" v-if="hasMore">
|
|
|
|
|
+ <button class="load-btn" @click="loadMore">加载更多</button>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<!-- 悬浮新建按钮(样式参考 physical.vue) -->
|
|
<!-- 悬浮新建按钮(样式参考 physical.vue) -->
|
|
@@ -326,18 +332,24 @@ onPullDownRefresh(() => {
|
|
|
margin: 18rpx 20rpx;
|
|
margin: 18rpx 20rpx;
|
|
|
border-radius: 12rpx;
|
|
border-radius: 12rpx;
|
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
|
- box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
|
|
|
|
|
|
|
+ box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.15);
|
|
|
transition: transform 0.12s ease, box-shadow 0.12s ease;
|
|
transition: transform 0.12s ease, box-shadow 0.12s ease;
|
|
|
}
|
|
}
|
|
|
.news-card:hover {
|
|
.news-card:hover {
|
|
|
transform: translateY(-4rpx);
|
|
transform: translateY(-4rpx);
|
|
|
- box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.12);
|
|
|
|
|
|
|
+ box-shadow: 0 12rpx 32rpx rgba(0, 0, 0, 0.2);
|
|
|
|
|
+}
|
|
|
|
|
+.news-header {
|
|
|
|
|
+ padding: 20rpx;
|
|
|
|
|
+ background-color: #f8f9fa;
|
|
|
|
|
+ border-bottom: 1rpx solid #e6e6e6;
|
|
|
}
|
|
}
|
|
|
.news-content {
|
|
.news-content {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
padding: 20rpx;
|
|
padding: 20rpx;
|
|
|
gap: 20rpx;
|
|
gap: 20rpx;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
|
|
+ background-color: #fff;
|
|
|
}
|
|
}
|
|
|
.news-image-container {
|
|
.news-image-container {
|
|
|
width: 220rpx;
|
|
width: 220rpx;
|
|
@@ -404,9 +416,10 @@ onPullDownRefresh(() => {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
gap: 12rpx;
|
|
gap: 12rpx;
|
|
|
padding: 12rpx 18rpx;
|
|
padding: 12rpx 18rpx;
|
|
|
- border-top: 1rpx solid #f5f5f5;
|
|
|
|
|
|
|
+ border-top: 1rpx solid #e6e6e6;
|
|
|
justify-content: flex-end;
|
|
justify-content: flex-end;
|
|
|
flex-wrap: wrap;
|
|
flex-wrap: wrap;
|
|
|
|
|
+ background-color: #f8f9fa;
|
|
|
}
|
|
}
|
|
|
.action-btn {
|
|
.action-btn {
|
|
|
padding: 10rpx 22rpx;
|
|
padding: 10rpx 22rpx;
|