鸿宇研学生前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

114 lines
2.2 KiB

  1. <template>
  2. <view class="page__view">
  3. <navbar title="我的评价" leftClick @leftClick="$utils.navigateBack" bgColor="#FFFFFF" />
  4. <view class="main">
  5. <view class="list" v-if="total">
  6. <view class="list-item" v-for="item in list" :key="item.id">
  7. <view class="flex list-item-header">
  8. <view class="flex mark">
  9. <image class="icon" src="@/static/image/icon-mark-highlight.png" mode="widthFix"></image>
  10. </view>
  11. <view class="title">
  12. {{ `来自 ${item.productName}` }}
  13. </view>
  14. </view>
  15. <commentCard :data="item"></commentCard>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. import mixinsList from '@/mixins/list.js'
  23. import commentCard from '@/pages_order/comment/commentCard.vue'
  24. export default {
  25. mixins: [mixinsList],
  26. components: {
  27. commentCard,
  28. },
  29. data() {
  30. return {
  31. // todo
  32. // mixinsListApi: '',
  33. list: [],
  34. total: 0,
  35. }
  36. },
  37. onLoad() {
  38. this.getData()
  39. },
  40. methods: {
  41. async getData() {
  42. try {
  43. this.list = await this.$fetch('queryMyCommentList')
  44. this.total = this.list.length
  45. } catch (err) {
  46. }
  47. },
  48. },
  49. }
  50. </script>
  51. <style scoped lang="scss">
  52. .page__view {
  53. background: $uni-bg-color;
  54. }
  55. .main {
  56. padding: 40rpx;
  57. }
  58. .list {
  59. padding: 32rpx;
  60. background: #FFFFFF;
  61. border-radius: 24rpx;
  62. &-item {
  63. padding-bottom: 40rpx;
  64. border-bottom: 2rpx solid #F5F5F5;
  65. & + & {
  66. margin-top: 40rpx;
  67. }
  68. &:last-child {
  69. border: none;
  70. }
  71. &-header {
  72. justify-content: flex-start;
  73. column-gap: 24rpx;
  74. margin-bottom: 14rpx;
  75. .mark {
  76. width: 36rpx;
  77. height: 36rpx;
  78. background: linear-gradient(to right, #21FEEC, #019AF9);
  79. border-radius: 50%;
  80. .icon {
  81. width: 24rpx;
  82. height: auto;
  83. }
  84. }
  85. .title {
  86. flex: 1;
  87. font-size: 30rpx;
  88. font-weight: 600;
  89. line-height: 1.4;
  90. color: #00A9FF;
  91. }
  92. }
  93. }
  94. }
  95. </style>