index.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <script setup lang="ts">
  2. const { themeVars } = storeToRefs(useManualThemeStore())
  3. definePage({
  4. name: 'common-feedback-list',
  5. islogin: true,
  6. style: {
  7. navigationBarTitleText: '我的反馈',
  8. },
  9. })
  10. const { data: feedbackList, isLastPage, page } = usePagination(
  11. (pageNum, pageSize) => Apis.sys.myOpinionFeedback({ params: { pageNum, pageSize } }),
  12. { data: resp => resp.data?.list, initialPage: 1, initialPageSize: 10, immediate: true, append: true },
  13. )
  14. function previewImage(urls: string[], current: string) {
  15. uni.previewImage({ current, urls })
  16. }
  17. onReachBottom(() => {
  18. if (!isLastPage.value) {
  19. page.value++
  20. }
  21. })
  22. </script>
  23. <template>
  24. <view class="page-wraper px-24rpx">
  25. <view v-for="(item, index) in feedbackList" :key="item.id">
  26. <view v-if="index === 0" class="h-20rpx" />
  27. <view class="mb-20rpx rounded-32rpx bg-#FFF p-24rpx">
  28. <view class="relative mt-42rpx flex items-center justify-between">
  29. <view class="absolute left-[-24rpx] px-24rpx py-14rpx text-#FFF" :style="{ backgroundColor: themeVars.colorTheme, borderTopRightRadius: '16rpx', borderBottomRightRadius: '16rpx' }">
  30. {{ item.opinionType }}
  31. </view>
  32. <view class="absolute right-0 text-28rpx text-#AAA">
  33. {{ item.createTime }}
  34. </view>
  35. </view>
  36. <view class="mt-54rpx text-28rpx text-#AAA">
  37. {{ item.feedbackDesc }}
  38. </view>
  39. <view v-if="item.img" class="mt-50rpx flex items-center gap-20rpx">
  40. <image
  41. v-for="(url, imgIndex) in item.img.split(',')"
  42. :key="imgIndex"
  43. class="h-120rpx w-120rpx rounded-32rpx"
  44. :src="url"
  45. mode="scaleToFill"
  46. @click="previewImage(item.img.split(','), url)"
  47. />
  48. </view>
  49. <view v-if="item.replyContent" class="mt-20rpx rounded-16rpx bg-#F0F0F0 p-20rpx text-24rpx">
  50. <text>回复:{{ item.replyContent }}</text>
  51. <text class="py-60rpx" />
  52. <text class="ml-120rpx text-#AAA">
  53. {{ item.replyTime }}
  54. </text>
  55. </view>
  56. </view>
  57. </view>
  58. <StatusTip v-if="!feedbackList.length" tip="暂无反馈" />
  59. </view>
  60. </template>
  61. <style lang="scss" scoped></style>