Browse Source

评论细节修改

master
caichunsheng 4 years ago
parent
commit
b897c0f4fa
  1. 2
      pages/index/index.wxml
  2. 2
      pages/info/hotelProductInfo/index.js
  3. 2
      pages/info/hotelProductInfo/index.wxml
  4. 6
      pages/info/hotelProductInfo/index.wxss
  5. 2
      pages/info/postProductInfo/index.js
  6. 3
      pages/info/postProductInfo/index.wxml
  7. 6
      pages/info/postProductInfo/index.wxss
  8. 2
      pages/info/sceneProductInfo/index.js
  9. 6
      pages/info/sceneProductInfo/index.wxml
  10. 12
      pages/info/sceneProductInfo/index.wxss
  11. 1
      pages/list/comments/index.js
  12. 6
      pages/list/comments/index.wxml
  13. 21
      pages/list/comments/index.wxss

2
pages/index/index.wxml

@ -220,7 +220,7 @@
<image src="https://static.ticket.sz-trip.com/xcxImages/index/newpb5.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/xcxImages/index/newpb5.png" mode="widthFix"></image>
<view>书香借阅</view> <view>书香借阅</view>
</view> </view>
<view bindtap="gotoPath" data-event="book_click" data-title="书香借阅" data-path="/pages/culture/index" <view bindtap="gotoPath" data-event="book_click" data-title="文化配送" data-path="/pages/culture/index"
class="pbservice-item"> class="pbservice-item">
<image src="https://static.ticket.sz-trip.com/uploads/20220818/e02af6e8bf9170060ed7295d367d72c1.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/uploads/20220818/e02af6e8bf9170060ed7295d367d72c1.png" mode="widthFix"></image>
<view>文化配送</view> <view>文化配送</view>

2
pages/info/hotelProductInfo/index.js

@ -215,7 +215,7 @@ Page({
item.rate = Number(item.rate) item.rate = Number(item.rate)
}) })
this.setData({ this.setData({
comment: res.data.list, comment: res.data.list.splice(0, 2),
commentTotal: res.data.total commentTotal: res.data.total
}) })
let arr = this.data.comment let arr = this.data.comment

2
pages/info/hotelProductInfo/index.wxml

@ -121,6 +121,8 @@
</view> </view>
</view> </view>
</view> </view>
<view class="sku">{{item.sku_name}}</view>
</navigator> </navigator>
<navigator url="/pages/list/comments/index?sceneid={{id}}" wx:if="{{comment.length>0}}" class="more-comment-btn">查看全部点评<text class="iconfont icon-you"></text></navigator> <navigator url="/pages/list/comments/index?sceneid={{id}}" wx:if="{{comment.length>0}}" class="more-comment-btn">查看全部点评<text class="iconfont icon-you"></text></navigator>
</view> </view>

6
pages/info/hotelProductInfo/index.wxss

@ -580,4 +580,10 @@ page {
} }
.all view:last-child{ .all view:last-child{
margin-top: 10rpx; margin-top: 10rpx;
}
.sku{
margin-left: 10rpx;
color: #666;
font-size: 24rpx;
margin-top: 8rpx;
} }

2
pages/info/postProductInfo/index.js

@ -89,7 +89,7 @@ Page({
item.rate = Number(item.rate) item.rate = Number(item.rate)
}) })
this.setData({ this.setData({
comment: res.data.list, comment: res.data.list.splice(0, 2),
commentTotal: res.data.total commentTotal: res.data.total
}) })
let arr = this.data.comment let arr = this.data.comment

3
pages/info/postProductInfo/index.wxml

@ -70,7 +70,7 @@
<view class="iconfont"><text wx:for="{{item.rate}}" class="icon-xingxing"></text><text <view class="iconfont"><text wx:for="{{item.rate}}" class="icon-xingxing"></text><text
wx:for="{{5 - item.rate}}" style="color:#999" class="icon-xingxing"></text></view> wx:for="{{5 - item.rate}}" style="color:#999" class="icon-xingxing"></text></view>
</view> </view>
<view class="comment-date">{{item.create_time}}</view> <!-- <view class="comment-date">{{item.create_time}}</view> -->
</view> </view>
<view class="comment-content">{{item.content}}</view> <view class="comment-content">{{item.content}}</view>
<view wx:if="{{item.img_list}}"> <view wx:if="{{item.img_list}}">
@ -83,6 +83,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="sku">{{item.sku_name}}</view>
</navigator> </navigator>
<navigator url="/pages/list/comments/index?productid={{id}}" wx:if="{{comment.length>0}}" class="more-comment-btn"> <navigator url="/pages/list/comments/index?productid={{id}}" wx:if="{{comment.length>0}}" class="more-comment-btn">
查看全部点评<text class="iconfont icon-you"></text></navigator> 查看全部点评<text class="iconfont icon-you"></text></navigator>

6
pages/info/postProductInfo/index.wxss

@ -836,4 +836,10 @@ page {
} }
.all view:last-child{ .all view:last-child{
margin-top: 10rpx; margin-top: 10rpx;
}
.sku{
margin-left: 10rpx;
color: #666;
font-size: 24rpx;
margin-top: 8rpx;
} }

2
pages/info/sceneProductInfo/index.js

@ -128,7 +128,7 @@ Page({
item.rate = Number(item.rate) item.rate = Number(item.rate)
}) })
this.setData({ this.setData({
comment: res.data.list.splice(0, 3), comment: res.data.list.splice(0, 2),
commentTotal: res.data.total commentTotal: res.data.total
}) })
let arr = this.data.comment let arr = this.data.comment

6
pages/info/sceneProductInfo/index.wxml

