亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

微信小程序仿微信運動步數排行-交互

標簽:
Html/CSS

效果图如下:


spacer.gif

图片.png

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" class="lazyload" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC" data-original="{{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: #e64340;    width: 180rpx;text-align: center;    z-index: 4;    right: 0;    color: #fff}.item-icon{    width: 64rpx;    height: 64rpx;    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.jsPage({  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 });
      },
    });
    
  },
})

原文作者:祈澈姑娘



作者:祈澈菇凉
链接:https://www.jianshu.com/p/bb7131114993



點擊查看更多內容
TA 點贊

若覺得本文不錯,就分享一下吧!

評論

作者其他優質文章

正在加載中
  • 推薦
  • 評論
  • 收藏
  • 共同學習,寫下你的評論
感謝您的支持,我會繼續努力的~
掃碼打賞,你說多少就多少
贊賞金額會直接到老師賬戶
支付方式
打開微信掃一掃,即可進行掃碼打賞哦
今天注冊有機會得

100積分直接送

付費專欄免費學

大額優惠券免費領

立即參與 放棄機會
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號

舉報

0/150
提交
取消