|
作者:JoyJin,來(lái)自原文地址
設(shè)置背景顏色就直接在page里設(shè)置 page {background-color: rgb(242, 242, 242);}
tab切換:
navigator 頁(yè)面鏈接

傳參的格式為url="路徑?title={{item.title}}" 多個(gè)用&&連接
下個(gè)頁(yè)面接收參數(shù):

wxml:
-
<view class="container">
-
<view class="swiper-tab">
-
<view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" data-current="0" bindtap="swichNav">進(jìn)行中</view>
-
<view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" bindtap="swichNav">已完成</view>
-
</view>
-
<swiper current="{{currentTab}}" class="swiper-box" duration="800" style="height:{{winHeight - 71}}px" bindchange="bindChange">
-
-
<!-- 樸智妍一 -->
-
<swiper-item>
-
<view class="content" wx:for="{{loadingList}}" wx:key="id" >
-
<navigator bindtap="bindIndexId" data-index-id="{{item.id}}" url="../..?act_name={{item.act_name}}&&pro_name={{item.pro_name}}">
-
<image src="{{item.act_pic}}"></image>
-
<view class="txt1">{{item.act_name}}</view>
-
<view>{{item.pro_name}}</view>
-
</navigator>
-
</view>
-
<view class="hb" bindtap="addProject">
-
<image src="../Image/addT.png" style="width:30rpx;height:30rpx;float:left;margin-top:3rpx;margin-right:16rpx;"></image>
-
<view class="text2">添加項(xiàng)目</view>
-
</view>
-
</swiper-item>
-
</swiper>
-
</view>
wxss:
-
page {
-
background-color: rgb(242, 242, 242); /*設(shè)置背景顏色就直接在page里設(shè)置*/
-
}
-
-
.container {
-
width: 100%;
-
}
-
-
.swiper-tab {
-
width: 84%;
-
text-align: center;
-
line-height: 60rpx;
-
margin-top: 40rpx;
-
margin-bottom: 20rpx;
-
border: 2rpx solid #1c7bf3;
-
border-radius: 6rpx;
-
}
-
-
.swiper-tab-list {
-
font-size: 28rpx;
-
display: inline-block;
-
width: 50%;
-
float: left;
-
color: #1c7bf3;
|