commemt.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <view>
  3. <view v-for="(item,index) in assesslist" :key="index" class="uni-padding-wrap" style="border-bottom: 1px solid #EEEEEE;padding-bottom: 10upx;">
  4. <view class="uni-comment">
  5. <view class="uni-comment-list">
  6. <view class="uni-comment-face"><image :src="item.member_avatar"></image></view>
  7. <view class="uni-comment-body">
  8. <view class="uni-comment-top">
  9. <text style="font-size: 28upx;color: #303133">{{item.member_truename}}</text>
  10. <uniIcon type="star" size="16"></uniIcon>
  11. </view>
  12. <view class="uni-comment-date">
  13. <text style="color: #909399;font-size: 20upx;">{{item.geval_addtime}}</text>
  14. </view>
  15. </view>
  16. <view>
  17. <van-rate
  18. :value="item.satisfaction"
  19. void-icon="star"
  20. void-color="#eee"
  21. color="#ee0a24"
  22. readonly='true'
  23. />
  24. </view>
  25. </view>
  26. <view style="color: #303133;font-size: 28upx;" class="uni-comment-content">{{item.geval_content}}</view>
  27. </view>
  28. </view>
  29. <view style="text-align: center;" v-if="assesslist.length == 0">
  30. 暂无评价
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. import assess from '@/component/assess.vue' // 评价列表
  36. export default{
  37. components: {
  38. assess
  39. },
  40. data(){
  41. return {
  42. goodId: 0,
  43. assesslist:[],
  44. store_id: 0
  45. }
  46. },
  47. onLoad(options) {
  48. this.goodId = options.goodId; // 商品Id
  49. this.store_id = options.store_id;
  50. this.getassess();
  51. },
  52. methods: {
  53. getassess() {
  54. this.request({
  55. url: '/api/index.php?do=getevaluategoods',
  56. method: 'post',
  57. data: {
  58. goodsid: this.goodId
  59. },
  60. success: (res) => {
  61. this.assesslist = res.data;
  62. }
  63. })
  64. }
  65. }
  66. }
  67. </script>
  68. <style>
  69. </style>