pages/forum-index/forum-index.vue

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<template>
	<mescroll-uni @init="mescrollInit" :up="upOption" :down="downOption" @down="downCallback" @up="upCallback">

		<view class="uni-padding-wrap">
			<!--header end-->
			<view class="list">
				<view class="flex flex-between flex-align-center pl15 pb30">
					<text class="f28 col3">家教论坛专区</text>
					<!-- <text class="f24 col9">查看全部</text> -->
				</view>
				<view @tap="onDetailTap(item.id)" v-for="(item,index) in list " v-bind:key="index" class="listm flex flex-between">
					<image src="/static/exam-index/paper.png" mode="widthFix" class="listmpic mt10"></image>
					<view class="listmr">
						<view class="col3 f30 elip mb15">{{item.title}}</view>
						<view class="colb f24 lh35">{{item.content.length>50?item.content.substring(0,50)+'... ...':item.content}}</view>
						<!-- <view class="colb f24 lh35">发布时间{{item.addtime}}</view> -->
						<view class="flex flex-align-center mt20">
							<text class="colb f25">
								发布人:{{item.username}} 
							</text>
						</view>
						<view class="flex flex-align-center mt20 colb f25">
							发布时间:{{item.addtime}}
						</view>
					</view>
				</view>
			</view>
			<!--list end-->
		</view>
	</mescroll-uni>
</template>

<script>
	import '@/assets/css/global-restaurant.css'
	import uniIcons from "@/components/uni-ui/lib/uni-icons/uni-icons.vue"
	import uniNoticeBar from "@/components/uni-ui/lib/uni-notice-bar/uni-notice-bar.vue"
	export default {
		components: {
			uniIcons,
			uniNoticeBar
		},
		data() {
			return {
				//轮播
				swiperList: [],
				list: [],
				mescroll: null, //mescroll实例对象
				downOption: {
					auto: false //是否在初始化后,自动执行下拉回调callback; 默认true
				},
				upOption: {
					page: {
						// num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
						// size: 5 // 每页数据的数量
					},
					noMoreSize: 3, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
					textNoMore: '~ 没有更多了 ~',
				},
				hasNext: true
			}
后面还有 170 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。