欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

小程序?qū)崿F(xiàn)輪播每次顯示三條數(shù)據(jù)

 更新時(shí)間:2022年06月24日 14:29:23   作者:那些年的筆記  
這篇文章主要為大家詳細(xì)介紹了小程序?qū)崿F(xiàn)輪播每次顯示三條數(shù)據(jù),文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下

本文實(shí)例為大家分享了小程序輪播每次顯示三條數(shù)據(jù)的具體代碼,供大家參考,具體內(nèi)容如下

1.頁面布局

<!-- 統(tǒng)計(jì)過程控制s -->
? ? ? ? ? ? ? <view class='Lean_item'>
? ? ? ? ? ? ? ? <view class='Lean_container'>
? ? ? ? ? ? ? ? ? <view class='Lean_item_title'>
? ? ? ? ? ? ? ? ? ? <image class='Lean_item_title_pic' src='{{BaseURL}}/uploadFile/groupImages/greencross1.png'></image>
? ? ? ? ? ? ? ? ? ? <view class='Lean_item_title_name'>統(tǒng)計(jì)過程控制</view>
? ? ? ? ? ? ? ? ? ? <view class='Lean_item_title_more'>更多>></view>
? ? ? ? ? ? ? ? ? </view>
? ? ? ? ? ? ? ? ? <view wx:if='{{listSPCOrganizationAbnormity.length>0}}'>
?
? ? ? ? ? ? ? ? ? ? <swiper class='statistics_list' indicator-dots="{{indicatorDots1}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" vertical="{{vertical}}" circular="{{circular}}">
? ? ? ? ? ? ? ? ? ? ? <block wx:for="{{listSPCOrganizationAbnormity}}" wx:key="unique" wx:for-item="items">
? ? ? ? ? ? ? ? ? ? ? ? <swiper-item>
? ? ? ? ? ? ? ? ? ? ? ? ? <block wx:for="{{items}}" wx:key="unique">
? ? ? ? ? ? ? ? ? ? ? ? ? ? <view class='statistics_item'>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <view class='statistics_item_time'>{{item.operateTime}}</view>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <view class='statistics_item_name'>{{item.name}}</view>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <view class='statistics_item_name'>{{item.value}}{{item.unit}}</view>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <view class='statistics_item_name'>{{item.stateName}}</view>
? ? ? ? ? ? ? ? ? ? ? ? ? ? </view>
? ? ? ? ? ? ? ? ? ? ? ? ? </block>
? ? ? ? ? ? ? ? ? ? ? ? </swiper-item>
? ? ? ? ? ? ? ? ? ? ? </block>
? ? ? ? ? ? ? ? ? ? </swiper>
? ? ? ? ? ? ? ? ? </view>
? ? ? ? ? ? ? ? ? <view wx:else>
? ? ? ? ? ? ? ? <view class='statistics_no_list'>藍(lán)控參數(shù)運(yùn)行正常</view>
? ? ? ? ? ? ? </view>
? ? ? ? </view>
? </view>
<!-- 統(tǒng)計(jì)過程控制e -->

2.樣式

.Lean_item {
? width: 100%;
? height: auto;
? float: left;
? background-color: #fff;
? border-radius: 10rpx;
? margin-top: 20rpx;
? padding: 10rpx 0rpx;
? box-shadow: 0px 0px 5px rgba(226, 226, 226, 0.911);
}
?
.Lean_container {
? width: calc(100% - 40rpx);
? height: auto;
? float: left;
? margin-left: 20rpx;
}
?
.Lean_item_title {
? width: 100%;
? height: 80rpx;
? line-height: 80rpx;
? border-bottom: 1px solid #f2f2f2;
? position: relative;
}
?
.Lean_item_title_pic {
? height: 30rpx;
? width: 30rpx;
? float: left;
? margin-top: 25rpx;
}
?
.Lean_item_title_name {
? color: #2c3444;
? font-size: 15px;
? font-weight: 800;
? float: left;
? margin-left: 10rpx;
}
?
.Lean_item_title_more {
? color: #4f5760;
? font-size: 11px;
? float: right;
}
?
.statistics_list {
? width: 100%;
? display: flex;
? height: 260rpx;
? flex-wrap: wrap;
}
?
.statistics_no_list {
? width: 100%;
? height: 80rpx;
? line-height: 80rpx;
? display: flex;
? flex-wrap: wrap;
}
?
.statistics_item {
? width: 100%;
? height: 80rpx;
? line-height: 80rpx;
? display: flex;
? flex-wrap: wrap;
? justify-content: space-between;
}
?
.statistics_item_time {
? padding: 0rpx 10rpx;
? height: 80rpx;
}

3.js

/**獲取統(tǒng)計(jì)過程控制 */
? getSPCOrganizationAbnormity: function() {
? ? var that = this;
? ? wx.request({
? ? ? header: {
? ? ? ? "Content-Type": "application/x-www-form-urlencoded"
? ? ? },
? ? ? method: 'GET',
? ? ? url: app.globalData.BaseURL + 'group/v1/getSPCOrganizationAbnormity.html',
? ? ? data: {
? ? ? ? organizationID: that.data.defaultOrgID,
? ? ? },
? ? ? success: function(res) {
? ? ? ? console.log("獲取統(tǒng)計(jì)過程控制", res.data)
? ? ? ? var status = res.data.status;
? ? ? ? var info = res.data.info;
? ? ? ? if (status.indexOf("SUCCESS") == 0) {
? ? ? ? ? var big = res.data.info;
? ? ? ? ? var length = big.length;
? ? ? ? ? var num = parseInt(length / 3);
? ? ? ? ? var arr = [];
? ? ? ? ? for (var i = 0; i < num; i++) {
? ? ? ? ? ? var ar = [];
? ? ? ? ? ? for (var j = 0; j < 3; j++) {
? ? ? ? ? ? ? ar.push(big[j])
? ? ? ? ? ? }
? ? ? ? ? ? arr.push(ar)
? ? ? ? ? }
? ? ? ? ? if (length % 3 != 0) {
? ? ? ? ? ? var ar = []
? ? ? ? ? ? for (var k = (num * 3); k < length; k++) {
? ? ? ? ? ? ? ar.push(big[k])
? ? ? ? ? ? }
? ? ? ? ? ? arr.push(ar)
? ? ? ? ? }
? ? ? ? ? that.setData({
? ? ? ? ? ? listSPCOrganizationAbnormity: arr
? ? ? ? ? })
? ? ? ? } else {
? ? ? ? ? wx.showToast({
? ? ? ? ? ? title: res.data.info,
? ? ? ? ? ? icon: 'none'
? ? ? ? ? })
? ? ? ? }
? ? ? }
? ? })
? },

4.效果圖

以上就是本文的全部內(nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

最新評(píng)論