怎么在微信小程序中实现一个滑动翻页效果
这篇文章将为大家详细讲解有关怎么在微信小程序中实现一个滑动翻页效果,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。

创新互联服务项目包括长兴网站建设、长兴网站制作、长兴网页制作以及长兴网络营销策划等。多年来,我们专注于互联网行业,利用自身积累的技术优势、行业经验、深度合作伙伴关系等,向广大中小型企业、政府机构等提供互联网行业的解决方案,长兴网站推广取得了明显的社会效益与经济效益。目前,我们服务的客户以成都为中心已经辐射到长兴省份的部分城市,未来相信会继续扩大服务区域并继续获得客户的支持与信任!
来源:{{item.copyfrom}} {{item.title}} {{item.inputtime}} {{item.description}} 加载中...
js
var Api = require("../../utils/api.js")
var ARR_NEWS_DATA=[]
Page({
data: {
hidden: false,
xinwen_list: [],
indicatorDots: false,
autoplay: false,
interval: 2000,
indicatordots: true,
duration: 1000
},
onLoad: function () {
var that = this;
var videoUrl = Api.Url + "&isvideo=1"
Api.fetchGet(videoUrl, (err, res) => {
for (var i = 0; i < 14; i++) {
res.data[i].inputtime = Api.js_date_time(res.data[i].inputtime)
ARR_NEWS_DATA.push(res.data[i])
}
that.setData({
hidden: true,
xinwen_list: ARR_NEWS_DATA,
})
})
},
onPostTap: function (event) {
var postId = event.currentTarget.dataset.id;
wx.navigateTo({
url: "../video/video-listdetails?id=" + postId
})
},
onShareAppMessage: function () {
return {
title: '柳州1号+ 视听页面',
path: 'pages/video/video'
}
}
})css
.mainFrame {
margin-top: 0rpx;
height: 100%;
display: flex;
flex-direction: column;
border: 0px solid #ebebeb;
}
.container {
height: 1135rpx;
padding-top: 0px;
background: #b3d4db
}
.icon_right{
height: 30px;
width: 30px;
padding-right: 60rpx;
}
.icon_left{
height: 30px;
width: 30px;
padding-left: 60rpx;
}
.vol-swiper-item {
box-sizing: border-box;
padding-left: 30rpx;
padding-right: 30rpx;
}
.title {
display: block;
width: 100%;
height: 50px;
color: #f00;
}
.time {
font-size: 22rpx;
text-align: right;
color: #ccc;
}
.vol-card {
/*parent layout and this inner padding*/
padding: 20rpx;
height: 965rpx;
border: 2px solid #ebebeb;
border-radius: 5px;
box-shadow: 5px 5px 5px #c0c0c0;
background: #fff;
margin-top: 0px;
}
.vol-swiper {
height: 100%;
}
.vol-picture {
width: 100%;
}
.vol-meta-title {
margin-top: 5px;
text-align: center;
padding: 10rpx 5rpx;
font-size: 17px;
color: #000;
font-family: 'KaiTi';
}
.vol-meta-time {
padding: 10rpx 5rpx;
font-size: 12px;
padding-right: 5px;
color: #888;
}
.vol-content {
margin-top: 15rpx;
padding: 0 5rpx;
font-size: 14px;
line-height: 1.4;
font-family: 'KaiTi';
color: #9c9c9c;
}
.vol-content-text {
margin-top: 5px;
width: 100%;
min-height: 200rpx;
display: inline-block;
text-indent: 2em;
}
.vol-makettime {
font-size: 13px;
color: #888;
text-align: right;
}关于怎么在微信小程序中实现一个滑动翻页效果就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。
本文题目:怎么在微信小程序中实现一个滑动翻页效果
本文地址:http://www.lzwzjz.cn/article/pphshp.html


咨询
建站咨询
