From ef6a5868f1847566b631e4b3b0fd54c27a1a41c7 Mon Sep 17 00:00:00 2001 From: pplokijuhyg <1162963624@qq.com> Date: Tue, 24 Dec 2019 18:06:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/member/membershop/membershop.js | 15 +++++- components/member/membershop/membershop.scss | 15 +++++- components/member/membershop/membershop.wxml | 9 ++-- components/member/membershop/membershop.wxss | 34 +----------- pages/member/member.js | 15 +++++- pages/member/member.wxml | 57 ++++++++++---------- 6 files changed, 71 insertions(+), 74 deletions(-) diff --git a/components/member/membershop/membershop.js b/components/member/membershop/membershop.js index 58126b2..9c5d1e6 100644 --- a/components/member/membershop/membershop.js +++ b/components/member/membershop/membershop.js @@ -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) + } + }) +} } }) diff --git a/components/member/membershop/membershop.scss b/components/member/membershop/membershop.scss index 4dddb12..ea50292 100644 --- a/components/member/membershop/membershop.scss +++ b/components/member/membershop/membershop.scss @@ -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; + } } \ No newline at end of file diff --git a/components/member/membershop/membershop.wxml b/components/member/membershop/membershop.wxml index eb83286..f2a0674 100644 --- a/components/member/membershop/membershop.wxml +++ b/components/member/membershop/membershop.wxml @@ -1,6 +1,5 @@ - - - 产品名产品名产品名 -产品名产品名 -$123 + + + {{name}} +${{price}} \ No newline at end of file diff --git a/components/member/membershop/membershop.wxss b/components/member/membershop/membershop.wxss index da3eb5d..f56a972 100644 --- a/components/member/membershop/membershop.wxss +++ b/components/member/membershop/membershop.wxss @@ -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} diff --git a/pages/member/member.js b/pages/member/member.js index ad3beca..d86a3c0 100644 --- a/pages/member/member.js +++ b/pages/member/member.js @@ -1,3 +1,4 @@ +import bin from "../../utils/bin" // pages/member/member.js Page({ @@ -5,14 +6,24 @@ Page({ * 页面的初始数据 */ data: { - + list:[] }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { - + bin.request({ + url:"Goods/vipGoodslist", + data:{ + page:0 + } + }).then((res)=>{ + console.log(res) + this.setData({ + list:res.data.result + }) + }) }, /** diff --git a/pages/member/member.wxml b/pages/member/member.wxml index 37da2d0..8d37957 100644 --- a/pages/member/member.wxml +++ b/pages/member/member.wxml @@ -1,32 +1,29 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + \ No newline at end of file