@ -148,7 +148,8 @@
<view class="box"> <view class="box">
<view class="box-top"> <view class="box-top">
<text class="iconfont icon-tiwen"></text><text>游客点评</text><text class="score" wx:if="{{info && commentTotal>0}}">{{info.rate}}分</text> <text class="iconfont icon-tiwen"></text><text>游客点评</text><text class="score" wx:if="{{info && commentTotal>0}}">{{info.rate}}分</text>
<text class="all-comment-num">共{{commentTotal}}条</text> <navigator url="/pages/list/comments/index?sceneid={{id}}" style="display: inline;"> <text class="all-comment-num">共{{commentTotal}}条 <text style="font-family: fangsong; font-weight: bold;color: #000;">></text></text>
</navigator>
</view> </view>
<view class="empty-box" wx:if="{{!comment || comment.length==0}}"> <view class="empty-box" wx:if="{{!comment || comment.length==0}}">
<view>这里空空如也,快去点评吧!</view> <view>这里空空如也,快去点评吧!</view>
@ -161,7 +162,7 @@
<view class="nickname">{{item.nickname}}</view> <view class="nickname">{{item.nickname}}</view>
<view class="iconfont"><text wx:for="{{item.rate}}" class="icon-xingxing"></text><text wx:for="{{5 - item.rate}}" style="color:#999" class="icon-xingxing"></text></view> <view class="iconfont"><text wx:for="{{item.rate}}" class="icon-xingxing"></text><text wx:for="{{5 - item.rate}}" style="color:#999" class="icon-xingxing"></text></view>
</view> </view>
<view class="comment-date">{{item.create_time}}</view> <!-- <view class="comment-date">{{item.create_time}}</view> -->
</view> </view>
<view class="comment-content">{{item.content}}</view> <view class="comment-content">{{item.content}}</view>
<view wx:if="{{item.img_list}}"> <view wx:if="{{item.img_list}}">
@ -174,6 +175,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="sku">{{item.sku_name}}</view>
</navigator> </navigator>
<navigator url="/pages/list/comments/index?sceneid={{id}}" wx:if="{{comment.length>0}}" class="more-comment-btn"> <navigator url="/pages/list/comments/index?sceneid={{id}}" wx:if="{{comment.length>0}}" class="more-comment-btn">
查看全部点评<text class="iconfont icon-you"></text></navigator> 查看全部点评<text class="iconfont icon-you"></text></navigator>

12
pages/info/sceneProductInfo/index.wxss

@ -252,6 +252,7 @@ page {
.product-comment-top .comment-info .iconfont { .product-comment-top .comment-info .iconfont {
color: #D62828; color: #D62828;
font-size: 22rpx; font-size: 22rpx;
margin-top: 6rpx;
} }
.product-comment-top .comment-info .iconfont text { .product-comment-top .comment-info .iconfont text {
@ -285,6 +286,7 @@ page {
color: #999999; color: #999999;
font-size: 27rpx; font-size: 27rpx;
font-weight: 400; font-weight: 400;
font-family: PingFang SC !important;
} }
.ask-list .ask-item:nth-child(1) { .ask-list .ask-item:nth-child(1) {
@ -819,9 +821,17 @@ page {
text-align: center; text-align: center;
} }
.all view:first-child{ .all view:first-child{
font-size: 45rpx; font-size: 40rpx;
margin-top: 40rpx; margin-top: 40rpx;
} }
.all view:last-child{ .all view:last-child{
margin-top: 10rpx; margin-top: 10rpx;
font-size: 30rpx;
}
.sku{
margin-left: 10rpx;
color: #666;
font-size: 24rpx;
margin-top: 8rpx;
} }

1
pages/list/comments/index.js

@ -50,6 +50,7 @@ Page({
}) })
let arr = this.data.list let arr = this.data.list
arr.map((item)=>{ arr.map((item)=>{
item.rate = Number(item.rate)
if (item.img_list) { if (item.img_list) {
item.img_list = item.img_list.split(',') item.img_list = item.img_list.split(',')
}else{ }else{

6
pages/list/comments/index.wxml

@ -5,9 +5,15 @@
<view class="comment-top"> <view class="comment-top">
<image src="{{item.user.avatar}}" mode="aspectFill"></image> <image src="{{item.user.avatar}}" mode="aspectFill"></image>
<view class="author-info"> <view class="author-info">
<view class="top">
<view class="author-name">{{item.nickname}}</view> <view class="author-name">{{item.nickname}}</view>
<view class="author-time">{{item.create_time}}</view> <view class="author-time">{{item.create_time}}</view>
</view> </view>
<view class="bot">
<view class="iconfont"><text wx:for="{{item.rate}}" class="icon-xingxing"></text><text wx:for="{{5 - item.rate}}" style="color:#999" class="icon-xingxing"></text></view>
<view class="sku">{{item.sku_name}}</view>
</view>
</view>
</view> </view>
<view class="comment-detail">{{item.content}}</view> <view class="comment-detail">{{item.content}}</view>
<view wx:if="{{item.img_list}}"> <view wx:if="{{item.img_list}}">

21
pages/list/comments/index.wxss

@ -30,6 +30,7 @@
flex: 1; flex: 1;
font-size: 27rpx; font-size: 27rpx;
color: #333; color: #333;
} }
.author-time { .author-time {
color: #999999; color: #999999;
@ -50,4 +51,24 @@
height: 200rpx; height: 200rpx;
margin: 10rpx; margin: 10rpx;
border-radius: 8rpx; border-radius: 8rpx;
}
.iconfont {
color: #D62828;
font-size: 22rpx;
line-height: 30rpx;
}
.top{
display: flex;
justify-content: space-between;
}
.bot{
margin-top: 10rpx;
display: flex;
justify-content: left;
align-self: center;
}
.sku{
color: #666;
margin-left:20rpx ;
font-size: 24rpx;
} }
Loading…
Cancel
Save