From 9608876b2eb34f0c88f759e9f26aee89a6d77e7a Mon Sep 17 00:00:00 2001 From: yvan.ni <765199919@qq.com> Date: Fri, 27 Sep 2019 15:21:25 +0800 Subject: [PATCH] 商品详情页评价图片,添加评价,评价列表 --- pages/goods/goodsInfo/goodsInfo.js | 14 ++++++++++---- pages/goods/goodsInfo/goodsInfo.wxml | 12 +++++++++--- pages/user/add_comment/add_comment.wxml | 82 ++++++++++++++++------------------------------------------------------------------ pages/user/add_comment/add_comment.wxss | 139 +++++++++++++------------------------------------------------------------------------------------------------------------------------------ pages/user/comment/comment.wxml | 4 ++-- 5 files changed, 50 insertions(+), 201 deletions(-) diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js index 79a85d6..fae518e 100644 --- a/pages/goods/goodsInfo/goodsInfo.js +++ b/pages/goods/goodsInfo/goodsInfo.js @@ -385,8 +385,9 @@ Page({ if(fir_com){ for(var ind in fir_com){ - if(fir_com[ind].head_pic=="") fir_com[ind].head_pic= ee.data.iurl+"/miniapp/images/hui_hear_pic.png"; - if (fir_com[ind].img) fir_com[ind].img = ut.unserialize(fir_com[ind].img); + if(fir_com[ind].head_pic=="") fir_com[ind].head_pic= ee.data.iurl+"/miniapp/images/hui_hear_pic.png"; + if (fir_com[ind].img) fir_com[ind].img = ut.unserialize(fir_com[ind].img); + if (fir_com[ind].weapp_img) fir_com[ind].weapp_img = JSON.parse(fir_com[ind].weapp_img); } } @@ -774,6 +775,7 @@ Page({ data: updata, success: function(t) { getApp().my_warnning('加入购物车成功', 1, th,450); + th.closeSpecModal(); } }); } else { @@ -781,6 +783,7 @@ Page({ data: newd, success: function(t) { getApp().my_warnning('加入购物车成功', 1, th,450); + th.closeSpecModal(); } }); } @@ -1349,6 +1352,9 @@ Page({ if(res.data.data.pageData && res.data.data.pageData.length>0){ cda[ind].replay_list=res.data.data.pageData; } + if(ep.weapp_img!="" && ut.isString(ep.weapp_img)){ + cda[ind].weapp_img=JSON.parse(ep.weapp_img); + } }) } } @@ -2712,7 +2718,7 @@ Page({ // 选择门店 choice_store:function(ee){ var th=this; - var ind=ee.currentTarget.dataset.ind; + //var ind=ee.currentTarget.dataset.ind; var bconfig = th.data.bconfig; if (bconfig.is_sort_storage){ @@ -2744,7 +2750,7 @@ Page({ }) } this.setData({ - open_ind_store: ind, + //open_ind_store: ind, store:1, openSpecModal: !1, openSpecModal_pt: !1 diff --git a/pages/goods/goodsInfo/goodsInfo.wxml b/pages/goods/goodsInfo/goodsInfo.wxml index 9355b84..32aa281 100644 --- a/pages/goods/goodsInfo/goodsInfo.wxml +++ b/pages/goods/goodsInfo/goodsInfo.wxml @@ -387,7 +387,8 @@ - + + @@ -621,8 +622,13 @@ - - + + + + + diff --git a/pages/user/add_comment/add_comment.wxml b/pages/user/add_comment/add_comment.wxml index 40be451..fb9c1c1 100644 --- a/pages/user/add_comment/add_comment.wxml +++ b/pages/user/add_comment/add_comment.wxml @@ -1,63 +1,12 @@ - - - - - + - - + + - {{options.goods_name}}我弄饭v的v哦女v绝我弄饭v的v哦女v绝望愤怒冻死我弄饭v的v哦女v绝望愤怒冻死望愤怒冻死 + {{options.goods_name}} @@ -76,14 +25,12 @@ - + - + @@ -122,23 +69,26 @@ 描述相符 - + + + 物流服务 - + + + 服务态度 - + + + @@ -152,7 +102,7 @@ - + 匿名评价 diff --git a/pages/user/add_comment/add_comment.wxss b/pages/user/add_comment/add_comment.wxss index 8fb7f14..0ad6079 100644 --- a/pages/user/add_comment/add_comment.wxss +++ b/pages/user/add_comment/add_comment.wxss @@ -1,128 +1,11 @@ -/* .goods-mes { - height: 100rpx; - display: flex; - padding: 30rpx; - justify-content: space-between; +page{ + overflow-x: hidden; + overflow-y: hidden; } - -.goods-img { - width: 100rpx; - height: 100rpx; - overflow: hidden; -} - -.goods-des { - width: 560rpx; -} - -.goods-des>view { - width: 100%; - height: 32rpx; - line-height: 1; - font-size: 32rpx; - color: #444; -} - -.goods-package { - margin-top: 36rpx; -} - -.evaluation { - padding: 30rpx 30rpx; - position: relative; - font-size: 28rpx; -} - -.word-box { - color: #444; - line-height: 40rpx; - width: 100%; - height: 200rpx; -} - -.words-num { - position: absolute; - right: 30rpx; - bottom: 30rpx; - color: #777; -} - -.pic-list { - padding: 40rpx 20rpx 20rpx; - display: flex; - justify-content: space-around; -} - -.share-pic { - width: 126rpx; - height: 126rpx; - border: 1px solid #ddd; - overflow: hidden; -} - -.anonymous { - height: 60rpx; - padding: 0 20rpx 20rpx; - background-color: #fff; - display: flex; - align-items: center; - font-size: 30rpx; - color: #777; -} - -.anonymous>icon { - margin-right: 20rpx; -} - -.score-list { - margin-top: 20rpx; -} - -.score-list>view { - display: flex; - justify-content: space-between; - font-size: 30rpx; - color: #444; -} - -.score-title { - height: 90rpx; - line-height: 90rpx; - border-bottom: 1px solid #eee; -} - -.score-item { - align-items: center; - height: 80rpx; -} - -.stars { - display: flex; -} - -.stars image { - width: 44rpx; - height: 40rpx; -} - -.btn-wrap { - padding: 20rpx 0; - background-color: #fff; - border-top: 1px solid #eee; -} - -.submit-btn { - width: 320rpx; - height: 80rpx; - line-height: 80rpx; - text-align: center; - background-color: #f15353; - color: #fff; - margin: auto; -} */ - /* 商品详情和评价 */ - +.commoditymax{ + overflow: hidden; +} .commodity { height: 715rpx; border-top: 6rpx solid rgb(245, 245, 245); @@ -245,16 +128,20 @@ .Grade .score-item .stars { margin-left: 83rpx; } +.Grade .score-item .stars view{ + width: 60rpx; + height: 55rpx; +} .Grade .score-item .stars image { width: 35rpx; height: 35rpx; - margin-right: 28rpx; } - +.Whether { + padding:0rpx 31rpx; +} .Whether .flex-right-vertical { height: 67rpx; - padding-right: 31rpx; } .Whether .flex-right-vertical .radio { diff --git a/pages/user/comment/comment.wxml b/pages/user/comment/comment.wxml index 9024494..40f97e2 100644 --- a/pages/user/comment/comment.wxml +++ b/pages/user/comment/comment.wxml @@ -34,7 +34,7 @@ - + @@ -57,7 +57,7 @@ x{{item.goods_num}} - + -- libgit2 0.21.4