是代码出问题了吗???麻烦大家帮我看看原因,谢谢!
<view class="container">
<view class="selection">
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}">
<block wx:for="{{imgUrls}}" wx:key="quite">
<swiper-item>
<image src="{{item}}" class="slide-image" width="355" height="150" />
</swiper-item>
</block>
</swiper>
</view>
<view class="selection">
<view class="header">
<text>精品推荐</text>
<text class="text_all">全部精品</text>
</view>
<view class="content">
<view class="content_item" wx:for="{{contentItem}}" wx:key="quite">
<image src='{{img}}'></image>
<view class="content_item_text">这里是标题</view>
</view>
</view>
</view>
<view class="selection">
<view class="header">
<text>热门评测</text>
<text class="text_all">全部评测</text>
</view>
<view class="list_item" wx:for="{{imageitem}}">
<view class="list_item_image" >
<image src='../../../image/2.jpg'></image>
</view>
<view class="list_item_text">
fdgdhgdhdh
</view>
</view>
</view>
</view>
swiper{
width: 100%;
height: 340rpx;
}
swiper image{
display: block;
width: 100%;
height: 100%;
}
.header{
border-left-width: 2px;
border-left-style: solid;
border-left-color: green;
display: flex;
justify-content: space-between;
align-items: center;
}
.text_all{
color: green;
font-size: 12px;
}
.content{
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.content_item{
width: 350rpx;
height: 200rpx;
background-color: blanchedalmond;
margin: 5px;
position: relative;
}
.content_item image{
width: 100%;
height: 100%;
}
.content_item_text{
position: absolute;
bottom: 0px;
color: white;
font-size: 15px;
background: -webkit-linear-gradient(bottom,rgba(0, 0, 0, 0.8),rgba(0, 0, 0, 0));
height: 80rpx;
width: 98%;
display: flex;
flex-direction: column;
justify-content: flex-end;
padding: (1%,1%,1%);
}
.list_item{
display: flex;
height: 500rpx;
width: 100%;
}
.list_item_image{
height: 100%;
width: 100%;
}
.list_item_text{
height: 200rpx;
width: 100%;
background: brown;
}
Page({
/**
* 页面的初始数据
*/
data: {
imgUrls: [
'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg',
'http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg',
'http://img06.tooopen.com/images/20160818/tooopen_sy_175833047715.jpg',
'http://img06.tooopen.com/images/20160818/tooopen_sy_175833047715.jpg'
],
indicatorDots: true,
autoplay: true,
interval: 5000,
duration: 1000,
img:[
'../../../image/lunbo.jpg'
],
contentItem:['','','',''],
imageitem: ['', '', '', '','', '', '', ''
]
},
})
这是用模拟器看的效果,只显示图片,没文字,但是我定义了文字的。
完全听不懂你在说什么,要帮你看什么