wx:if

<!--pages/index39/index39.wxml-->
<page>
<view class='box'>

<block wx:for="{{box}}" wx:for-index="box_map">
<view class='nr'>

<view class='left'>
<image src='{{item.src}}'></image>
</view>

<view class='xianmian' wx:if="{{box_map == 0}}">
<text>限免</text>
</view>

<view class='right'>
<text class='text1'>{{item.text1}}</text>
<text class='text2'>{{item.text2}}</text>
</view>

</view>
</block>
</view>

</page>
/* pages/index39/index39.wxss */

page {
width: 750rpx;
background: #fff;
}

page .box .nr {
width: 750rpx;
height: 170rpx;
justify-content: space-between;
display: flex;
flex-direction: row;
}

page .box .nr .left {
width: 90rpx;
height: 90rpx;
background: rgba(66, 198, 171, 1);
border-radius: 8rpx;
margin: 40rpx 30rpx;
}

page .box .nr .left image {
width: 50rpx;
height: 50rpx;
display: block;
margin: 20rpx auto;
}

page .box .nr .right {
width: 580rpx;
border-bottom: 1px solid #ddd;
margin-top: 40rpx;
}

page .box .nr:last-child {
padding-bottom: 100rpx;
}

page .box .nr .right .text1 {
display: block;
height: 30rpx;
font-size: 30rpx;
font-family: MicrosoftYaHei;
font-weight: 400;
color: rgba(51, 51, 51, 1);
line-height: 30rpx;
}

page .box .nr .right .text2 {
display: block;
height: 25rpx;
font-size: 24rpx;
font-family: MicrosoftYaHei;
font-weight: 400;
color: rgba(153, 153, 153, 1);
line-height: 25rpx;
margin-top: 30rpx;
}

page .box .nr {
position: relative;
}

page .box .nr .xianmian {
position: absolute;
top: 30rpx;
right: 30rpx;
width: 120rpx;
height: 50rpx;
border: 1rpx solid rgba(27, 188, 155, 1);
border-radius: 8rpx;
font-size: 24rpx;
font-family: MicrosoftYaHei;
font-weight: 400;
color: rgba(27, 188, 155, 1);
line-height: 50rpx;
text-align: center;
}

转载于:https://www.cnblogs.com/ylblogs/p/9570534.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值