commemt.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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>
  30. </template>
  31. <script>
  32. import assess from '@/component/assess.vue' // 评价列表
  33. export default{
  34. components: {
  35. assess
  36. },
  37. data(){
  38. return {
  39. goodId: 0,
  40. assesslist:[],
  41. store_id: 0
  42. }
  43. },
  44. onLoad(options) {
  45. this.goodId = options.goodId; // 商品Id
  46. this.store_id = options.store_id;
  47. this.getassess();
  48. },
  49. methods: {
  50. getassess() {
  51. this.request({
  52. url: '/api/index.php?do=getevaluategoods',
  53. method: 'post',
  54. data: {
  55. goodsid: this.goodId
  56. },
  57. success: (res) => {
  58. this.assesslist = res.data;
  59. }
  60. })
  61. }
  62. }
  63. }
  64. </script>
  65. <style>
  66. </style>