fuint-uniapp-master/pages/article/index.vue
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<template>
<mescroll-body ref="mescrollRef" :sticky="true" @init="mescrollInit" :down="{ use: false }" :up="upOption"
@up="upCallback">
<!-- 分类列表tab -->
<view class="tabs-wrapper">
<scroll-view class="scroll-view" scroll-x>
<view class="tab-item" :class="{ active: curId == 0 }" @click="onSwitchTab(0)">
<view class="value"><text>全部</text></view>
</view>
<!-- 分类列表 -->
<view class="tab-item" :class="{ active: curId == item.category_id }" @click="onSwitchTab(item.category_id)"
v-for="(item, index) in categoryList" :key="index">
<view class="value"><text>{{ item.name }}</text></view>
</view>
</scroll-view>
</view>
<!-- 文章列表 -->
<view class="article-list">
<view class="article-item" :class="[`show-type__${item.show_type}`]" v-for="(item, index) in articleList.data"
:key="index" @click="onTargetDetail(item.article_id)">
<!-- 小图模式 -->
<block v-if="item.show_type == 10">
<view class="article-item__left flex-box">
<view class="article-item__title twolist-hidden">
<text>{{ item.title }}</text>
</view>
<view class="article-item__footer m-top10">
<text class="article-views f-24 col-8">{{ item.show_views }}次浏览</text>
</view>
</view>
<view class="article-item__image">
<image class="image" mode="widthFix" :src="item.image_url"></image>
</view>
</block>
<!-- 大图模式 -->
<block v-if="item.show_type == 20">
<view class="article-item__title twolist-hidden">
<text>{{ item.title }}</text>
</view>
<view class="article-item__image m-top20">
<image class="image" mode="widthFix" :src="item.image_url"></image>
</view>
<view class="article-item__footer m-top10">
<text class="article-views f-24 col-8">{{ item.show_views }}次浏览</text>
</view>
</block>
</view>
</view>
</mescroll-body>
</template>
<script>
import MescrollBody from '@/components/mescroll-uni/mescroll-body.vue'
import MescrollMixin from '@/components/mescroll-uni/mescroll-mixins'
import * as ArticleApi from '@/api/article'
import * as CategoryApi from '@/api/article/category'
import { getEmptyPaginateObj, getMoreListData } from '@/utils/app'
后面还有 222 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。