图书馆小程序
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.

128 lines
3.0 KiB

2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
1 month ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
  1. <template>
  2. <view class="feedback-page">
  3. <view class="feedback-list">
  4. <view class="empty" v-if="feedbackList.length === 0">
  5. <uni-icons style="margin-left: 20px;" custom-prefix="iconfont" type="icon-kongshuju" size="80" color="#ccc"></uni-icons>
  6. <text style="margin-top: 20px;">暂无留言</text>
  7. </view>
  8. <view
  9. class="feedback-item"
  10. v-for="(item, index) in feedbackList"
  11. :key="index"
  12. @click="goDetail(item)"
  13. >
  14. <view class="feedback-content">
  15. <text class="subject">{{ item.subject }}</text>
  16. <text class="create-time">{{ item.createTime }}</text>
  17. </view>
  18. </view>
  19. </view>
  20. <view class="write-btn-box">
  21. <button class="write-btn" @click="goWriteComment">去留言</button>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. export default {
  27. data() {
  28. return {
  29. feedbackList: [
  30. {
  31. id: 1,
  32. subject: '建议增加更多儿童绘本',
  33. content: '图书馆的儿童区绘本种类不够丰富,希望能增加更多适合3-6岁儿童的绘本读物。',
  34. createTime: '2026-05-10 14:30',
  35. reply: '感谢您的建议!我们已将增加儿童绘本纳入采购计划,预计下季度会新增500余册绘本。'
  36. },
  37. {
  38. id: 2,
  39. subject: '自习室空调温度过低',
  40. content: '最近自习室空调开得太冷了,希望能适当调高温度,或者提供毯子。',
  41. createTime: '2026-05-08 09:15',
  42. reply: ''
  43. },
  44. {
  45. id: 3,
  46. subject: '希望延长周末开放时间',
  47. content: '周末很多人想来看书,但是下午5点就关门了,希望能够延长到晚上8点。',
  48. createTime: '2026-05-05 16:45',
  49. reply: '您的建议已收悉,我们正在研究调整开放时间的可行性,感谢支持。'
  50. }
  51. ]
  52. };
  53. },
  54. methods: {
  55. goWriteComment() {
  56. uni.navigateTo({
  57. url: '/subpkg/pages/feedback/feedback'
  58. });
  59. },
  60. goDetail(item) {
  61. uni.navigateTo({
  62. url: '/subpkg/pages/feedback-detail/feedback-detail?item=' + encodeURIComponent(JSON.stringify(item))
  63. });
  64. }
  65. }
  66. };
  67. </script>
  68. <style lang="scss" scoped>
  69. .feedback-page {
  70. background-color: #f7f8fa;
  71. min-height: 100vh;
  72. }
  73. .feedback-list {
  74. height: calc(100vh - 80px);
  75. overflow-y: scroll;
  76. padding: 10px;
  77. }
  78. .empty {
  79. height: calc(100vh - 200px);
  80. }
  81. .feedback-item {
  82. background-color: #fff;
  83. border-radius: 8px;
  84. padding: 15px;
  85. margin-bottom: 10px;
  86. box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
  87. }
  88. .feedback-content {
  89. line-height: 1.6;
  90. }
  91. .subject {
  92. font-size: 15px;
  93. font-weight: bold;
  94. color: #333;
  95. display: block;
  96. margin-bottom: 8px;
  97. }
  98. .create-time {
  99. font-size: 12px;
  100. color: #999;
  101. display: block;
  102. text-align: right;
  103. }
  104. .write-btn-box {
  105. position: fixed;
  106. bottom: 20px;
  107. left: 0;
  108. right: 0;
  109. padding: 0 15px;
  110. }
  111. .write-btn {
  112. background-color: #01a4fe;
  113. color: #fff;
  114. border-radius: 25px;
  115. font-size: 14px;
  116. padding: 4px 0;
  117. }
  118. </style>