feat: 修改瀑布流
This commit is contained in:
@@ -40,6 +40,8 @@
|
||||
:list="swiperList"
|
||||
style="width: 100%; border-radius: 20rpx; height: 160rpx"
|
||||
circular
|
||||
@click="onSwiperClick"
|
||||
@change="(e) => (currentNum = e.current)"
|
||||
></up-swiper>
|
||||
</view>
|
||||
<view class="swiper-title">
|
||||
@@ -49,6 +51,7 @@
|
||||
></image>
|
||||
<view class="swiper-center">信任桥-畅享全球好物</view>
|
||||
<image
|
||||
@click="goShare"
|
||||
src="/static/home/shop-go.png"
|
||||
style="width: 92rpx; height: 30rpx"
|
||||
></image>
|
||||
@@ -63,6 +66,7 @@
|
||||
:style="{ background: 'url(' + item.url + ')' }"
|
||||
style="text-align: center; background-size: 202rpx 228rpx"
|
||||
:key="index"
|
||||
@click="jumpInfo(item)"
|
||||
>
|
||||
<view class="shop-content">
|
||||
<view class="shop-name">{{ item.title }}</view>
|
||||
@@ -100,6 +104,7 @@ export default {
|
||||
dataList: [],
|
||||
faddishProduct: [], // 爆款专区
|
||||
swiperList: ['https://cdn.uviewui.com/uview/swiper/swiper1.png'],
|
||||
swiperListData:[],
|
||||
};
|
||||
},
|
||||
onShow() {},
|
||||
@@ -124,7 +129,25 @@ export default {
|
||||
this.faddishProduct = resp.data;
|
||||
}
|
||||
},
|
||||
jumpSearch() {},
|
||||
jumpSearch() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/rwa_package/dongjian/search',
|
||||
})
|
||||
},
|
||||
// 跳转到商品详情
|
||||
jumpInfo(item) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/other_package/productInfo/productInfo?id=' + item.id,
|
||||
})
|
||||
},
|
||||
|
||||
goShare(){
|
||||
console.log('go 的地址')
|
||||
},
|
||||
onSwiperClick(index){
|
||||
console.log('banner 图',this.swiperListData,index);
|
||||
// swiperList[index].goodsUrl
|
||||
},
|
||||
async getSearchList() {
|
||||
const params = {
|
||||
type: 1,
|
||||
@@ -143,6 +166,7 @@ export default {
|
||||
const resp = await getCarouselImage(params);
|
||||
if (resp && resp.bizcode === 100) {
|
||||
const data = resp.data || [];
|
||||
this.swiperListData = data;
|
||||
this.swiperList = data.length !== 0 ? data.map((obj) => obj.carouselImage) : [];
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user