This commit is contained in:
2019-12-24 18:06:31 +08:00
parent 6576aef374
commit ef6a5868f1
6 changed files with 71 additions and 74 deletions

View File

@@ -4,7 +4,10 @@ Component({
* 组件的属性列表
*/
properties: {
img: String,
name: String,
price: String,
gid:String
},
/**
@@ -18,6 +21,14 @@ Component({
* 组件的方法列表
*/
methods: {
nav(){
console.log(this.data.gid)
wx.navigateTo({
url:"/pages/product/product?shopid=" + this.data.gid,
fail(a){
console.log(a)
}
})
}
}
})

View File

@@ -3,13 +3,13 @@
height: 557rpx;
background-color: #FBFBFB;
.pic {
width: 113rpx;
width: 256rpx;
height: 256rpx;
background-color: white;
margin: 0 auto;
position: relative;
top: 64rpx;
left: 121rpx;
left: 64rpx;
}
.shopname {
width: 273rpx;
@@ -27,4 +27,15 @@
font-size: 30rpx;
color: #09BB07;
}
.towline {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
}

View File

@@ -1,6 +1,5 @@
<view class="membershop">
<image class="pic"></image>
<view class="shopname">产品名产品名产品名
产品名产品名</view>
<view class="pri">$123</view>
<view class="membershop" bind:tap="nav">
<image class="pic" src="{{img}}"></image>
<view class="shopname towline">{{name}}</view>
<view class="pri">${{price}}</view>
</view>

View File

@@ -1,33 +1 @@
.membershop {
width: 373rpx;
height: 557rpx;
background-color: #FBFBFB;
}
.membershop .pic {
width: 113rpx;
height: 256rpx;
background-color: white;
margin: 0 auto;
position: relative;
top: 64rpx;
left: 121rpx;
}
.membershop .shopname {
width: 273rpx;
color: #333333;
font-size: 30rpx;
text-align: center;
position: relative;
top: 111rpx;
margin: 0 auto;
}
.membershop .pri {
position: relative;
top: 127rpx;
text-align: center;
font-size: 30rpx;
color: #09BB07;
}
.membershop{width:373rpx;height:557rpx;background-color:#FBFBFB}.membershop .pic{width:256rpx;height:256rpx;background-color:white;margin:0 auto;position:relative;top:64rpx;left:64rpx}.membershop .shopname{width:273rpx;color:#333333;font-size:30rpx;text-align:center;position:relative;top:111rpx;margin:0 auto}.membershop .pri{position:relative;top:127rpx;text-align:center;font-size:30rpx;color:#09BB07}.membershop .towline{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}