index.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <view class="content">
  3. <view class="input-box">
  4. <image src="/static/policy/u377.png" alt="" />
  5. <input type="text" placeholder="请输入政策关键词搜索" />
  6. </view>
  7. <view class="notices">
  8. <view
  9. class="notice-content-box"
  10. v-for="(item, index) in noticeList"
  11. :key="index"
  12. @click="goNoticeDeatil(item.id)"
  13. >
  14. <image
  15. :src="item.url"
  16. mode="aspectFit"
  17. style="width: 34px; height: 34px"
  18. ></image>
  19. <view class="notice-content display-around-column">
  20. <view class="notice-content-font">{{ item.title }}</view>
  21. <view class="notice-content-time">{{ item.time }}</view>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. export default {
  29. data() {
  30. return {
  31. noticeList: [
  32. {
  33. url: "/static/navList/policy-icon.png",
  34. title: "政策速览 | 小微企业、个体工商户税费...",
  35. time: "2021-08-05",
  36. },
  37. {
  38. url: "/static/navList/activity-icon.png",
  39. title: "活动预告 | 想了解跨境电商?8月5日带...",
  40. time: "2021-08-04",
  41. },
  42. {
  43. url: "/static/navList/notice-icon.png",
  44. title: "通知公告 | 2022年首批次重点新材料扶...",
  45. time: "2021-08-03",
  46. },
  47. ],
  48. };
  49. },
  50. methods: {
  51. goNoticeDeatil(id) {
  52. uni.navigateTo({
  53. url: "/pages/notice/notice_deatil?id=" + id,
  54. });
  55. },
  56. },
  57. };
  58. </script>
  59. <style lang="scss" scoped>
  60. .content {
  61. display: flex;
  62. flex-direction: column;
  63. align-items: center;
  64. justify-content: center;
  65. width: 100%;
  66. .notices {
  67. display: flex;
  68. // justify-content: center;
  69. align-items: center;
  70. flex-direction: column;
  71. .notice-content-box {
  72. width: 100%;
  73. display: flex;
  74. padding: 30rpx;
  75. background-color: #ffffff;
  76. box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);
  77. border-radius: 32rpx;
  78. margin-top: 20rpx;
  79. justify-content: space-between;
  80. .notice-content-font {
  81. font-size: 26rpx;
  82. color: #0d1937;
  83. font-weight: 600;
  84. overflow: hidden;
  85. text-overflow: ellipsis;
  86. white-space: nowrap;
  87. }
  88. .attract-content {
  89. color: #697594;
  90. font-weight: 600;
  91. font-size: 20rpx;
  92. margin-top: 8rpx;
  93. overflow: hidden;
  94. text-overflow: ellipsis;
  95. white-space: nowrap;
  96. }
  97. .notice-content-time {
  98. font-size: 18rpx;
  99. letter-spacing: 0.02em;
  100. color: #cfcfcf;
  101. margin-right: 14rpx;
  102. }
  103. }
  104. }
  105. .input-box {
  106. width: 100%;
  107. height: 100rpx;
  108. display: flex;
  109. justify-content: center;
  110. align-items: center;
  111. position: relative;
  112. image {
  113. position: absolute;
  114. left: 72rpx;
  115. width: 40rpx;
  116. height: 40rpx;
  117. }
  118. input {
  119. background-color: rgba($color: #000000, $alpha: 0.1);
  120. width: 90%;
  121. height: 70%;
  122. border-radius: 50rpx;
  123. padding: 3rpx;
  124. font-size: 26rpx;
  125. padding-left: 80rpx;
  126. box-sizing: border-box;
  127. }
  128. }
  129. }
  130. </style>