<template>
<view>
<view class='list' :style="'height:' + height + 'px'">
<scroll-view scroll-y :scroll-top='scrollTop' scroll-with-animation class='first'>
<view v-for="(v, i) in first" :key="i" :class="[selected == i ? 'crimson' : '','first-item']" @click="switchSwiper(i)">
{{v.cname}}
</view>
</scroll-view>
<view class='gray'>
<swiper @change="swiperchange" :current="swiperIndex" vertical="true" class='swiper'>
<swiper-item class='swiper-item' v-for="(item, index) in second" :key="index">
<scroll-view scroll-y class='second'>
<view v-for="(item1, index1) in item" :key="index1" class="second-item">
<view class='second-item1'>
<image class='second-image' :src="item1.cimage"></image>
<text class='second-text'>{{item1.cname}}</text>
</view>
</view>
</scroll-view>
</swiper-item>
</swiper>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
first: [{
"id": 2,
"parentId": 0,
"cname": "推荐专区",
"ccode": "0101",
"cimage": "",
"status": 1,
"sort": 10,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 55,
"parentId": 0,
"cname": "数码家电",
"ccode": "0101",
"cimage": "",
"status": 1,
"sort": 9,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 50,
"parentId": 0,
"cname": "家居百货",
"ccode": "0101",
"cimage": "",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 51,
"parentId": 0,
"cname": "男装",
"ccode": "0101",
"cimage": "",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 52,
"parentId": 0,
"cname": "女装",
"ccode": "0101",
"cimage": "",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}], //一级分类
second: [
[{
"id": 187,
"parentId": 2,
"cname": "箱包皮具",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc0r57gt1uknrvtlk21rc71lvi9女包图标.png",
"status": 1,
"sort": 0,
"createTime": "2019-05-23T12:53:39.000+0000"
}, {
"id": 186,
"parentId": 2,
"cname": "潮流鞋馆",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dbrla63c1qkf454jm41jog17nk9潮流鞋馆.png",
"status": 1,
"sort": 0,
"createTime": "2019-05-23T12:16:43.000+0000"
}, {
"id": 185,
"parentId": 2,
"cname": "化妆品",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc0qu11q1qgi1u9n13v5lf91cjd9化妆品.png",
"status": 1,
"sort": 0,
"createTime": "2019-05-23T12:16:26.000+0000"
}, {
"id": 184,
"parentId": 2,
"cname": "夏季饰品",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dbrl7jo91fap1ft1f9q1dnfjc9夏季饰品.png",
"status": 1,
"sort": 0,
"createTime": "2019-05-23T12:16:07.000+0000"
}, {
"id": 183,
"parentId": 2,
"cname": "匠心好物",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/204.png",
"status": 1,
"sort": 0,
"createTime": "2019-05-23T12:15:46.000+0000"
}, {
"id": 182,
"parentId": 2,
"cname": "家居家纺",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/203.png",
"status": 1,
"sort": 0,
"createTime": "2019-05-23T12:15:30.000+0000"
}, {
"id": 180,
"parentId": 2,
"cname": "王者风范",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/201.png",
"status": 1,
"sort": 0,
"createTime": "2019-05-23T12:14:34.000+0000"
}],
[{
"id": 188,
"parentId": 55,
"cname": "家用电器",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/5510-1.png",
"status": 1,
"sort": 10,
"createTime": "2019-06-13T13:37:08.000+0000"
}, {
"id": 189,
"parentId": 55,
"cname": "电子智能",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/5511.png",
"status": 1,
"sort": 9,
"createTime": "2019-06-17T06:40:06.000+0000"
}, {
"id": 147,
"parentId": 55,
"cname": "电动牙刷",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc40uscc1oh8b1kf331uqq1a6d9电动牙刷.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 149,
"parentId": 55,
"cname": "剃须刀",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc411om11rar1dk31q7412ite89剃须刀.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 150,
"parentId": 55,
"cname": "喷雾蒸脸仪",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc414a7t1bel101510k0ab11goj9蒸脸器.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 151,
"parentId": 55,
"cname": "毛孔清洁器",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc4109sc1qbs11cfmgg12ti161h9毛孔清洁器.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 152,
"parentId": 55,
"cname": "数据线",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc41126d1ikc1f251upq11eit799数据线.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 153,
"parentId": 55,
"cname": "蓝牙耳机",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc40vi3n1n9gbbo9fitlc14i19蓝牙耳机.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 155,
"parentId": 55,
"cname": "移动电源",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc412h6q1vbh1cve9pr1v5cmuo9移动电源.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 318,
"parentId": 55,
"cname": "智能机器人",
"ccode": null,
"cimage": "http://image.fenxianggou.shop/profile/o_1def1ikbq2g2r661ps6vdri779VQP6MQ.png",
"status": 1,
"sort": 0,
"createTime": "2019-06-28T02:28:28.000+0000"
}, {
"id": 317,
"parentId": 55,
"cname": "音响",
"ccode": null,
"cimage": "http://image.fenxianggou.shop/profile/o_1def1hjbo1hgf2ueada191g16e29K1YBZY.png",
"status": 1,
"sort": 0,
"createTime": "2019-06-28T02:28:09.000+0000"
}, {
"id": 316,
"parentId": 55,
"cname": "无人机",
"ccode": null,
"cimage": "http://image.fenxianggou.shop/profile/o_1def1gvprmdv5gaikf164jotn92PVXAT.png",
"status": 1,
"sort": 0,
"createTime": "2019-06-28T02:27:48.000+0000"
}, {
"id": 315,
"parentId": 55,
"cname": "望远镜",
"ccode": null,
"cimage": "http://image.fenxianggou.shop/profile/o_1def1fslm1hse83b8l17171c1v9MYSMH1.png",
"status": 1,
"sort": 0,
"createTime": "2019-06-28T02:27:29.000+0000"
}, {
"id": 314,
"parentId": 55,
"cname": "收音机",
"ccode": null,
"cimage": "http://image.fenxianggou.shop/profile/o_1def1f5ph1is9qee10ksf59f0n9R4UDZW.png",
"status": 1,
"sort": 0,
"createTime": "2019-06-28T02:27:08.000+0000"
}, {
"id": 313,
"parentId": 55,
"cname": "摄像机",
"ccode": null,
"cimage": "http://image.fenxianggou.shop/profile/o_1def1ed4fn1sttsm1qtsh5e89614KER.png",
"status": 1,
"sort": 0,
"createTime": "2019-06-28T02:26:50.000+0000"
}, {
"id": 312,
"parentId": 55,
"cname": "平衡车",
"ccode": null,
"cimage": "http://image.fenxianggou.shop/profile/o_1def1dnhdgf3c7fkercoo1tm9C7XTUH.png",
"status": 1,
"sort": 0,
"createTime": "2019-06-28T02:26:32.000+0000"
}, {
"id": 311,
"parentId": 55,
"cname": "拍立得",
"ccode": null,
"cimage": "http://image.fenxianggou.shop/profile/o_1def1cphn1vmc1vrj129s17cc8ci9S5YQQ8.png",
"status": 1,
"sort": 0,
"createTime": "2019-06-28T02:26:10.000+0000"
}, {
"id": 310,
"parentId": 55,
"cname": "麦克风",
"ccode": null,
"cimage": "http://image.fenxianggou.shop/profile/o_1def1btna18g862l1ga41edlp5m9TZJCJ5.png",
"status": 1,
"sort": 0,
"createTime": "2019-06-28T02:25:46.000+0000"
}, {
"id": 309,
"parentId": 55,
"cname": "录音笔",
"ccode": null,
"cimage": "http://image.fenxianggou.shop/profile/o_1def1b40013vj1a5b1bjf13mg1d189R4HX64.png",
"status": 1,
"sort": 0,
"createTime": "2019-06-28T02:25:24.000+0000"
}, {
"id": 308,
"parentId": 55,
"cname": "单反",
"ccode": null,
"cimage": "http://image.fenxianggou.shop/profile/o_1def1a9tc16vm7hiu4o1v5617rc994TAGS.png",
"status": 1,
"sort": 0,
"createTime": "2019-06-28T02:25:03.000+0000"
}, {
"id": 307,
"parentId": 55,
"cname": "VR眼镜",
"ccode": null,
"cimage": "http://image.fenxianggou.shop/profile/o_1def19m6d11et1gtdrkqvkg7sm95KMZLN.png",
"status": 1,
"sort": 0,
"createTime": "2019-06-28T02:24:33.000+0000"
}],
[{
"id": 57,
"parentId": 50,
"cname": "收纳凳",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc3uk8bdi2t3g2dj11pil2va9收纳凳.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 59,
"parentId": 50,
"cname": "纸巾盒",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc3v0noi18lc138ulb1ntra419纸巾盒.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 60,
"parentId": 50,
"cname": "收纳篮",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc3ulmcm1a1c1mj0ptonmpe0c9收纳篮.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 61,
"parentId": 50,
"cname": "医药箱",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc3urf01t691gbm1hfeuft1vcf9医药箱.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 62,
"parentId": 50,
"cname": "收纳箱",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc3um9hm1td1m0618qk9k82v9收纳箱.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 63,
"parentId": 50,
"cname": "粘钩挂钩",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc3utab219asnig5bp1f5a10j19粘贴挂钩.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 64,
"parentId": 50,
"cname": "保温壶",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc3uaef91b731h3v13gep341sdt9保温壶.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 65,
"parentId": 50,
"cname": "冷水壶",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc3uhp0eta32a1kdl1gnvshr9冷水壶.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 66,
"parentId": 50,
"cname": "保温杯",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc3u9gp8q8g2d819vh19hp1g9s9保温杯.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 67,
"parentId": 50,
"cname": "餐具套装",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc3ucumi14hbin47731id412id9餐具套装.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 68,
"parentId": 50,
"cname": "筷子",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc3uh1glrh254l1lpd1mup1a5p9筷子.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 71,
"parentId": 50,
"cname": "碗碟盘",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc3uoo52irf1lfn8ts1e035aa9碗碟盘.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 72,
"parentId": 50,
"cname": "冰包冰袋野餐柜",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc3uc3f31asklpc8hd7tj16t09冰包冰袋野餐柜.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 74,
"parentId": 50,
"cname": "伞",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc3ujg7l1ujlerb1s441pbcrhg9伞.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 75,
"parentId": 50,
"cname": "雨衣",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc3usdgd1svr1a003gs181g113j9雨衣.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 77,
"parentId": 50,
"cname": "体重计",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc3uo277ion5eo1tij13a4jqk9体重秤.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 78,
"parentId": 50,
"cname": "刀具套装",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc3uedtffd61bhfbhqipmqgj9刀具套装.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 79,
"parentId": 50,
"cname": "压力锅",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc3upm1btjlakatesbt418i39压力锅.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 80,
"parentId": 50,
"cname": "蒸锅",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc3uu4ac1ree1j3rv1e1enq1g6b9蒸锅.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 81,
"parentId": 50,
"cname": "平底锅",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc3uijc3k5k1mg0kmi150biic9平底锅.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}],
[{
"id": 83,
"parentId": 51,
"cname": "POLO衫",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc40bct5189n1d4ov64hph8249POLO衫.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 85,
"parentId": 51,
"cname": "背心",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc40duvs1rklar710k6q2o1t9d9背心.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 86,
"parentId": 51,
"cname": "男装T恤",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc40qgdele31nc5nf81ct31tu9T恤.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 87,
"parentId": 51,
"cname": "七分裤",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc45at0jf7p1bn5r2p1q14i4c9七分裤.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 88,
"parentId": 51,
"cname": "沙滩短裤",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc40gvm3krlobc1q4d18tefn19沙滩短裤.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 89,
"parentId": 51,
"cname": "工装裤",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc40hn8h87p1epa1oio1dia1fat9工装裤.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 90,
"parentId": 51,
"cname": "休闲裤",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc40mup31flaockgr1vrhccg9休闲裤.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 91,
"parentId": 51,
"cname": "运动裤",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc40nsrqvu91n716vvq83809运动裤.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 92,
"parentId": 51,
"cname": "短裤",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc40gcci1rtq1li07u1p4d1p049短裤.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 93,
"parentId": 51,
"cname": "牛仔裤",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc40jnhu18to1h3g1vnb8fbegr9牛仔裤.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 94,
"parentId": 51,
"cname": "卫衣",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc40m2up1kcbtjb67l7vk1pt49卫衣.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 95,
"parentId": 51,
"cname": "夹克",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc40id4etk2mfcpac1qp51md09夹克.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}],
[{
"id": 96,
"parentId": 52,
"cname": "半身裙",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc40rcgd1ai11ddul18ouc1ll49半身裙.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 97,
"parentId": 52,
"cname": "背带裙",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc40s3he1apta0e18c51u3v1j609背带裙.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 98,
"parentId": 52,
"cname": "A字裙",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc40p2sg1vm81eslt7cj421irl9A字群.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 99,
"parentId": 52,
"cname": "女装T恤",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc40ccda1dk6qc6r485o13lv9T恤.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 101,
"parentId": 52,
"cname": "女士衬衫",
"ccode": "0101",
"cimage": "http://image.fenxianggou.shop/profile/o_1dc40sq0s1ro4vse1s75s92h2k9衬衫.png",
"status": 1,
"sort": 1,
"createTime": "2019-04-17T22:43:46.000+0000"
}, {
"id": 294,
"parentId": 52,
"cname": "运动裤",
"ccode": null,
"cimage": "http://image.fenxianggou.shop/profile/o_1def0sm9b5gpsjhn8a1opv1naj9ZNE84Q.png",
"status": 1,
"sort": 0,
"createTime": "2019-06-28T02:16:06.000+0000"
}, {
"id": 293,
"parentId": 52,
"cname": "旗袍",
"ccode": null,
"cimage": "http://image.fenxianggou.shop/profile/o_1def0s1vif5n1b8416jb1jcsast981QLKS.png",
"status": 1,
"sort": 0,
"createTime": "2019-06-28T02:15:48.000+0000"
}, {
"id": 292,
"parentId": 52,
"cname": "七分裤",
"ccode": null,
"cimage": "http://image.fenxianggou.shop/profile/o_1def0rhhdvrn17g715d21tfkj4l9K3ZALI.png",
"status": 1,
"sort": 0,
"createTime": "2019-06-28T02:15:30.000+0000"
}, {
"id": 291,
"parentId": 52,
"cname": "女士休闲裤",
"ccode": null,
"cimage": "http://image.fenxianggou.shop/profile/o_1def0r0o312h1bfkhhf190m6vi92J5QRF.png",
"status": 1,
"sort": 0,
"createTime": "2019-06-28T02:15:12.000+0000"
}, {
"id": 290,
"parentId": 52,
"cname": "女士白衬衣",
"ccode": null,
"cimage": "http://image.fenxianggou.shop/profile/o_1def0qbnb12imjao1gk31npe1j6q9P11WLJ.png",
"status": 1,
"sort": 0,
"createTime": "2019-06-28T02:14:52.000+0000"
}, {
"id": 289,
"parentId": 52,
"cname": "牛仔裤",
"ccode": null,
"cimage": "http://image.fenxianggou.shop/profile/o_1def0pc9011pv131j129o1nkfkpm9MT53XD.png",
"status": 1,
"sort": 0,
"createTime": "2019-06-28T02:14:34.000+0000"
}, {
"id": 288,
"parentId": 52,
"cname": "礼服",
"ccode": null,
"cimage": "http://image.fenxianggou.shop/profile/o_1def0omgl6a91g7q1c57qoo3vb9S2N4UK.png",
"status": 1,
"sort": 0,
"createTime": "2019-06-28T02:14:18.000+0000"
}, {
"id": 287,
"parentId": 52,
"cname": "阔腿裤",
"ccode": null,
"cimage": "http://image.fenxianggou.shop/profile/o_1def0o3mnp5p1ruufep1g9b4to93FY36V.png",
"status": 1,
"sort": 0,
"createTime": "2019-06-28T02:14:00.000+0000"
}, {
"id": 286,
"parentId": 52,
"cname": "哈伦裤",
"ccode": null,
"cimage": "http://image.fenxianggou.shop/profile/o_1def0nhheeeikvh101vfaagu695H2BTB.png",
"status": 1,
"sort": 0,
"createTime": "2019-06-28T02:13:41.000+0000"
}, {
"id": 285,
"parentId": 52,
"cname": "格子衬衣",
"ccode": null,
"cimage": "http://image.fenxianggou.shop/profile/o_1def0muha162m1p6s2qc157mbc9AQGJ3S.png",
"status": 1,
"sort": 0,
"createTime": "2019-06-28T02:13:23.000+0000"
}, {
"id": 284,
"parentId": 52,
"cname": "防晒衫",
"ccode": null,
"cimage": "http://image.fenxianggou.shop/profile/o_1def0mdlmo5hqr31mu41jvcfie999596M.png",
"status": 1,
"sort": 0,
"createTime": "2019-06-28T02:13:02.000+0000"
}, {
"id": 283,
"parentId": 52,
"cname": "短裤",
"ccode": null,
"cimage": "http://image.fenxianggou.shop/profile/o_1def0lov91dmslgq70u1eh51ean9P2N4OV.png",
"status": 1,
"sort": 0,
"createTime": "2019-06-28T02:11:32.000+0000"
}, {
"id": 282,
"parentId": 52,
"cname": "背带裤",
"ccode": null,
"cimage": "http://image.fenxianggou.shop/profile/o_1def0komf1ig71e9gtsl1fl6bsn9X8T9S5.png",
"status": 1,
"sort": 0,
"createTime": "2019-06-28T02:11:10.000+0000"
}]
], //二级分类
height: '', //可滚动视图区域的高度
selected: 0, //选中的id
scrollTop: 0, //设置横向滚动条位置
swiperIndex: 0, //当前所在滑块的 index
};
},
onLoad: function() {
this.height = uni.getSystemInfoSync().windowHeight;
},
methods: {
swiperchange(e) {
console.log("e: " + JSON.stringify(e));
this.selected = e.detail.current
if (e.detail.current > this.first.length / 2) {
this.scrollTop = 999
} else {
this.scrollTop = 0
}
},
switchSwiper(e) {
this.swiperIndex = e
},
}
};
</script>
<style>
.search {
width: 710upx;
height: 27px;
background: #f1f1f1;
display: flex;
border-radius: 10px;
justify-content: start;
align-items: center;
margin-bottom: 10px;
}
.search-icon {
width: 15px;
height: 15px;
}
.search-tips {
color: #c7c7c7;
font-size: 12px;
}
.list {
width: 100%;
display: flex;
background: #f0f0f0;
overflow-y: hidden;
}
.first {
height: 100%;
width: 150upx;
display: flex;
flex-direction: column;
background: #fff;
font-size: 27upx;
}
.first-item {
width: 150upx;
height: 100upx;
text-align: center;
line-height: 100upx;
font-size: 30upx;
}
.crimson {
color: #fd6261;
border-left: 2px solid #fd6261;
background: #f0f0f0;
}
.gray {
height: 100%;
width: 600upx;
background: #f0f0f0;
display: flex;
justify-content: center;
align-items: center;
overflow-y: hidden;
}
.swiper {
height: 95%;
width: 550upx;
background: white;
}
.swiper-item {
height: 100%;
width: 100%;
}
.second {
height: 100%;
width: 100%;
display: flex;
flex-wrap: wrap;
}
.second-item {
width: 180upx;
height: 180upx;
display: inline-block;
margin-top: 15upx;
}
.second-item1 {
width: 180upx;
height: 180upx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.second-image {
width: 130upx;
height: 130upx;
margin-bottom: 10upx;
}
.second-text {
font-size: 25upx;
}
::-webkit-scrollbar {
/*取消小程序的默认导航条样式*/
width: 0;
height: 0;
color: transparent;
}
</style>
2***@qq.com
- 发布:2019-07-04 16:12
- 更新:2021-03-15 00:06
- 阅读:4880
APP端swiper嵌套scroll-view方向滑动问题
分类:uni-app
chendd
对啊,很严重的bug
2020-06-03 22:37
7***@qq.com
同样的bug 急求
2021-10-25 16:40
1***@qq.com
同样的bug,怎么改
2022-07-27 12:23