
<text>pages/l_rgoods/l_rgoods.wxml</text>
<view class="container">
<scroll-view class='scroll_left' scroll-y="true">
<view class="nav_left">
<block wx:for="{{list}}" wx:for-index="idx" wx:for-item="itemName" wx:key="*this">
<view class="nav_left_items {{curNav == idx ? 'active' : ''}}" bindtap="switchRightTab" data-index="{{index}}" data-id="{{item.id}}" id="{{idx}}">{{itemName[0].name}}</view>
</block>
</view>
</scroll-view>
<scroll-view scroll-y="true" class="scroll_right" style="height:{{winHeight}}px;" scroll-into-view="{{scrollTopId}}" scroll-with-animation="true">
<view class="nav_right">
<view class='mink' wx:for="{{list}}" wx:for-index="idx" wx:for-item="itemName" wx:key="*this" bindscroll="scrollTop">
<view class='minl' id='{{idx}}'>{{itemName[0].name}}</view>
<block wx:for="{{itemName}}" wx:for-index="idex" wx:key="*this" >
<view class="nav_right_items" wx:if="{{idex>0}}">
<navigator url="../detail/detail" hover-class="other-navigator-hover">
<view>
<image src="{{item.picture}}"></image>
<view >
<text>{{item.desc}}</text>
</view>
</view>
</navigator>
</view>
</block>
</view>
<view style="width:100%;height:30rpx;background:#f0f4f7"></view>
</view>
</scroll-view>
</view>
.container {
position: relative;
width: 100%;
height: 1220rpx;
background-color: #f0f4f7;
color: #939393;
}
.nav_left{
display: inline-block;
width: 100%;
height: 100%;
background: #fff;
text-align: center;
left: 0;
top: 0;
border-top: 1rpx solid #dedede;
}
.nav_left .nav_left_items{
background: #fff;
height: 80rpx;
line-height: 80rpx;
padding: 15rpx 0;
border-bottom: 1px solid #dedede;
font-size: 29rpx:
color: #101010;
font-weight: 50rpx:
}
.nav_left .nav_left_items.active{
background: #f0f4f7;
color: #ed1000;
}
.scroll_right{
position: fixed;
top: 0;
right: 0;
overflow: auto;
flex: 1;
width: 75%;
height: 100%;
padding: 20rpx;
box-sizing: border-box;
background-color: #f0f4f7;
border-top: 1rpx solid #dedede;
}
.mink::after{
display:block;content:'';clear:both;
}
.jiul,.jiul image{
width: 100%;
height: 170rpx;
}
.minl{
font-size: 29rpx;
color: #777;
text-align: left;
line-height: 60rpx;
float: left;
background: #f0f4f7;
width: 100%;
}
.mink{
width: 100%;
background: #fff;
height: 100%;
}
.nav_right_items{
float: left;
width: 50%;
text-align: center;
color: #4a4a4a;
background: #fff;
}
.nav_right_items image{
width: 60px;
height: 50px;
margin-top: 15rpx;
}
.nav_right_items text{
display: block;
margin-top: 5rpx;
margin-bottom: 10rpx;
font-size: 26rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.other-navigator-hover{
background:#fff;
}
.scroll_left{
width:25%;
height:100%;
background:#fff;
text-align:center;
position: fixed;
left: 0;top: 0
}
var list = require('../../utils/list.js')
Page({
data: {
curNav: 'A',
},
onReady: function () {
var listChild1 = list.List[0];
var that = this;
wx.getSystemInfo({
success: function (res) {
that.setData({
list: listChild1,
winHeight: res.windowHeight,
})
}
})
},
switchRightTab: function (e) {
var id = e.target.id;
console.log(typeof id)
this.setData({
scrollTopId: id,
curNav:id
})
}
})
var list = {
"List": [
{
'A': [
{ name: '白酒' },
{ 'picture': 'https://gimg2.baidu.com/image_search/src=https%3A%2F%2Fblue-sea-697d.quartiers047.workers.dev%3A443%2Fhttp%2Fi03.c.aliimg.com%2Fimg%2Fibank%2F2014%2F854%2F839%2F1631938458_231081469.310x310.jpg&refer=https%3A%2F%2Fblue-sea-697d.quartiers047.workers.dev%3A443%2Fhttp%2Fi03.c.aliimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1620403023&t=17408f0f586809870a1f8f9139470468', 'desc': '葡萄酒' },
{ 'picture': 'https://gimg2.baidu.com/image_search/src=https%3A%2F%2Fblue-sea-697d.quartiers047.workers.dev%3A443%2Fhttp%2Fi03.c.aliimg.com%2Fimg%2Fibank%2F2014%2F854%2F839%2F1631938458_231081469.310x310.jpg&refer=https%3A%2F%2Fblue-sea-697d.quartiers047.workers.dev%3A443%2Fhttp%2Fi03.c.aliimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1620403023&t=17408f0f586809870a1f8f9139470468', 'desc': '洋酒' },
{ 'picture': 'https://gimg2.baidu.com/image_search/src=https%3A%2F%2Fblue-sea-697d.quartiers047.workers.dev%3A443%2Fhttp%2Fi03.c.aliimg.com%2Fimg%2Fibank%2F2014%2F854%2F839%2F1631938458_231081469.310x310.jpg&refer=https%3A%2F%2Fblue-sea-697d.quartiers047.workers.dev%3A443%2Fhttp%2Fi03.c.aliimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1620403023&t=17408f0f586809870a1f8f9139470468', 'desc': '汾酒' },
{ 'picture': 'https://gimg2.baidu.com/image_search/src=https%3A%2F%2Fblue-sea-697d.quartiers047.workers.dev%3A443%2Fhttp%2Fi03.c.aliimg.com%2Fimg%2Fibank%2F2014%2F854%2F839%2F1631938458_231081469.310x310.jpg&refer=https%3A%2F%2Fblue-sea-697d.quartiers047.workers.dev%3A443%2Fhttp%2Fi03.c.aliimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1620403023&t=17408f0f586809870a1f8f9139470468', 'desc': '汾酒' }
],
'B': [
{ name: '白酒1' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '葡萄酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '洋酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '汾酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '汾酒' }
],
'C': [
{ name: '白酒2' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '葡萄酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '洋酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '汾酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '汾酒' }
],
'D': [
{ name: '白酒3' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '葡萄酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '洋酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '汾酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '汾酒' }
],
'E': [
{ name: '白酒4' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '葡萄酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '洋酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '汾酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '汾酒' }
],
'F': [
{ name: '白酒5' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '葡萄酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '洋酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '汾酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '汾酒' }
],
'G': [
{ name: '白酒6' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '葡萄酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '洋酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '汾酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '汾酒' }
],
'H': [
{ name: '白酒7' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '葡萄酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '洋酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '汾酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '汾酒' }
],
'I': [
{ name: '白酒8' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '葡萄酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '洋酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '汾酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '汾酒' }
],
'J': [
{ name: '白酒9' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '葡萄酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '洋酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '汾酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '汾酒' }
],
'K': [
{ name: '白酒10' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '葡萄酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '洋酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '汾酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '汾酒' }
],
'L': [
{ name: '白酒11' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '葡萄酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '洋酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '汾酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '汾酒' }
],
'M': [
{ name: '白酒12' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '葡萄酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '洋酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '汾酒' },
{ 'picture': 'https://dpic.tiankong.com/1z/70/QJ6333936046.jpg?x-oss-process=style/794ws', 'desc': '汾酒' }
]
}
],
}
module.exports = list;