down.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <template>
  2. <div class="list-box">
  3. <div class="title">My download</div>
  4. <div class="list">
  5. <div class="item" v-for="(v,i) in 3" :key="i">
  6. <img src="" alt="">
  7. <div class="item_content">
  8. <div class="item_content_title">
  9. <img src="" alt="">
  10. <div>
  11. China Industrial Park Industry Market In-depth Research and Investment Strategy Planning Report 2024-2030
  12. </div>
  13. </div>
  14. <div class="item_content_format"> Download file format: <span>PDF</span></div>
  15. </div>
  16. </div>
  17. </div>
  18. </div>
  19. </template>
  20. <script lang="ts" setup>
  21. import { ref, reactive, onMounted } from "vue";
  22. import { NButton, NPagination, NEmpty, createDiscreteApi } from "naive-ui";
  23. import { useRouter, useRoute } from "vue-router";
  24. const router = useRouter(); // 传递参数
  25. const props = defineProps({
  26. isMobile: {
  27. type: Boolean,
  28. default: false,
  29. },
  30. });
  31. const queryParams = reactive({
  32. pageNo: 1,
  33. pageSize: 5,
  34. });
  35. const pageData = ref({});
  36. onMounted(() => {
  37. getList();
  38. });
  39. const message = createDiscreteApi(["message"]);
  40. const getList = async () => {
  41. const { code, data } = await getMyDoen_Api(queryParams);
  42. if (code === 200) {
  43. pageData.value = data;
  44. }
  45. };
  46. const toDetail = (item: object) => {
  47. router.push({
  48. name: "bulletinDetail",
  49. params: {
  50. webTitle: item?.report?.webTitle + "-" + item?.report?.id,
  51. },
  52. });
  53. };
  54. // 改变页数
  55. const changePage = (page: number) => {
  56. document.documentElement.scrollTop = 0;
  57. queryParams.pageNo = page;
  58. getList();
  59. };
  60. </script>
  61. <style lang="scss" scoped>
  62. @import "~/assets/css/tool.scss";
  63. .list-box {
  64. .title {
  65. font-size: var(--size-24);
  66. font-family: Arial, Arial-Bold;
  67. font-weight: 700;
  68. color: #1a1a1a;
  69. line-height: var(--size-44);
  70. padding-bottom: var(--size-7);
  71. border-bottom: var(--size-1) solid #e6e6e6;
  72. }
  73. .list {
  74. margin-top: var(--size-45);
  75. .item {
  76. padding: var(--size-30) var(--size-25);
  77. display: flex;
  78. border: var(--size-1) solid #e6e6e6;
  79. margin-bottom: var(--size-30);
  80. &:last-child {
  81. margin-bottom: 0;
  82. }
  83. img {
  84. width: var(--size-148);
  85. height: var(--size-216);
  86. object-fit: contain;
  87. }
  88. .item_content {
  89. margin-left: var(--size-40);
  90. .item_content_title {
  91. font-size: var(--size-21);
  92. font-family: Arial, Arial-Regular;
  93. color: #1a1a1a;
  94. line-height: var(--size-28);
  95. margin-top: var(--size-10);
  96. overflow: hidden;
  97. text-overflow: ellipsis;
  98. display: -webkit-box;
  99. -webkit-line-clamp: 2;
  100. -webkit-box-orient: vertical;
  101. > img {
  102. display: none;
  103. }
  104. }
  105. .item_content_format {
  106. display: flex;
  107. font-size: var(--size-16);
  108. font-family: Arial, Arial-Regular;
  109. color: #1a1a1a;
  110. line-height: var(--size-44);
  111. letter-spacing: 0.05px;
  112. span {
  113. color: #808080;
  114. }
  115. }
  116. }
  117. }
  118. }
  119. }
  120. @include responseTo("phone") {
  121. .list-box {
  122. .list {
  123. margin-top: var(--size-20);
  124. .item {
  125. padding: var(--size-10);
  126. > img {
  127. display: none;
  128. }
  129. .item_content {
  130. padding: var(--size-10);
  131. margin: 0;
  132. .item_content_title {
  133. display: flex;
  134. > div {
  135. font-size: var(--size-18);
  136. line-height: var(--size-26);
  137. overflow: hidden;
  138. text-overflow: ellipsis;
  139. display: -webkit-box;
  140. -webkit-line-clamp: 4;
  141. -webkit-box-orient: vertical;
  142. }
  143. > img {
  144. width: var(--size-74);
  145. height: var(--size-108);
  146. object-fit: contain;
  147. margin-right: var(--size-10);
  148. display: block;
  149. }
  150. }
  151. .item_content_format {
  152. font-size: var(--size-14);
  153. }
  154. .item_content_amount {
  155. font-size: var(--size-14);
  156. line-height: var(--size-30);
  157. span {
  158. font-size: var(--size-26);
  159. }
  160. }
  161. }
  162. .btnBox {
  163. position: static;
  164. width: 100%;
  165. justify-content: center;
  166. padding-bottom: var(--size-20);
  167. }
  168. }
  169. }
  170. }
  171. }
  172. </style>