1 <!--pages/show/show.wxml-->
2 <view class="show-info">
3 scroll-view ='left' scroll-y 4 ="jy-item" wx:for="{{jytype}}" wx:key="id" hover-class="jy-item-hover" wx:for-item="item" bindtap='showItem' data-id="{{item.id}}" 5 image src="{{item.url}}"></image 6 label>{{item.name}}</ 7 view 8 scroll-view 9 ='right' scroll-y scroll-into-view="{{viewId}}"10 ="jy-detail"="{{jydetail}}" id= "D-{{detail.typeid}}-{{detail.id}}"="detail"='showDetail'="{{detail.id}}"11 ="{{detail.url}}"12 >{{detail.name}}13 14 15 >
1 showItem: function(event) {
2 var that=this;
3 var viewId = "D-" + event.currentTarget.dataset.id + "-" + event.currentTarget.dataset.id+"00"4 that.setData({
5 viewId: viewId
6 });
7 console.log(viewId);
8 },
1 .show-info {
2 height: 100%;
3 display: flex;
4 flex-direction: row;
5 align-items: flex-start;
6 padding: 10rpx 0;
7 box-sizing: border-box;
8 }
9
10 .left {
11 width: 30%;
12 13 14 column;
15 margin:2px;
16 }
17
18 .jy-item-hover{
19 border: none;
20 }
21
22 .right {
23 70%;
24 1200rpx;
25 26 27 2px;
28 }