- 帮忙看看,为什么实现不了多张图片
//.js Page({ /** * 页面的初始数据 */ data: { currentTab: 0, imgalist0: [ 'https://lg-1c7jwm16-1257218715.cos.ap-shanghai.myqcloud.com/309586315285779976.jpg', 'https://lg-1c7jwm16-1257218715.cos.ap-shanghai.myqcloud.com/e6b5f06c7655fd7fa9699987c4578641_u%3D1837457002%2C1490875854%26fm%3D27%26gp%3D0.jpg' ], imgalist1: ['https://lg-1c7jwm16-1257218715.cos.ap-shanghai.myqcloud.com/e6b5f06c7655fd7fa9699987c4578641_u%3D1837457002%2C1490875854%26fm%3D27%26gp%3D0.jpg', 'https://lg-1c7jwm16-1257218715.cos.ap-shanghai.myqcloud.com/309586315285779976.jpg' ], imgalist2: ['https://lg-1c7jwm16-1257218715.cos.ap-shanghai.myqcloud.com/309586315285779976.jpg', 'https://lg-1c7jwm16-1257218715.cos.ap-shanghai.myqcloud.com/309586315285779976.jpg' ] }, /** * 预览图片 */ previewImage: function (e) { var current = e.target.dataset.src; wx.previewImage({ current: current, // 当前显示图片的http链接 urls: this.data.imgalist0, urls: this.data.imgalist1, urls: this.data.imgalist2,// 需要预览的图片http链接列表 }) } }) <!--pages/index/index/tb/tb.wxml--> <view class="swiper-tab"> <view class="swiper-tab-item {{currentTab==0?'active':''}}" data-current="0" bindtap="clickTab">第一个</view> <view class="swiper-tab-item {{currentTab==1?'active':''}}" data-current="1" bindtap="clickTab">第二个</view> <view class="swiper-tab-item {{currentTab==2?'active':''}}" data-current="2" bindtap="clickTab">第三个</view> </view> <view> <swiper current="{{currentTab}}" duration="300" bindchange="swiperTab"> <swiper-item> <view wx:for="{{imgalist0}}" wx:key="key" wx:for-item="image" class="previewimg"> <image src="{{image}}" data-src="{{image}}" bindtap="previewImage"></image> </view> </swiper-item> <swiper-item> <view wx:for="{{imgalist1}}" wx:key="key" wx:for-item="image" class="previewimg"> <image src="{{image}}" data-src="{{image}}" bindtap="previewImage"></image> </view> </swiper-item> <swiper-item> <view wx:for="{{imgalist2}}" wx:key="key" wx:for-item="image" class="previewimg"> <image src="{{image}}" data-src="{{image}}" bindtap="previewImage"></image> </view> </swiper-item> </swiper> </view> 商品可以实现分类啦,在每个分类下放两张图片以上,却只能显示一张图片的内容,这是为什么,编辑器也没有显示代码有出现错误,但是就是显示不了,我想要的效果,求大家帮忙看看,这是为什么?
2018-08-21 - 怎么实现这张图片的功能
[图片] 上面是商品的分类表,下面是商品,点击上面的列表名称转到该类别的商品?求大神帮忙
2018-08-21