Commit 7734388fff5b5ffeaadc7991c6f5ffea129832fa

Authored by 前端研发-钱巧玲
1 parent a6394fcf

添加评价详情和评价后直接跳转到评价详情

app.json
1 { 1 {
2 "pages": [ 2 "pages": [
3 "pages/index/index/index", 3 "pages/index/index/index",
  4 + "pages/user/comment/comment",
  5 + "pages/giftpack/evaluategift/evaluategift",
  6 + "pages/giftpack/newvipgift/newvipgift",
4 "pages/giftpack/payment/payment", 7 "pages/giftpack/payment/payment",
5 "pages/giftpack/buygiftpack/giftpackbuy", 8 "pages/giftpack/buygiftpack/giftpackbuy",
6 "pages/giftpack/giftpacklist/giftpacklist", 9 "pages/giftpack/giftpacklist/giftpacklist",
@@ -21,7 +24,6 @@ @@ -21,7 +24,6 @@
21 "pages/user/address_list/address_list", 24 "pages/user/address_list/address_list",
22 "pages/user/userinfo/userinfo", 25 "pages/user/userinfo/userinfo",
23 "pages/user/account/account", 26 "pages/user/account/account",
24 - "pages/user/comment/comment",  
25 "pages/user/return_goods_list/return_goods_list", 27 "pages/user/return_goods_list/return_goods_list",
26 "pages/user/userinfo_edit/userinfo_edit", 28 "pages/user/userinfo_edit/userinfo_edit",
27 "pages/user/collect_list/collect_list", 29 "pages/user/collect_list/collect_list",
@@ -81,7 +83,9 @@ @@ -81,7 +83,9 @@
81 "pages/user/my_service/tment_eval", 83 "pages/user/my_service/tment_eval",
82 "pages/user/my_service/tment_order_list", 84 "pages/user/my_service/tment_order_list",
83 "pages/user/my_service/beauty_deta", 85 "pages/user/my_service/beauty_deta",
84 - "pages/user/labels/labels" 86 + "pages/user/labels/labels",
  87 + "pages/user/view_comment/view_comment",
  88 + "pages/giftpack/birthdaygift/birthdaygift"
85 ], 89 ],
86 "permission": { 90 "permission": {
87 "scope.userLocation": { 91 "scope.userLocation": {
pages/user/add_comment/add_comment.js
@@ -8,7 +8,6 @@ Page({ @@ -8,7 +8,6 @@ Page({
8 resourceUrl: a.resourceUrl, 8 resourceUrl: a.resourceUrl,
9 iurl: a.imghost, 9 iurl: a.imghost,
10 defaultPhoto: a.resourceUrl + "/static/images/camera.png", 10 defaultPhoto: a.resourceUrl + "/static/images/camera.png",
11 -  
12 uploadPath: [], //上传后文件路径 11 uploadPath: [], //上传后文件路径
13 maxWord: 0, 12 maxWord: 0,
14 is_anonymous: !1, 13 is_anonymous: !1,
@@ -20,7 +19,9 @@ Page({ @@ -20,7 +19,9 @@ Page({
20 isLongPress: !1, 19 isLongPress: !1,
21 userinfo: null, 20 userinfo: null,
22 imgs: [], //本地文件再上传时的路径 21 imgs: [], //本地文件再上传时的路径
23 - lenMore:0 22 + lenMore:0,
  23 + goods_id: "", //商品id
  24 + order_id: "", //订单id
24 }, 25 },
25 onLoad: async function (a) { 26 onLoad: async function (a) {
26 var th = this; 27 var th = this;
@@ -35,6 +36,10 @@ Page({ @@ -35,6 +36,10 @@ Page({
35 console.log(e); 36 console.log(e);
36 th.setData({userinfo: e}) 37 th.setData({userinfo: e})
37 }) 38 })
  39 + th.setData({
  40 + goods_id: a.goods_id,
  41 + order_id: a.order_id
  42 + })
38 }, 43 },
39 keyUpChangeNum: function (t) { 44 keyUpChangeNum: function (t) {
40 this.setData({ 45 this.setData({
@@ -79,7 +84,7 @@ Page({ @@ -79,7 +84,7 @@ Page({
79 }); 84 });
80 }); 85 });
81 }, 86 },
82 - submitComment: function () { 87 + submitComment: function (i) {
83 var a = this; 88 var a = this;
84 if (!a.data.service_rank || !a.data.goods_rank || !a.data.deliver_rank) 89 if (!a.data.service_rank || !a.data.goods_rank || !a.data.deliver_rank)
85 return getApp().my_warnning("请先打分",0,a); 90 return getApp().my_warnning("请先打分",0,a);
@@ -111,9 +116,15 @@ Page({ @@ -111,9 +116,15 @@ Page({
111 e.post("/api/weshop/comment/savecomment", { 116 e.post("/api/weshop/comment/savecomment", {
112 data:p_data, 117 data:p_data,
113 success: function (a) { 118 success: function (a) {
  119 + if(a.data.code==0){
114 wx.setStorageSync("user:comment:update", !0), t.showSuccess("评论成功", function () { 120 wx.setStorageSync("user:comment:update", !0), t.showSuccess("评论成功", function () {
115 - wx.navigateBack(); 121 + // wx.navigateBack();
  122 + var url = i.currentTarget.dataset.url;
  123 + getApp().goto(url);
116 }); 124 });
  125 + }else{
  126 + getApp().my_warnning(a.data.msg,0,a);
  127 + }
117 } 128 }
118 }); 129 });
119 //}); 130 //});
pages/user/add_comment/add_comment.wxml
@@ -106,7 +106,7 @@ @@ -106,7 +106,7 @@
106 </view> 106 </view>
107 107
108 <view class="Submission flex-level "> 108 <view class="Submission flex-level ">
109 - <view class="fs30 flex-level white " bindtap="submitComment">提交评价</view> 109 + <view class="fs30 flex-level white " bindtap="submitComment" data-url="/pages/user/view_comment/view_comment?goods_id={{goods_id}}&order_id={{order_id}}">提交评价</view>
110 </view> 110 </view>
111 </view> 111 </view>
112 112
pages/user/comment/comment.js
@@ -124,10 +124,11 @@ Page({ @@ -124,10 +124,11 @@ Page({
124 124
125 //图片失败,默认图片 125 //图片失败,默认图片
126 bind_bnerr2: function(e) { 126 bind_bnerr2: function(e) {
  127 + var th = this;
127 var _errImg = e.currentTarget.dataset.errorimg; 128 var _errImg = e.currentTarget.dataset.errorimg;
128 var _errObj = {}; 129 var _errObj = {};
129 _errObj[_errImg] = os.imghost + "/public/images/default_goods_image_240.gif"; 130 _errObj[_errImg] = os.imghost + "/public/images/default_goods_image_240.gif";
130 - //this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; 131 + th.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
131 }, 132 },
132 //预览图片 133 //预览图片
133 previewImg: function(e) { 134 previewImg: function(e) {
pages/user/comment/comment.wxml
@@ -7,21 +7,21 @@ @@ -7,21 +7,21 @@
7 7
8 </view> 8 </view>
9 9
10 -<!-- 无评价 -->  
11 -<view class="noCollection" wx:if="{{(!comments||comments.length==0) && isloaded}}">  
12 - <view class="flex-level">  
13 - <image src="{{iurl}}/miniapp/images/comment.png"></image>  
14 - </view>  
15 - <view class="flex-level fs30 xc-ash">当前暂无评价</view>  
16 - <view class="flex-level">  
17 - <navigator url="/pages/index/index/index" bindtap="goto">  
18 - <view class="flex-center fs28 white">去首页逛逛</view>  
19 - </navigator> 10 + <!-- 无评价 -->
  11 + <view class="noCollection" wx:if="{{(!comments||comments.length==0) && isloaded}}">
  12 + <view class="flex-level">
  13 + <image src="{{iurl}}/miniapp/images/comment.png"></image>
  14 + </view>
  15 + <view class="flex-level fs30 xc-ash">当前暂无评价</view>
  16 + <view class="flex-level">
  17 + <navigator url="/pages/index/index/index" bindtap="goto">
  18 + <view class="flex-center fs28 white">去首页逛逛</view>
  19 + </navigator>
  20 + </view>
20 </view> 21 </view>
21 -</view>  
22 22
23 - <!-- 待评价栏 -->  
24 - <view class="stay_evaluate" wx:if="{{comments.length>0}}" wx:for="{{comments}}"> 23 + <!-- 待评价栏 -->
  24 + <view class="stay_evaluate" wx:if="{{comments.length>0}}" wx:for="{{comments}}">
25 25
26 <!-- 商品编号和状态 --> 26 <!-- 商品编号和状态 -->
27 <view class="Commodity_number flex-vertical-between fs26 padding border_bottom"> 27 <view class="Commodity_number flex-vertical-between fs26 padding border_bottom">
@@ -66,16 +66,15 @@ @@ -66,16 +66,15 @@
66 <view class="starss flex fs26"> 66 <view class="starss flex fs26">
67 <view class="commen">评价:</view> 67 <view class="commen">评价:</view>
68 <view class="stars"> 68 <view class="stars">
69 - <image  
70 - src="{{imaitem>=item.deliver_rank?iurl+'/miniapp/images/StarswhiteUnCk.png':iurl+'/miniapp/images/StarsredCk.png'}}" data-ind="{{imaitem}}" data-oo="{{item.deliver_rank}}" wx:for="{{5}}" wx:for-index="imaitem" wx:for-item="{{item_start}}"></image> 69 + <image src="{{imaitem>=item.deliver_rank?iurl+'/miniapp/images/StarswhiteUnCk.png':iurl+'/miniapp/images/StarsredCk.png'}}" data-ind="{{imaitem}}" data-oo="{{item.deliver_rank}}" wx:for="{{5}}" wx:for-index="imaitem" wx:for-item="{{item_start}}"></image>
71 </view> 70 </view>
72 </view> 71 </view>
73 <!-- 评价内容 --> 72 <!-- 评价内容 -->
74 <view class="Comment_content ellipsis-2 fs24">{{item.content.length>0?item.content:'此用户没有填写评论'}}</view> 73 <view class="Comment_content ellipsis-2 fs24">{{item.content.length>0?item.content:'此用户没有填写评论'}}</view>
75 <view class="Comment_images flex"> 74 <view class="Comment_images flex">
76 - <image bindtap="previewImg" wx:if="{{item.source_type==0 && aitem.length>10}}" data-index="{{index}}" src="{{aitem}}" wx:for="{{item.img}}" wx:for-item="aitem" wx:for-index="i" data-sindex="{{i}}" data-name="img"></image>  
77 - <image bindtap="previewImg" wx:if="{{item.source_type==1 && aitem.length>10}}" src="{{aitem}}" wx:for-index="i" data-index="{{index}}" wx:for="{{item.weapp_img}}" wx:for-item="aitem" data-sindex="{{i}}" data-name="weapp_img"></image>  
78 - 75 + <image wx:if="{{item.source_type==0 && aitem.length>10}}" data-index="{{index}}" src="{{iurl+aitem}}" wx:for="{{item.img}}" wx:for-item="aitem" wx:for-index="i" data-sindex="{{i}}" data-name="img"></image>
  76 + <image wx:if="{{item.source_type==1 && aitem.length>10}}" src="{{iurl+aitem}}" wx:for-index="i" data-index="{{index}}" wx:for="{{item.weapp_img}}" wx:for-item="aitem" data-sindex="{{i}}" data-name="weapp_img"></image>
  77 +
79 </view> 78 </view>
80 79
81 <!-- 商家回复 --> 80 <!-- 商家回复 -->
@@ -106,12 +105,19 @@ @@ -106,12 +105,19 @@
106 </view> 105 </view>
107 </view> 106 </view>
108 </view> 107 </view>
109 - <navigator wx:if="{{item.comment_id}}" class="commodity_To_evaluate flex-level View_evaluation fs24" url="/pages/user/order_detail/order_detail?order_id={{item.order_id}}">  
110 - <view>查看订单</view>  
111 - </navigator>  
112 - <navigator wx:if="{{!item.comment_id}}" bindtap="comment" data-recid="{{item.rec_id}}" class="commodity_To_evaluate flex-level comment_go" url="item.comment_id>0?'/pages/user/add_comment/add_comment':'' ">  
113 - <view class="fs24">去评价</view>  
114 - </navigator> 108 + <view class="flex">
  109 + <navigator wx:if="{{item.comment_id}}" class="commodity_To_evaluate flex-level View_evaluation fs24" url="/pages/user/order_detail/order_detail?order_id={{item.order_id}}">
  110 + <view>查看订单</view>
  111 + </navigator>
  112 +
  113 + <navigator wx:if="{{item.comment_id}}" class="commodity_To_evaluate flex-level comment_go" url="/pages/user/view_comment/view_comment?goods_id={{item.goods_id}}&order_id={{item.order_id}}">
  114 + <view>查看评价</view>
  115 + </navigator>
  116 +
  117 + <navigator wx:if="{{!item.comment_id}}" bindtap="comment" data-recid="{{item.rec_id}}" class="commodity_To_evaluate flex-level comment_go" url="{{item.comment_id>0?'/pages/user/add_comment/add_comment?goods_id={{item.goods_id}}&order_id={{item.order_id}}':''}}">
  118 + <view class="fs24">去评价</view>
  119 + </navigator>
  120 + </view>
115 </view> 121 </view>
116 </view> 122 </view>
117 </view> 123 </view>
pages/user/comment/comment.wxss
@@ -36,6 +36,7 @@ @@ -36,6 +36,7 @@
36 .border_bottom { 36 .border_bottom {
37 border-bottom: 3rpx solid rgb(245, 245, 245); 37 border-bottom: 3rpx solid rgb(245, 245, 245);
38 } 38 }
  39 +
39 /* 无评价 */ 40 /* 无评价 */
40 41
41 .noCollection image { 42 .noCollection image {
@@ -122,14 +123,17 @@ @@ -122,14 +123,17 @@
122 height: 39rpx; 123 height: 39rpx;
123 border-radius: 9rpx; 124 border-radius: 9rpx;
124 } 125 }
125 -.commodity_evaluate .commodity_To_evaluate view{ 126 +
  127 +.commodity_evaluate .commodity_To_evaluate view {
126 height: 39rpx; 128 height: 39rpx;
127 line-height: 39rpx; 129 line-height: 39rpx;
128 } 130 }
129 -.commodity_evaluate .comment_go{  
130 - margin-top: 10rpx;  
131 - background-color: rgb(211, 28, 52); 131 +
  132 +.commodity_evaluate .comment_go {
  133 + margin-left: 20rpx;
  134 + background-color: rgb(211, 28, 52);
132 color: rgb(255, 255, 255); 135 color: rgb(255, 255, 255);
  136 + border: 2rpx solid rgb(211, 28, 52);
133 } 137 }
134 138
135 .Commodity_spec { 139 .Commodity_spec {
@@ -141,26 +145,30 @@ @@ -141,26 +145,30 @@
141 } 145 }
142 146
143 .Commodity_spec view { 147 .Commodity_spec view {
144 - height: 28rpx;  
145 - align-items: center; 148 + height: 28rpx;
  149 + align-items: center;
146 } 150 }
147 151
148 .Commodity_evaluation .Comment_content { 152 .Commodity_evaluation .Comment_content {
149 color: rgb(153, 153, 153); 153 color: rgb(153, 153, 153);
150 letter-spacing: 1rpx; 154 letter-spacing: 1rpx;
151 } 155 }
152 -.Commodity_evaluation .starss{  
153 - height: 58rpx;  
154 - /* // line-height: 58rpx; */  
155 - align-items: center; 156 +
  157 +.Commodity_evaluation .starss {
  158 + height: 58rpx;
  159 + /* // line-height: 58rpx; */
  160 + align-items: center;
156 } 161 }
157 -.Commodity_evaluation .commen{ 162 +
  163 +.Commodity_evaluation .commen {
158 height: 58rpx; 164 height: 58rpx;
159 line-height: 58rpx; 165 line-height: 58rpx;
160 } 166 }
161 -.Commodity_evaluation .starss .stars{ 167 +
  168 +.Commodity_evaluation .starss .stars {
162 line-height: 58rpx; 169 line-height: 58rpx;
163 } 170 }
  171 +
164 .Commodity_evaluation .starss .stars image { 172 .Commodity_evaluation .starss .stars image {
165 width: 29rpx; 173 width: 29rpx;
166 height: 26rpx; 174 height: 26rpx;
@@ -173,17 +181,35 @@ @@ -173,17 +181,35 @@
173 margin-right: 8rpx; 181 margin-right: 8rpx;
174 margin-top: 18rpx; 182 margin-top: 18rpx;
175 border-radius: 6rpx; 183 border-radius: 6rpx;
176 - border: 3rpx solid rgb(245, 245, 245); 184 + border: 2rpx solid rgb(245, 245, 245);
  185 + margin-left: 15rpx;
177 } 186 }
178 -.commodity_evaluate .View_evaluation{  
179 - border:2rpx solid rgb(179, 179, 179);  
180 - color:rgb(0, 0, 0); 187 +
  188 +.commodity_evaluate .View_evaluation {
  189 + border: 2rpx solid rgb(179, 179, 179);
  190 + color: rgb(0, 0, 0);
181 background-color: rgb(255, 255, 255); 191 background-color: rgb(255, 255, 255);
182 } 192 }
183 -.comment_addtime{ 193 +
  194 +.comment_addtime {
184 height: 50rpx; 195 height: 50rpx;
185 } 196 }
186 -.title_width{ width: 146rpx; text-align:center }  
187 -.shop-font{ color: rgb(153, 153, 153);}  
188 -.reply{ margin-top: 10rpx}  
189 -.get_bottom{ text-align: center; color: #999; margin-bottom: 20rpx}  
190 \ No newline at end of file 197 \ No newline at end of file
  198 +
  199 +.title_width {
  200 + width: 146rpx;
  201 + text-align: center;
  202 +}
  203 +
  204 +.shop-font {
  205 + color: rgb(153, 153, 153);
  206 +}
  207 +
  208 +.reply {
  209 + margin-top: 10rpx;
  210 +}
  211 +
  212 +.get_bottom {
  213 + text-align: center;
  214 + color: #999;
  215 + margin-bottom: 20rpx;
  216 +}
pages/user/view_comment/view_comment.js 0 → 100644
  1 +var i = require("../../../utils/util.js"),
  2 +ut = i;
  3 +var e = getApp(),
  4 + a = e.globalData.setting,
  5 + os = a,
  6 + t = e.request,
  7 + d = e.globalData;
  8 +Page({
  9 +
  10 + /**
  11 + * 页面的初始数据
  12 + */
  13 + data: {
  14 + url: a.url,
  15 + iurl: a.imghost,
  16 + comment: [], //用户单个评价的内容
  17 + goods_id: "", //商品id
  18 + order_id: "", //订单id
  19 + is_act: 0, //是否开启活动
  20 + actId:"",//活动id
  21 + },
  22 +
  23 + /**
  24 + * 生命周期函数--监听页面加载
  25 + */
  26 + onLoad: function(options) {
  27 + var th = this;
  28 + th.setData({
  29 + goods_id: options.goods_id,
  30 + order_id: options.order_id
  31 + })
  32 + th.query_comment();
  33 + },
  34 +
  35 + /**
  36 + * 生命周期函数--监听页面显示
  37 + */
  38 + onShow: function() {
  39 +
  40 + },
  41 + query_comment: function() {
  42 + var th = this;
  43 + wx.showLoading({
  44 + title: '加载中'
  45 + })
  46 + var url = "/api/weshop/comment/list";
  47 + getApp().request.promiseGet(url, {
  48 + data: {
  49 + store_id: a.stoid,
  50 + userId: d.user_id,
  51 + goods_id: th.data.goods_id,
  52 + order_id: th.data.order_id
  53 + }
  54 + }).then(res => {
  55 + wx.hideLoading();
  56 + if (res.data.code == 0) {
  57 + var data = res.data.data.pageData;
  58 + if (data[0].img) data[0].img = ut.unserialize(data[0].img);
  59 + if (data[0].weapp_img) data[0].weapp_img = JSON.parse(data[0].weapp_img);
  60 + th.setData({
  61 + comment: data
  62 + })
  63 + th.judge_act(); //判断是否开启评价有礼
  64 + } else {
  65 + getApp().my_warnning("系统繁忙,请稍后再试", 0, th);
  66 + }
  67 + })
  68 + },
  69 + //评价有礼判断
  70 + judge_act: function() {
  71 + var th = this;
  72 + var url = "/api/weshop/marketing/comment/act/judge";
  73 + getApp().request.promiseGet(url, {
  74 + data: {
  75 + orderGoodsId: th.data.goods_id,
  76 + orderNumber: th.data.order_id,
  77 + orderType: 1,
  78 + storeId: a.stoid,
  79 + userId: d.user_id
  80 + }
  81 + }).then(res => {
  82 + if (res.data.code == 0) {
  83 + var id = res.data.data.id;
  84 + th.setData({
  85 + is_act: 1,
  86 + actId:id
  87 + })
  88 + } else {
  89 +
  90 + }
  91 + })
  92 + },
  93 + //预览图片
  94 + previewImg: function (e) {
  95 + var th = this;
  96 + var index = e.currentTarget.dataset.index;
  97 + var sindex = e.currentTarget.dataset.sindex;
  98 + var imgArr = th.data.comment;
  99 + var image = imgArr[0].weapp_img;
  100 + var imagename = "";
  101 + var iurl = th.data.iurl;
  102 + if (image!=""){
  103 + image = imgArr[0].weapp_img[index];
  104 + wx.previewImage({
  105 + current: iurl+image,
  106 + //当前图片地址
  107 + urls: imgArr[0].weapp_img, //所有要预览的图片的地址集合 数组形式
  108 + })
  109 + }else{
  110 + image = imgArr[0].img[index];
  111 + wx.previewImage({
  112 + current: iurl+image,
  113 + //当前图片地址
  114 + urls: imgArr[0].img, //所有要预览的图片的地址集合 数组形式
  115 + })
  116 + }
  117 + },
  118 + goto: function(e) {
  119 + var th = this;
  120 + var url = e.currentTarget.dataset.url;
  121 + getApp().goto(url);
  122 + }
  123 +
  124 +})
0 \ No newline at end of file 125 \ No newline at end of file
pages/user/view_comment/view_comment.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "查看评价",
  3 + "usingComponents": {
  4 + "warn": "/components/long_warn/long_warn",
  5 + "my_confirm": "/components/my_confirm/my_confirm"
  6 + }
  7 +}
0 \ No newline at end of file 8 \ No newline at end of file
pages/user/view_comment/view_comment.wxml 0 → 100644
  1 +<view class="commoditymax" wx:for="{{comment}}" wx:if="{{index==0}}" wx:for-item="item">
  2 + <!-- 商品评价 -->
  3 + <view class='commodity'>
  4 + <!-- 商品信息 -->
  5 + <navigator class='information flex-vertical' url="{{'/pages/goods/goodsInfo/goodsInfo?goods_id='+item.goods_id}}">
  6 + <image src="{{iurl+item.original_img}}" binderror="bind_bnerr2" data-errorimg="item.original_img"></image>
  7 + <view class="goods_name xc-black">
  8 + <!-- 商品名称 -->
  9 + <view class='ellipsis-2 fs32'>{{item.goods_name}}</view>
  10 + <!-- 商品价格,数量 -->
  11 + <view class='flex jc_sb balin'>
  12 + <!-- 价格 -->
  13 + <view class='flex-vertical balin'>
  14 + <view class="fs24">¥</view>
  15 + <view class="fs35">{{item.goods_price}}</view>
  16 + </view>
  17 +
  18 + <!-- 商品数量 -->
  19 + <view class='sum flex-vertical balin xc-black'>
  20 + <view class="fs24">x</view>
  21 + <view class="fs28">{{item.goods_num}}</view>
  22 + </view>
  23 +
  24 + </view>
  25 +
  26 + </view>
  27 +
  28 + </navigator>
  29 +
  30 +
  31 + <!-- 商品评价信息 -->
  32 + <view class="addComment">
  33 + <view class="fs26 comment">{{item.content}}</view>
  34 + <view class="flex addimages" wx:if="{{item.weapp_img.length>0 || item.img.length>0}}">
  35 + <!-- 评论图片集合 -->
  36 + <view class="images">
  37 + <block wx:if="{{item.weapp_img!=''}}">
  38 + <image class="rel" catchtap="previewImg" data-index="{{index}}" src="{{iurl+item}}" wx:for="{{item.weapp_img}}" lazy-load="true">
  39 + </image>
  40 + </block>
  41 + <block wx:else>
  42 + <image wx:if="{{item.img!=''}}" class="rel" catchtap="previewImg" data-index="{{index}}" src="{{iurl+item}}" wx:for="{{item.img}}" lazy-load="true">
  43 + </image>
  44 + </block>
  45 + </view>
  46 +
  47 + </view>
  48 +
  49 + </view>
  50 + </view>
  51 +
  52 + <!-- 评价等级 -->
  53 + <view class="Grade">
  54 + <!-- 宝贝评分 -->
  55 + <view class="title flex-vertical">
  56 + <view class="column"></view>
  57 + <view class="fs28">宝贝评分</view>
  58 + </view>
  59 +
  60 + <!-- 服务评级 -->
  61 + <view class="score-items">
  62 + <view class="score-item flex-vertical">
  63 + <view class="fs24">描述相符</view>
  64 + <view class="stars flex-vertical">
  65 + <view class="flex-vertical" wx:for="{{5}}" wx:for-item="goods" wx:for-index="goods">
  66 + <image src="{{goods<item.goods_rank?iurl+'/miniapp/images/StarsredCk.png':iurl+'/miniapp/images/StarswhiteUnCk.png'}}" lazy-load="true"></image>
  67 + </view>
  68 + </view>
  69 + </view>
  70 +
  71 + <view class="score-item flex-vertical">
  72 + <view class="fs24">物流服务</view>
  73 + <view class="stars flex-vertical">
  74 + <view class="flex-vertical" wx:for="{{5}}" wx:for-item="deliver" wx:for-index="deliver">
  75 + <image src="{{deliver<item.deliver_rank?iurl+'/miniapp/images/StarsredCk.png':iurl+'/miniapp/images/StarswhiteUnCk.png'}}" lazy-load="true"></image>
  76 + </view>
  77 + </view>
  78 + </view>
  79 + <view class="score-item flex-vertical">
  80 + <view class="fs24">服务态度</view>
  81 + <view class="stars flex-vertical">
  82 + <view class="flex-vertical" wx:for="{{5}}" wx:for-item="service" wx:for-index="service">
  83 + <image src="{{service<item.service_rank?iurl+'/miniapp/images/StarsredCk.png':iurl+'/miniapp/images/StarswhiteUnCk.png'}}" lazy-load="true"></image>
  84 + </view>
  85 + </view>
  86 +
  87 + </view>
  88 +
  89 + </view>
  90 +
  91 + </view>
  92 +</view>
  93 +<!-- 是否匿名评价 -->
  94 +<view class="Whether" wx:if="{{comment.length>0}}">
  95 + <view class="Submission flex-level ">
  96 + <view class="fs30 flex-level white " bindtap="goto" data-url="/pages/user/comment/comment">评价其他</view>
  97 + </view>
  98 + <view class="flex-level" wx:if="{{is_act}}">
  99 + <view class="fs30 flex-level white receive" data-url="/pages/giftpack/evaluategift/evaluategift?actId={{actId}}&actType=2orderNumber={{order_id}}&orderType=1&orderGoodsId={{goods_id}}" bindtap="goto">点击领取礼品</view>
  100 + </view>
  101 +</view>
  102 +
  103 +<!-- 引入提示组件 -->
  104 +<warn id="warn"></warn>
  105 +<my_confirm id="my_confirm"></my_confirm>
0 \ No newline at end of file 106 \ No newline at end of file
pages/user/view_comment/view_comment.wxss 0 → 100644
  1 +page{
  2 + overflow-x: hidden;
  3 +}
  4 +/* 商品详情和评价 */
  5 +.commoditymax{
  6 + overflow-x: hidden;
  7 +}
  8 +.commodity {
  9 + border-top: 6rpx solid rgb(245, 245, 245);
  10 + border-bottom: 6rpx solid rgb(245, 245, 245);
  11 + padding: 0rpx 30rpx;
  12 + padding-bottom:10rpx;
  13 +}
  14 +
  15 +.commodity .information {
  16 + height: 286rpx;
  17 +}
  18 +
  19 +.commodity .information image {
  20 + width: 186rpx;
  21 + height: 186rpx;
  22 +}
  23 +
  24 +.information .goods_name {
  25 + width: 480rpx;
  26 + margin-left: 25rpx;
  27 + height: 186rpx;
  28 +}
  29 +
  30 +.information .goods_name .ellipsis-2 {
  31 + line-height: 40rpx;
  32 + height: 80rpx;
  33 +}
  34 +
  35 +.information .goods_name .jc_sb {
  36 + margin-top: 60rpx;
  37 + color: rgb(212, 28, 52);
  38 + margin-right: 7rpx;
  39 +}
  40 +
  41 +.information .goods_name .jc_sb .fs32 {
  42 + line-height: 40rpx;
  43 +}
  44 +
  45 +.information .goods_name .jc_sb .sum {
  46 + margin-right: 5rpx;
  47 +}
  48 +
  49 +.balin {
  50 + align-items: baseline;
  51 +}
  52 +
  53 +.addComment {
  54 + width: 690rpx;
  55 + padding: 32rpx 0rpx 21rpx 0rpx;
  56 +}
  57 +
  58 +.addComment textarea {
  59 + padding: 0rpx 18rpx;
  60 + max-height: 100rpx;
  61 + width: 654rpx;
  62 +}
  63 +
  64 +.addComment .addimages {
  65 + padding: 0rpx 18rpx;
  66 + margin-top: 20rpx;
  67 + align-items: flex-end;
  68 + width: 652rpx;
  69 + margin-bottom: 15rpx;
  70 +}
  71 +.comment{
  72 + overflow: hidden;
  73 + text-overflow: ellipsis;
  74 + display: -webkit-box;
  75 + -webkit-box-orient: vertical;
  76 + -webkit-line-clamp: 3;
  77 +}
  78 +.addComment .addimages .images {
  79 + height: 140rpx;
  80 +}
  81 +
  82 +.addComment .addimages .images .rel {
  83 + width: 140rpx;
  84 + height: 100%;
  85 + overflow: visible;
  86 + margin-right: 15rpx;
  87 +}
  88 +
  89 +.addComment .addimages .images image .abs {
  90 + width: 30rpx;
  91 + height: 30rpx;
  92 + top: -7rpx;
  93 + right: -7rpx;
  94 +}
  95 +
  96 +.addComment .addimage {
  97 + width: 139rpx;
  98 + height: 139rpx;
  99 + border: 2rpx dashed rgb(196, 196, 196);
  100 + font-size: 16rpx;
  101 + margin-left: 6rpx;
  102 +}
  103 +
  104 +.addComment .addimage image {
  105 + width: 60rpx;
  106 + height: 58rpx;
  107 +}
  108 +
  109 +.Grade {
  110 + width: 100%;
  111 + height: 310rpx;
  112 + border-bottom: 6rpx solid rgb(245, 245, 245);
  113 + padding-left: 45rpx;
  114 +}
  115 +
  116 +.Grade .title {
  117 + width: 100%;
  118 + height: 105rpx;
  119 +}
  120 +
  121 +.Grade .title .column {
  122 + height: 30rpx;
  123 + border-left: 6rpx solid rgb(211, 27, 58);
  124 + margin-right: 12rpx;
  125 +}
  126 +
  127 +.Grade .score-item {
  128 + height: 55rpx;
  129 + line-height: 55rpx;
  130 +}
  131 +
  132 +.Grade .score-item .stars {
  133 + margin-left: 83rpx;
  134 +}
  135 +.Grade .score-item .stars view{
  136 + width: 60rpx;
  137 + height: 55rpx;
  138 +}
  139 +
  140 +.Grade .score-item .stars image {
  141 + width: 35rpx;
  142 + height: 35rpx;
  143 +}
  144 +.Whether {
  145 + padding:0rpx 31rpx;
  146 +}
  147 +.Whether .flex-right-vertical {
  148 + height: 67rpx;
  149 +}
  150 +
  151 +.Whether .flex-right-vertical .radio {
  152 + margin-right: 15rpx;
  153 +}
  154 +
  155 +.Whether .Submission {
  156 + margin: 40rpx 0 40rpx 0;
  157 +}
  158 +
  159 +.Whether .white {
  160 + width: 364rpx;
  161 + height: 58rpx;
  162 + background-color: rgb(212, 28, 52);
  163 + border-radius: 40rpx;
  164 + line-height: 58rpx;
  165 +}
  166 +.Whether .receive{
  167 + background-color: rgb(255, 176, 63);
  168 +}
  169 +
  170 +