index.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <view class="agreement-list-page">
  3. <nav-bar title="协议列表"></nav-bar>
  4. <view class="list-container">
  5. <view class="agreement-item" v-for="item in agreements" :key="item.id" @click="goToDetail(item)">
  6. <view class="item-info">
  7. <text class="item-title">{{ item.title }}</text>
  8. <text class="item-date">更新时间:{{ item.updateTime }}</text>
  9. </view>
  10. <uni-icons type="right" size="14" color="#ccc"></uni-icons>
  11. </view>
  12. </view>
  13. </view>
  14. </template>
  15. <script setup>
  16. import { ref } from 'vue'
  17. import navBar from '@/components/nav-bar/index.vue'
  18. const agreements = ref([
  19. { id: 1, title: '隐私政策', updateTime: '2024-01-15' },
  20. { id: 2, title: '用户服务协议', updateTime: '2024-01-15' },
  21. { id: 3, title: '商家托运协议', updateTime: '2024-02-01' },
  22. { id: 4, title: '宠物洗护服务规范', updateTime: '2024-02-01' }
  23. ])
  24. const goToDetail = (item) => uni.navigateTo({ url: `/pages/my/agreement/detail/index?title=${item.title}` })
  25. </script>
  26. <style lang="scss" scoped>
  27. .agreement-list-page {
  28. min-height: 100vh;
  29. background: #f7f8fa;
  30. }
  31. .list-container {
  32. padding: 24rpx;
  33. }
  34. .agreement-item {
  35. display: flex;
  36. align-items: center;
  37. background: #fff;
  38. border-radius: 20rpx;
  39. padding: 32rpx;
  40. margin-bottom: 16rpx;
  41. }
  42. .item-info {
  43. flex: 1;
  44. }
  45. .item-title {
  46. display: block;
  47. font-size: 30rpx;
  48. color: #333;
  49. font-weight: 600;
  50. margin-bottom: 8rpx;
  51. }
  52. .item-date {
  53. display: block;
  54. font-size: 24rpx;
  55. color: #999;
  56. }
  57. </style>