This commit is contained in:
pplokijuhyg 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: { properties: {
img: String,
name: String,
price: String,
gid:String
}, },
/** /**
@ -18,6 +21,14 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { 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; height: 557rpx;
background-color: #FBFBFB; background-color: #FBFBFB;
.pic { .pic {
width: 113rpx; width: 256rpx;
height: 256rpx; height: 256rpx;
background-color: white; background-color: white;
margin: 0 auto; margin: 0 auto;
position: relative; position: relative;
top: 64rpx; top: 64rpx;
left: 121rpx; left: 64rpx;
} }
.shopname { .shopname {
width: 273rpx; width: 273rpx;
@ -27,4 +27,15 @@
font-size: 30rpx; font-size: 30rpx;
color: #09BB07; 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"> <view class="membershop" bind:tap="nav">
<image class="pic"></image> <image class="pic" src="{{img}}"></image>
<view class="shopname">产品名产品名产品名 <view class="shopname towline">{{name}}</view>
产品名产品名</view> <view class="pri">${{price}}</view>
<view class="pri">$123</view>
</view> </view>

View File

@ -1,33 +1 @@
.membershop { .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}
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;
}

View File

@ -1,3 +1,4 @@
import bin from "../../utils/bin"
// pages/member/member.js // pages/member/member.js
Page({ Page({
@ -5,14 +6,24 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
list:[]
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
bin.request({
url:"Goods/vipGoodslist",
data:{
page:0
}
}).then((res)=>{
console.log(res)
this.setData({
list:res.data.result
})
})
}, },
/** /**

View File

@ -1,32 +1,29 @@
<view class="top"> <view class="top">
<membertop></membertop> <membertop></membertop>
<view class="membershops"> <view class="membershops">
<view class="membershop"> <view class="membershop" wx:for="{{list}}" wx:for-index="j" wx:key="{{j}}">
<membershop></membershop> <membershop name="{{item.goods_name}}" price="{{item.shop_price}}" img="{{item.image}}" gid='{{item.goods_id}}'></membershop>
</view> </view>
<view class="membershop"> <!-- <view class="membershop">
<membershop></membershop> <membershop></membershop>
</view> </view>
<view class="membershop"> <view class="membershop">
<membershop></membershop> <membershop></membershop>
</view> </view>
<view class="membershop"> <view class="membershop">
<membershop></membershop> <membershop></membershop>
</view> </view>
<view class="membershop">
<view class="membershop"> <membershop></membershop>
<membershop></membershop> </view>
</view> <view class="membershop">
<view class="membershop"> <membershop></membershop>
<membershop></membershop> </view>
</view> <view class="membershop">
<view class="membershop"> <membershop></membershop>
<membershop></membershop> </view>
</view> <view class="membershop">
<view class="membershop"> <membershop></membershop>
<membershop></membershop> </view> -->
</view> </view>
</view>
</view> </view>