index.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <template>
  2. <view class="h-screen overflow-y-scroll header box-border">
  3. <wd-navbar
  4. title="评价管理"
  5. fixed
  6. placeholder
  7. safeAreaInsetTop
  8. custom-style="background-color: transparent !important"
  9. :bordered="false"
  10. leftArrow
  11. @click-left="handleClickLeft"
  12. ></wd-navbar>
  13. <view class="px-32rpx">
  14. <view
  15. class="bg-white p-24rpx mb-20rpx rounded-32rpx"
  16. v-for="item in data"
  17. :key="item.id"
  18. >
  19. <view class="text-[rgba(0,0,0,0.7)] text-28rpx">评价(23)</view>
  20. <wd-divider color="#F0F0F0" custom-class="custom-divider"></wd-divider>
  21. <view class="flex items-center justify-between mt-2">
  22. <view class="flex items-center text-24rpx">
  23. <image
  24. src="https://pic1.arkoo.com/56D0B40F99F841DF8A2425762AE2565D/picture/o_1i4qop009177v1tgf14db15he1iaj1is.jpg"
  25. class="w-60rpx h-60rpx rounded-full"
  26. ></image>
  27. <view class="ml-20rpx text-[rgba(0,0,0,0.9)]">张三</view>
  28. <view class="ml-20rpx text-[rgba(0,0,0,0.3)]">2021-01-01</view>
  29. </view>
  30. <view
  31. class="flex items-center justify-center text-white text-28rpx bg-#0074FF px-23rpx py-4rpx rounded-8rpx"
  32. >待审核</view
  33. >
  34. </view>
  35. <view class="flex items-center mt-16rpx">
  36. <text class="text-[rgba(0,0,0,0.3)] text-24rpx mr-20rpx">4.0</text>
  37. <wd-rate v-model="rate" readonly />
  38. </view>
  39. <view class="mt-20rpx text-[rgba(0,0,0,0.9)] text-28rpx"
  40. >詹姆四对孩子很有耐心,也非常照顾小朋友的情绪, 值得推荐!</view
  41. >
  42. <view class="mt-20rpx flex items-center justify-between">
  43. <image
  44. src="https://pic1.arkoo.com/56D0B40F99F841DF8A2425762AE2565D/picture/o_1i4qop009177v1tgf14db15he1iaj1is.jpg"
  45. v-for="item in 3"
  46. class="w-202rpx h-200rpx rounded-32rpx"
  47. ></image>
  48. </view>
  49. <view class="mt-24rpx">
  50. <view class="bg-#F6F6F6 rounded-16rpx flex p-20rpx">
  51. <view class="text-[rgba(0,0,0,0.3)] text-24rpx">商家回复:</view>
  52. <view
  53. class="text-24rpx w-68%"
  54. :class="[currentId == item.id ? '' : 'truncate ']"
  55. >谢谢您的评价,我们会越来越好,谢谢额外企鹅王企鹅我去额外企鹅轻微青sadsadasdsadasdasdasdasdasd蛙</view
  56. >
  57. <view
  58. class="text-[rgba(0,0,0,0.3)] text-24rpx flex-1 text-center"
  59. @click="handleChange(item.id)"
  60. >{{ currentId == item.id ? "折叠" : "展开" }}</view
  61. >
  62. </view>
  63. </view>
  64. <view class="flex items-center justify-end mt-3">
  65. <view
  66. class="flex items-center justify-center text-white text-28rpx bg-#FDD143 px-23rpx py-4rpx rounded-8rpx"
  67. @click="handleHf"
  68. >回复</view
  69. >
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. <wd-message-box selector="wd-message-box-slot" :closeOnClickModal="false">
  75. <view class="flex items-center justify-center w-full">
  76. <view
  77. class="rounded-32rpx border overflow-hidden w-80% h-236rpx border-#ccc border-solid py-30rpx flex items-center justify-center"
  78. >
  79. <textarea
  80. v-model="msgContent"
  81. placeholder="请输入回复内容"
  82. :show-confirm-bar="false"
  83. :maxlength="-1"
  84. class="w-300rpx p-30rpx overflow-y-scroll h-200rpx"
  85. />
  86. </view>
  87. </view>
  88. </wd-message-box>
  89. </template>
  90. <script setup lang="ts">
  91. import { useMessage } from "wot-design-uni";
  92. const message = useMessage("wd-message-box-slot");
  93. const msgContent = ref();
  94. const rate = ref(4);
  95. const currentId = ref();
  96. const data = ref([
  97. { id: 0 },
  98. { id: 1 },
  99. { id: 2 },
  100. { id: 3 },
  101. { id: 4 },
  102. { id: 5 },
  103. { id: 6 },
  104. { id: 7 },
  105. { id: 8 },
  106. ]);
  107. function handleChange(id: number) {
  108. currentId.value == id ? (currentId.value = null) : (currentId.value = id);
  109. }
  110. function handleClickLeft() {
  111. uni.navigateBack();
  112. }
  113. function handleHf() {
  114. message
  115. .confirm({
  116. title: "回复",
  117. confirmButtonText: "提交",
  118. closeOnClickModal: false,
  119. })
  120. .then(() => {})
  121. .catch((error) => {
  122. console.log(error);
  123. });
  124. }
  125. </script>
  126. <style>
  127. .custom-divider {
  128. padding: 0 !important;
  129. }
  130. </style>
  131. <route lang="json">
  132. {
  133. "name": "Evaluation",
  134. "style": {
  135. "navigationBarTitleText": "评价",
  136. "navigationStyle": "custom"
  137. }
  138. }
  139. </route>