dengjie commit : 我的页面及其绑定公司,浏览记录,我的收藏页面 的样式初步完成

This commit is contained in:
clay
2022-12-17 01:57:06 +08:00
parent 9c5d40cbb9
commit 76b6d9e557
19 changed files with 720 additions and 621 deletions

View File

@@ -34,39 +34,7 @@
</u-tabs>
</view>
<!-- 产品 -->
<view class="products_box">
<u-grid :border="false" col="2">
<u-grid-item v-for="(item,index) in productList" :key="index">
<u-image src="/static/products/sy_bb.png" width="354rpx" height="539rpx" :lazy-load="true">
</u-image>
<view class="bgContent">
<view>
<u-image :src="item.src" width="346rpx" height="320rpx" :lazy-load="true"
@click="toDetailPage()">
</u-image>
<view class="img_tag">{{item.img_tag}}</view>
</view>
<view style="padding: 16rpx;">
<view class="title_box">
<text class="title">{{item.title}}</text>
<u-tag :text="item.tag" type="warning" shape="circle"></u-tag>
</view>
<view class="product_desc">
{{item.desc}}
</view>
<view class="releaseDate">
<u-image src="/static/products/sy_icon_sjf.png" width="22rpx" height="22rpx"
:lazy-load="true">
</u-image>
<text class="release">发布日期</text>
<text>{{item.time}}</text>
</view>
</view>
</view>
</u-grid-item>
</u-grid>
</view>
<products></products>
</view>
</view>
</template>
@@ -127,39 +95,7 @@
'/static/products/sy_bg.png',
'https://cdn.uviewui.com/uview/swiper/swiper3.png'
],
productList: [{
src: '/static/products/zhanwei_dg.png',
title: '锅巴',
tag: '无添加剂',
img_tag: '零食铺子',
desc: '糯米蟹黄锅巴散装,非油炸绿色健康食品',
time: '2022-12-04'
},
{
src: '/static/products/zhanwei_dg(2).png',
title: '干吃汤圆',
tag: '天然原料',
img_tag: '糕点卷酥',
desc: '休闲食品厂家甜品糯米食品零食闽南特产宵夜好吃糍粑',
time: '2022-12-04'
},
{
src: '/static/products/zhanwei_dg(1).png',
title: '紫薯魔芋人参魔芋人参魔芋人参…',
tag: '天然原料',
img_tag: '健康创新',
desc: '紫薯魔芋人参代餐粉 冲调饮品贴牌加工 五谷杂粮粉代餐',
time: '2022-12-04'
},
{
src: '/static/products/zhanwei_dg(3).png',
title: '焦糖饼干',
tag: '无防腐剂',
img_tag: '饼干曲奇',
desc: '比利时风味焦糖饼干代餐小吃零食品',
time: '2022-12-04'
}
]
}
},
onPullDownRefresh() {
@@ -170,13 +106,8 @@
//点击一级分类
click(listIndex) {
this.$refs.uToast.success(`点击了第${listIndex}`)
},
//点击图片跳转到详情页
toDetailPage() {
uni.navigateTo({
url: '/pages/detail/productsDetail/productsDetail'
})
}
}
}
</script>
@@ -255,101 +186,6 @@
}
}
.products_box {
padding: 10rpx;
.u-grid-item {
.bgContent {
position: absolute;
right: 0;
top: 0;
.u-image__image {
margin-left: 6px;
}
.img_tag {
position: absolute;
padding: 2rpx 8rpx;
right: 5px;
top: 30rpx;
border-radius: 54rpx 0px 0px 54rpx;
box-shadow: 0px 2rpx 4rpx 0px #078C42;
background: linear-gradient(135deg, #0DB658 0%, #16DD6D 100%);
font-size: 20rpx;
color: #FFFFFF;
line-height: 28rpx;
}
.title_box {
position: relative;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
.title {
width: 186rpx;
font-size: 26rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: bold;
color: #0EBB5B;
line-height: 37rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.u-tag {
height: 26rpx;
line-height: 26rpx;
background: linear-gradient(124deg, #FEAA19 0%, #FDCF3A 100%);
.u-tag__text {
font-size: 20rpx;
}
}
}
.product_desc {
font-size: 22rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #3E3E3E;
line-height: 26rpx;
margin-top: 24rpx;
margin-bottom: 20rpx;
-webkit-line-clamp: 2;
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.releaseDate {
font-size: 22rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #A3A3A3;
line-height: 26rpx;
display: flex;
align-items: center;
padding-bottom: 25rpx;
image {
margin-left: 0;
}
.release {
padding: 0 10rpx 0 5rpx;
}
}
}
}
}
}
</style>