最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

微信小程序仿微信运动步数排行(交互)

来源:动视网 责编:小采 时间:2020-11-27 22:11:38
文档

微信小程序仿微信运动步数排行(交互)

微信小程序仿微信运动步数排行(交互):本文介绍了微信小程序仿微信运动步数排行(交互),分享给大家,也给自己留个笔记,废话不多说了,具体如下: 效果图如下: wxml: <view class=item-box> <view class=items> <view wx:for={{list}}
推荐度:
导读微信小程序仿微信运动步数排行(交互):本文介绍了微信小程序仿微信运动步数排行(交互),分享给大家,也给自己留个笔记,废话不多说了,具体如下: 效果图如下: wxml: <view class=item-box> <view class=items> <view wx:for={{list}}


本文介绍了微信小程序仿微信运动步数排行(交互),分享给大家,也给自己留个笔记,废话不多说了,具体如下:

效果图如下:


wxml:

<view class="item-box">
 <view class="items">
 <view wx:for="{{list}}" wx:key="{{index}}" class="item"> 
 <view bindtouchstart="touchS" bindtouchmove="touchM" bindtouchend="touchE" data-index="{{index}}" style="{{item.txtStyle}}" class="inner txt">
 <image class="item-icon" mode="widthFix" src="{{item.url}}"></image>
 <i> {{item.name}}</i>
 <span class="item-data">
 <i class="rankpace"> {{item.steps}}</i>
 </span>
 
 </view>
 </view>
 </view>
</view>

wxss:

/* pages/leftSwiperDel/index.wxss */
view{
 box-sizing: border-box;
}
.item-box{
 width: 700rpx;
 margin: 0 auto;
 padding:40rpx 0;
}
.items{
 width: 100%;
}
.item{
 position: relative;
 border-top: 2rpx solid #eee;
 height: 120rpx;
 line-height: 120rpx;
 overflow: hidden;
 
}


.item:last-child{
 border-bottom: 2rpx solid #eee;
}
.inner{
 position: absolute;
 top:0;
}
.inner.txt{
 background-color: #fff;
 width: 100%;
 z-index: 5;
 padding:0 10rpx;
 transition: left 0.2s ease-in-out;
 white-space:nowrap;
 overflow:hidden;
 text-overflow:ellipsis;
}
.inner.del{
 background-color: #e340;
 width: 180rpx;text-align: center;
 z-index: 4;
 right: 0;
 color: #fff
}
.item-icon{
 width: rpx;
 height: rpx;
 vertical-align: middle;
 margin-right: 16rpx;
 margin-left:13px;
 border-radius:50%;

}

.item-data{
 float: right;
 margin-right:5%;}

.rankpace{
 color: #fa7e04;
}

js:

// pages/leftSwiperDel/index.js
Page({
 data: {
 list: null,
 },
 onLoad: function (options) {
 var that = this;

 //加载数据
 wx.request({
 url: "https://pig.intmote.com/bison_xc/wx/sort.do",
 method: 'GET',
 header: {
 'Content-type': 'application/json'
 },
 success: function (res) {
 console.log(res.data)
 that.setData({ list: res.data });
 },
 });
 
 },
})

文档

微信小程序仿微信运动步数排行(交互)

微信小程序仿微信运动步数排行(交互):本文介绍了微信小程序仿微信运动步数排行(交互),分享给大家,也给自己留个笔记,废话不多说了,具体如下: 效果图如下: wxml: <view class=item-box> <view class=items> <view wx:for={{list}}
推荐度:
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top