guide.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <template>
  2. <view class="container">
  3. <view class="list-box">
  4. <view class="list-item-box" v-for="item in list" :key="item.id" @click="onGuideClick(item)">
  5. <view class="main-box">
  6. <view class="icon-box">
  7. <cover-image class="icon" :src="`https://sylwt.top/api/visitor/resources/image?name=/ydl/menber-center/notice/icon-1.jpg`"></cover-image>
  8. </view>
  9. <view class="content-box">
  10. <view class="title">
  11. {{item.title}}
  12. </view>
  13. <view class="text">
  14. {{item.desc}}
  15. </view>
  16. </view>
  17. <view class="other-box">
  18. <view class="date">
  19. {{item.date}}
  20. </view>
  21. </view>
  22. </view>
  23. <view class="line-box"></view>
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script setup>
  29. import { ref } from 'vue'
  30. import { onLoad } from '@dcloudio/uni-app'
  31. const uToast = ref()
  32. const searchInputStyle = {
  33. backgroundColor: '#E5E5E5'
  34. }
  35. const searchForm = ref({
  36. keyword: ''
  37. })
  38. const list = ref([
  39. {
  40. "id": "1",
  41. "title": "申请加入协会指南",
  42. "desc": "想要加入我们的协会吗?请填写申请表并提交至办公室,审核后会通知您结果。",
  43. "date": "2023-10-01"
  44. },
  45. {
  46. "id": "2",
  47. "title": "报销流程说明",
  48. "desc": "如需进行费用报销,请准备相关发票,填写报销申请表并交由财务部门审批。",
  49. "date": "2023-09-15"
  50. },
  51. {
  52. "id": "3",
  53. "title": "会议室预约流程",
  54. "desc": "欲预约会议室,请访问协会官网填写预约表格,确认后将收到预约确认邮件。",
  55. "date": "2023-10-05"
  56. },
  57. {
  58. "id": "4",
  59. "title": "活动报名流程",
  60. "desc": "参加活动需要提前报名,可以通过协会公众号扫码填写报名表,截止日期为活动前两天。",
  61. "date": "2023-10-10"
  62. },
  63. {
  64. "id": "5",
  65. "title": "投诉建议提交指引",
  66. "desc": "若有意见或建议,请下载投诉建议表,填写完毕后发送至协会邮箱,我们将及时处理并反馈您的意见。",
  67. "date": "2023-10-12"
  68. }
  69. ]
  70. )
  71. function onGuideClick(guide) {
  72. uni.navigateTo({
  73. url: `/pages/guide/guideDetail/guideDetail?id=${guide.id}&title=${guide.title}`
  74. })
  75. }
  76. </script>
  77. <style lang="scss" scoped>
  78. .container {
  79. height: 100vh;
  80. width: 100vw;
  81. background-color: $uni-bg-color;
  82. padding: 0 20rpx;
  83. .search-box {
  84. margin-bottom: 20rpx;
  85. ::v-deep(.u-search) {
  86. background-color: #e5e5e5;
  87. border-radius: 50rpx;
  88. .u-action {
  89. width: 18%;
  90. background-color: $uni-color-primary;
  91. border-radius: 50rpx;
  92. color: $uni-text-color-inverse;
  93. margin-right: 8rpx;
  94. font-size: 28rpx;
  95. line-height: 50rpx;
  96. letter-spacing: 3rpx;
  97. text-align: center;
  98. }
  99. }
  100. }
  101. .list-box {
  102. padding: 0 20rpx;
  103. .list-item-box {
  104. .main-box {
  105. display: flex;
  106. justify-content: space-between;
  107. align-items: center;
  108. padding: 30rpx 0;
  109. &:active {
  110. background-color: $uni-bg-color-hover;
  111. }
  112. .icon-box {
  113. width: 15%;
  114. display: flex;
  115. justify-content: center;
  116. align-items: center;
  117. .icon {
  118. width: 70rpx;
  119. height: 70rpx;
  120. }
  121. }
  122. .content-box {
  123. width: 67%;
  124. display: flex;
  125. flex-direction: column;
  126. justify-content: space-around;
  127. gap: 10rpx;
  128. .title {
  129. height: calc(70% - 5rpx);
  130. font-size: $uni-title-font-size-2;
  131. font-weight: bold;
  132. }
  133. .text {
  134. height: calc(30% - 5rpx);
  135. font-size: $uni-font-size-3;
  136. color: $uni-text-color-grey;
  137. @include text-overflow();
  138. }
  139. }
  140. .other-box {
  141. width: 18%;
  142. display: flex;
  143. flex-direction: column;
  144. justify-content: space-around;
  145. align-items: center;
  146. gap: 10rpx;
  147. .date {
  148. font-size: $uni-font-size-3;
  149. color: $uni-text-color-grey;
  150. }
  151. .tag {
  152. font-size: $uni-font-size-3;
  153. width: 42rpx;
  154. background-color: $uni-color-error;
  155. color: $uni-text-color-inverse;
  156. border-radius: 20rpx;
  157. text-align: center;
  158. }
  159. }
  160. }
  161. .line-box {
  162. height: 1rpx;
  163. width: 80%;
  164. background-color: #E5E5E5;
  165. margin: 0 auto;
  166. }
  167. }
  168. }
  169. }
  170. </style>