本文介紹了微信小程序仿微信運動步數排行(交互),分享給大家,也給自己留個筆記,廢話不多說了,具體如下:
阜康網站制作公司哪家好,找成都創新互聯!從網頁設計、網站建設、微信開發、APP開發、成都響應式網站建設等網站項目制作,到程序開發,運營維護。成都創新互聯于2013年創立到現在10年的時間,我們擁有了豐富的建站經驗和運維經驗,來保證我們的工作的順利進行。專注于網站建設就選成都創新互聯。
效果圖如下:
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}}" 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 }); }, }); }, })
以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持創新互聯。
分享文章:微信小程序仿微信運動步數排行(交互)
網站網址:http://www.2m8n56k.cn/article33/gpoess.html
成都網站建設公司_創新互聯,為您提供網站營銷、動態網站、網頁設計公司、網站制作、微信小程序、標簽優化
聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:[email protected]。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