NurseStationApp/pages/ProductList/ProductList.vue

117 lines
2.1 KiB
Vue
Raw Normal View History

2022-10-12 17:45:22 +08:00
<template>
2022-10-13 10:37:47 +08:00
<view class="app">
<view class="productlist">
2022-10-13 16:02:25 +08:00
<view class="item" @tap='goCommodityDetails'>
2022-10-13 10:37:47 +08:00
<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>
2022-10-12 17:45:22 +08:00
</view>
</template>
<script>
export default {
data() {
return {
2022-10-13 16:02:25 +08:00
title: '医路优品', //导航栏标题
2022-10-12 17:45:22 +08:00
};
},
2022-10-13 10:37:47 +08:00
onReady() {
2022-10-13 16:02:25 +08:00
//更改导航栏文字
2022-10-12 17:45:22 +08:00
uni.setNavigationBarTitle({
2022-10-13 10:37:47 +08:00
title: this.title,
2022-10-12 17:45:22 +08:00
});
},
2022-10-13 10:37:47 +08:00
onLoad(options) {
2022-10-13 16:02:25 +08:00
//获取传值
2022-10-13 10:37:47 +08:00
this.title = options.title
},
2022-10-12 17:45:22 +08:00
methods: {
2022-10-13 16:02:25 +08:00
//跳转详情页
goCommodityDetails() {
uni.navigateTo({
url: '/pages/CommodityDetails/CommodityDetails'
})
},
2022-10-12 17:45:22 +08:00
},
}
</script>
<style lang="scss">
2022-10-13 10:37:47 +08:00
.app {
background-color: #F4F5F7;
width: 100%;
height: 100vh;
position: relative;
2022-10-12 17:45:22 +08:00
2022-10-13 10:37:47 +08:00
.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;
}
}
}
}
2022-10-12 17:45:22 +08:00
</style>