From fbfe3f5c28d3ddf57514cddcf65fe4c5ce12c60e Mon Sep 17 00:00:00 2001 From: taiyuan Date: Tue, 14 Sep 2021 15:25:17 +0800 Subject: [PATCH] 商品列表修改 --- pages/goods/goodsList/goodsList.js | 10 ++++++++++ pages/goods/goodsList/goodsList.wxml | 236 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------- pages/goods/goodsList/goodsList.wxss | 136 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------- 3 files changed, 322 insertions(+), 60 deletions(-) diff --git a/pages/goods/goodsList/goodsList.js b/pages/goods/goodsList/goodsList.js index 4984781..2318104 100644 --- a/pages/goods/goodsList/goodsList.js +++ b/pages/goods/goodsList/goodsList.js @@ -22,6 +22,7 @@ Page({ is_hot:0, prom_goods_list:null, rq_data:null, + isToggle: false, //切换商品视图控制符 }, onLoad: function(t) { @@ -273,6 +274,15 @@ Page({ func(ob); }) }, + + + + // 切换显示 + bindToggleDisplay() { + this.setData({ + isToggle: !this.data.isToggle, + }); + }, }); \ No newline at end of file diff --git a/pages/goods/goodsList/goodsList.wxml b/pages/goods/goodsList/goodsList.wxml index 7b04967..2f32a40 100644 --- a/pages/goods/goodsList/goodsList.wxml +++ b/pages/goods/goodsList/goodsList.wxml @@ -1,8 +1,8 @@ - + - + 满{{item.condition}} 减{{item.content.money}}元 打{{item.content.sale}}折 @@ -13,7 +13,16 @@ - + + + + + 搜索店铺商品 + + + + + --> - + - + + - {{item.goods_name}} + {{item.goods_name}} - - - {{item.prom_integral}}积分 - + - ¥{{item.prom_price}} - + + + + {{item.prom_integral}}积分 + + + ¥{{item.prom_price}} + + {{item.market_price}} + + - - ¥{{item.market_price}} - 评论{{item.comment_count}} 已售{{item.sales_sum}} + + + + 评论{{item.comment_count}} + 已售{{item.sales_sum}} + @@ -79,56 +96,201 @@ {{card_name}} - + ¥{{item.market_price}} - 评论{{item.comment_count}} 已售{{item.sales_sum}} + + 评论{{item.comment_count}} + 已售{{item.sales_sum}} + ¥{{item.shop_price}} - + ¥{{item.market_price}} - 评论{{item.comment_count}} 已售{{item.sales_sum}} + + 评论{{item.comment_count}} + 已售{{item.sales_sum}} + - + - ¥{{item.shop_price}} - ¥{{item.market_price}} + {{item.shop_price}} + {{item.market_price}} - + - ¥{{g_filter.get_card_price(item,card_list,0)}} + {{g_filter.get_card_price(item,card_list,0)}} {{g_filter.get_card_price(item,card_list,1)}} - 评论{{item.comment_count}} 已售{{item.sales_sum}} + + 评论{{item.comment_count}} + 已售{{item.sales_sum}} + - + - ¥{{item.shop_price}} - - ¥{{item.market_price}} - 评论{{item.comment_count}} 已售{{item.sales_sum}} + + ¥{{item.shop_price}} + ¥{{item.market_price}} + + + + + 评论{{item.comment_count}} + 已售{{item.sales_sum}} + - - ¥{{item.shop_price}} - - ¥{{item.market_price}} - 评论{{item.comment_count}} 已售{{item.sales_sum}} + + + {{item.shop_price}} + {{item.market_price}} + + + + + 评论{{item.comment_count}} + 已售{{item.sales_sum}} + - + + + + + + + + + + {{item.goods_name}} + + + + + + {{item.prom_integral}}积分 + + + ¥{{item.prom_price}} + + {{item.market_price}} + + + + + + + 评论{{item.comment_count}} + 已售{{item.sales_sum}} + + + + + + + + + + + + ¥{{item[card_field]}} + + + {{card_name}} + + + + ¥{{item.market_price}} + + 评论{{item.comment_count}} + 已售{{item.sales_sum}} + + + + + ¥{{item.shop_price}} + + ¥{{item.market_price}} + + 评论{{item.comment_count}} + 已售{{item.sales_sum}} + + + + + + + + {{item.shop_price}} + {{item.market_price}} + + + + {{g_filter.get_card_price(item,card_list,0)}} + + + {{g_filter.get_card_price(item,card_list,1)}} + + + + 评论{{item.comment_count}} + 已售{{item.sales_sum}} + + + + + + ¥{{item.shop_price}} + ¥{{item.market_price}} + + + + + 评论{{item.comment_count}} + 已售{{item.sales_sum}} + + + + + + + + {{item.shop_price}} + {{item.market_price}} + + + + + 评论{{item.comment_count}} + 已售{{item.sales_sum}} + + + + + + + + + + + + + + + + 没有相关的数据 diff --git a/pages/goods/goodsList/goodsList.wxss b/pages/goods/goodsList/goodsList.wxss index daf9b92..6cf7864 100644 --- a/pages/goods/goodsList/goodsList.wxss +++ b/pages/goods/goodsList/goodsList.wxss @@ -1,23 +1,34 @@ +page { + background-color: #f0f0f0; +} + .container { color: #666; } +.nav { + display: flex; + border-radius: 30rpx 30rpx 0 0; + overflow: hidden; +} + .nav-item { - float: left; - width: 30%; - height: 90rpx; - line-height: 90rpx; + /* float: left; */ + flex: 1; + /* width: 30%; */ + height: 80rpx; + /* line-height: 90rpx; */ display: flex; align-items: center; justify-content: center; - font-size: 32rpx; - border-bottom: 1px solid #dfefef; + font-size: 26rpx; + border-bottom: 1px solid #f5f5f5; background-color: #fff; } .nav-item .ico-dg { - width: 18rpx; - height: 12rpx; + width: 12rpx; + height: 8rpx; margin-left: 10rpx; line-height: 0; } @@ -46,6 +57,19 @@ background-position-x: -32rpx; } +.search-box { + color: #BEBEBE; + font-size: 24rpx; + /* border: 2rpx solid #f23030; */ + border-radius: 40rpx; + padding: 16rpx; + background-color: #e0e0e0; +} + +.icon-sousuo { + font-size: 26rpx !important; +} + .search { width: 10%; } @@ -57,22 +81,31 @@ .choice_list { background-color: #fff; + /* padding-left: 20rpx; + padding-right: 20rpx; */ } .choice_item { position: relative; width: 100%; - min-height: 200rpx; - padding: 10rpx 0; - border-bottom: 1px solid #f5f6f6; + /* min-height: 200rpx; */ + /* padding: 10rpx 0; */ + /* border-bottom: 1px solid #f5f6f6; */ font-size: 30rpx; + display: flex; + padding: 20rpx; + box-sizing: border-box; } .img-wrap { - float: left; - width: 180rpx; - height: 180rpx; - padding: 0 10rpx 10rpx; + /* float: left; */ + width: 270rpx; + height: 270rpx; + margin-right: 22rpx; + border-radius: 15rpx; + overflow: hidden; + flex-shrink: 0; + /* padding: 0 10rpx 10rpx; */ } .img-wrap image { @@ -81,25 +114,36 @@ } .item-cont .title { + font-size: 26rpx; height: 72rpx; - margin: 16rpx 0; - padding-right: 10rpx; + margin-bottom: 20rpx; + /* padding-right: 10rpx; */ line-height: 36rpx; - color: #333; + color: #2C2C2C; + text-align: justify; overflow: hidden; } .price { display: inline-block; color: #f23030; - line-height: 24rpx; + /* line-height: 24rpx; */ + font-size: 30rpx; + /* font-weight: bold; + font-size: 28rpx; */ /* padding-bottom: 20rpx; */ } +.rmb::before { + content: '¥'; + font-size: 24rpx; +} + .comment { - font-size: 25rpx; - margin-top: 4rpx; - padding-right: 30rpx; + font-size: 24rpx; + /* margin-top: 4rpx; */ + color: #8d8d8d; + /* padding-right: 30rpx; */ } .filter-modal { @@ -207,9 +251,55 @@ .mk_price { margin-left: 10rpx; - font-size: 25rpx; + font-size: 24rpx; } .item-cont { line-height: 38rpx; + display: flex; + flex-direction: column; + justify-content: space-evenly; + flex: 1; +} + + +.choice_list.on { + display: flex; + flex-wrap: wrap; + padding-bottom: 12rpx; + padding-left: 16rpx; + padding-right: 16rpx; + background-color: #f0f0f0; +} + +.choice_list.on .choice_item { + padding: 0; + margin-top: 16rpx; + display: block; + width: 350rpx; + background-color: white; + border-radius: 15rpx; +} + +.choice_list.on .choice_item:nth-child(even) { + margin-left: 18rpx; +} + +.choice_list.on .img-wrap { + width: 350rpx; + height: 350rpx; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; +} + +.choice_list.on .item-cont { + padding: 10rpx; + display: flex; + flex-direction: column; + justify-content: space-between; +} + + +.choice_list.on .item-cont .flex.on { + display: block; } -- libgit2 0.21.4