feat: 优化代码
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="supply_chain_warp">
|
||||
<template>
|
||||
<view class="supply_chain_warp">
|
||||
<view class="_header_warp">全球聚合供应链</view>
|
||||
|
||||
|
||||
<!-- <view class="_content_warp"> -->
|
||||
<up-swiper
|
||||
:list="swiperList"
|
||||
@@ -70,19 +70,19 @@
|
||||
</scroll-view>
|
||||
</view>
|
||||
<!-- </view> -->
|
||||
<CustomTabBar :tabIndex="2"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<CustomTabBar :tabIndex="2"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCarouselImage } from '@/api/common.js';
|
||||
import { APP_PAGE_TYPE } from '@/utils/enumUtils.js';
|
||||
import CustomTabBar from '@/components/custom-tab-bar.vue';
|
||||
|
||||
|
||||
export default {
|
||||
components:{CustomTabBar},
|
||||
data() {
|
||||
return {
|
||||
components:{CustomTabBar},
|
||||
data() {
|
||||
return {
|
||||
swiperList:['/static/supply_chain/banner01.png'],
|
||||
currentNum:0,
|
||||
guaranteeList:[
|
||||
@@ -123,7 +123,7 @@
|
||||
category:"274,275"
|
||||
},{
|
||||
path:'/static/supply_chain/sort_jj.png',
|
||||
title:'家居生活',
|
||||
title:'家居生活',
|
||||
category:"271"
|
||||
},{
|
||||
path:'/static/supply_chain/sort_my.png',
|
||||
@@ -157,7 +157,7 @@
|
||||
category:null,
|
||||
},
|
||||
productList:[],// 商品图
|
||||
};
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
this.searchGYLMall();
|
||||
@@ -185,7 +185,7 @@
|
||||
return { ...obj, sales:sales }; // 使用展开运算符添加新属性
|
||||
});
|
||||
this.productList = [...this.productList, ...newArr]; // 将新数据添加到列表中
|
||||
this.form.page++;
|
||||
this.form.page++;
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
@@ -208,7 +208,7 @@
|
||||
this.form.category = item.category;
|
||||
this.searchGYLMall(); // 加载更多数据
|
||||
},
|
||||
|
||||
|
||||
// 当滚动到底部时触发的方法
|
||||
loadMore() {
|
||||
this.searchGYLMall(); // 加载更多数据
|
||||
@@ -218,14 +218,14 @@
|
||||
*/
|
||||
jumpInfo(item){
|
||||
uni.navigateTo({
|
||||
url: '/pages/productInfo/productInfo?id='+item.id+"&source=supply_chain",
|
||||
url: '/pages/other_package/productInfo/productInfo?id='+item.id+"&source=supply_chain",
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.supply_chain_warp{
|
||||
height: calc(100vh - 140rpx);
|
||||
overflow: auto;
|
||||
@@ -323,7 +323,7 @@
|
||||
color: rgba(0,0,0,0.9);
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
}
|
||||
.product_item_price{
|
||||
@@ -340,4 +340,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user