commemt.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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 style="width: 100%;height: 100%;" :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.geval_scores"
  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. <image v-for="(items, indexs) in item.images" @click="shoupicture(items)" :key="indexs" :src="items"
  29. style="width: 100upx;height: 100upx;float:left;padding-right: 20upx;"></image>
  30. </view>
  31. </view>
  32. </view>
  33. <view style="text-align: center;" v-if="assesslist.length == 0">
  34. 暂无评价
  35. </view>
  36. <unipopup :images="images" :show="ishow"/>
  37. </view>
  38. </template>
  39. <script>
  40. import assess from '@/component/assess.vue' // 评价列表
  41. import unipopup from '@/component/openpictrue.vue'
  42. export default{
  43. components: {
  44. assess,
  45. unipopup
  46. },
  47. data(){
  48. return {
  49. goodId: 0,
  50. ishow: false,
  51. images: '',
  52. assesslist:[],
  53. store_id: 0
  54. }
  55. },
  56. onLoad(options) {
  57. this.goodId = options.goodId; // 商品Id
  58. this.store_id = options.store_id;
  59. this.getassess();
  60. uni.$on('changshow', (e) => {
  61. this.changeshow();
  62. })
  63. // changshow
  64. },
  65. methods: {
  66. shoupicture(e) {
  67. this.images = e;
  68. this.ishow = true;
  69. },
  70. changeshow() {
  71. this.ishow = false;
  72. },
  73. getassess() {
  74. this.request({
  75. url: '/api/index.php?do=getevaluategoods',
  76. method: 'post',
  77. data: {
  78. goodsid: this.goodId
  79. },
  80. success: (res) => {
  81. res.data.forEach(item => {
  82. item.images = item.geval_image.split(',');
  83. })
  84. this.assesslist = res.data;
  85. }
  86. })
  87. }
  88. }
  89. }
  90. </script>
  91. <style>
  92. </style>