NurseStationApp/pages/ProductList/ProductList.vue
2022-10-17 11:21:23 +08:00

112 lines
2.0 KiB
Vue

<template>
<view class="app">
<view class="productlist">
<view class="item" @tap='goCommodityDetails'>
<image src="../../static/shoppingcs.png" mode=""></image>
<view class="title">
燕麦麸皮 1
</view>
<view class="price">
42.9
</view>
</view>
<view class="item">
<image src="../../static/shoppingcs.png" mode=""></image>
<view class="title">
燕麦麸皮 1
</view>
<view class="price">
42.9
</view>
</view>
<view class="item">
<image src="../../static/shoppingcs.png" mode=""></image>
<view class="title">
燕麦麸皮 1
</view>
<view class="price">
42.9
</view>
</view>
<view class="item">
<image src="../../static/shoppingcs.png" mode=""></image>
<view class="title">
燕麦麸皮 1
</view>
<view class="price">
42.9
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: '医路优品', //导航栏标题
};
},
onReady() {
//更改导航栏文字
uni.setNavigationBarTitle({
title: this.title,
});
},
onLoad(options) {
//获取传值
this.title = options.title
},
methods: {
//跳转详情页
goCommodityDetails() {
uni.navigateTo({
url: '/pages/CommodityDetails/CommodityDetails'
})
},
},
}
</script>
<style lang="scss">
.app {
.productlist {
width: 100%;
margin: 0 auto;
padding: 40rpx 0 0 0;
display: flex;
flex-wrap: wrap;
justify-content: space-evenly;
.item {
width: 45%;
background: #FFFFFF;
border-radius: 25rpx;
padding-bottom: 10rpx;
box-shadow: 0px 4rpx 8rpx 4rpx rgba(199, 200, 202, 0.8);
margin-bottom: 40rpx;
.price {
font-size: 42rpx;
color: #D43953;
line-height: 79rpx;
padding-left: 20rpx;
}
.title {
font-size: 39rpx;
color: #000000;
line-height: 69rpx;
padding-left: 20rpx;
}
image {
width: 100%;
height: 340rpx;
}
}
}
}
</style>