图片
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<view class="search_box">
|
||||
<view class="search_box_border">
|
||||
<u-input placeholder="搜索优质产品" placeholder-style="color: #969696" prefixIcon="search"
|
||||
prefixIconStyle="font-size: 22px;color: #909399;margin-left:30rpx">
|
||||
prefixIconStyle="font-size: 22px;color: #909399;margin-left:30rpx" readonly @tap="toSearch()">
|
||||
</u-input>
|
||||
</view>
|
||||
</view>
|
||||
@@ -13,15 +13,13 @@
|
||||
<!-- 分类模块 -->
|
||||
<view class="classify">
|
||||
<u-grid :border="false" col="5">
|
||||
<u-grid-item v-for="(listItem,listIndex) in classifyList" :key="listIndex"
|
||||
@click="click(listIndex)">
|
||||
<!-- 懒加载 :lazy-load="true" -->
|
||||
<u-grid-item v-for="(listItem,listIndex) in classifyList" :key="listIndex" @click="toClassify()">
|
||||
<u--image :src="listItem.src" width="86rpx" height="86rpx" :lazy-load="true">
|
||||
</u--image>
|
||||
<text class="grid-text">{{listItem.title}}</text>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
<u-toast ref="uToast" />
|
||||
<!-- <u-toast ref="uToast" /> -->
|
||||
</view>
|
||||
<!-- 分类模块下的轮播图 -->
|
||||
<view>
|
||||
@@ -91,7 +89,7 @@
|
||||
},
|
||||
],
|
||||
swiperList: [
|
||||
'/static/products/sy_bg.png',
|
||||
'https://cdn.uviewui.com/uview/swiper/swiper3.png',
|
||||
'https://cdn.uviewui.com/uview/swiper/swiper3.png'
|
||||
],
|
||||
}
|
||||
@@ -102,8 +100,20 @@
|
||||
},
|
||||
methods: {
|
||||
//点击一级分类
|
||||
click(listIndex) {
|
||||
this.$refs.uToast.success(`点击了第${listIndex}个`)
|
||||
// click(listIndex) {
|
||||
// this.$refs.uToast.success(`点击了第${listIndex}个`)
|
||||
// },
|
||||
//点击搜索框跳转到搜索页面
|
||||
toSearch() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/search/search'
|
||||
})
|
||||
},
|
||||
//点击一级分类跳转到分类页
|
||||
toClassify() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/goods-category-search/category-index'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -184,4 +194,4 @@
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user