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

简介: 微信小程序仿微信运动步数排行-交互

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: #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.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 });
      },
    });
  },
})
相关文章
|
4天前
|
小程序 Java API
微信小程序和springboot实现微信支付
微信小程序和springboot实现微信支付
12 0
|
4天前
|
小程序 API
微信小程序-微信支付
微信小程序-微信支付
7 0
|
4天前
|
小程序 开发工具 Android开发
微信小程序开发工具的使用,各个配置文件详解,小程序开发快速入门(二)
微信小程序开发工具的使用,各个配置文件详解,小程序开发快速入门(二)
|
4天前
|
小程序 JavaScript 开发工具
微信小程序开发工具的使用,各个配置文件详解,小程序开发快速入门(一)
微信小程序开发工具的使用,各个配置文件详解,小程序开发快速入门(一)
|
4天前
|
移动开发 小程序 安全
使用阿里云短信+微信短链接跳转微信小程序
此内容是关于使用阿里云短信带传递参数的微信短链接跳转到微信小程序。首先,需要准备微信开发者工具和一个已认证的小程序。接着,开通云开发并配置云开发权限。然后,配置H5静态网页,包括设置云开发权限和处理不同设备的跳转方式。最后,上传云函数并修改其权限,获取微信短信链接,配置短链接参数,并开通阿里云短信服务以进行测试验证。整个过程涉及到了微信开发者工具、云开发、H5页面配置、云函数的创建和部署以及阿里云短信服务的开通和使用等步骤。
52 0
|
4天前
|
小程序 JavaScript Java
基于SpringBoot+Vue+uniapp微信小程序的在线课堂微信小程序的详细设计和实现
基于SpringBoot+Vue+uniapp微信小程序的在线课堂微信小程序的详细设计和实现
35 3
|
4天前
|
小程序 JavaScript Java
基于SpringBoot+Vue+uniapp微信小程序的微信课堂助手小程序的详细设计和实现
基于SpringBoot+Vue+uniapp微信小程序的微信课堂助手小程序的详细设计和实现
60 3
|
4天前
|
小程序 JavaScript Java
基于SpringBoot+Vue+uniapp微信小程序的微信点餐小程序的详细设计和实现
基于SpringBoot+Vue+uniapp微信小程序的微信点餐小程序的详细设计和实现
31 1
|
4天前
|
小程序 JavaScript Java
基于SpringBoot+Vue+uniapp微信小程序的助农扶贫微信小程序的详细设计和实现
基于SpringBoot+Vue+uniapp微信小程序的助农扶贫微信小程序的详细设计和实现
35 2
|
4天前
|
小程序 JavaScript Java
基于SpringBoot+Vue+uniapp微信小程序的微信阅读网站小程序的详细设计和实现
基于SpringBoot+Vue+uniapp微信小程序的微信阅读网站小程序的详细设计和实现
43 2

热门文章

最新文章