down.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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: 24px;
  66. font-family: Arial, Arial-Bold;
  67. font-weight: 700;
  68. color: #1a1a1a;
  69. line-height: 44px;
  70. padding-bottom: 7px;
  71. border-bottom: 1px solid #e6e6e6;
  72. }
  73. .list {
  74. margin-top: 45px;
  75. .item {
  76. padding: 30px 25px;
  77. display: flex;
  78. border: 1px solid #e6e6e6;
  79. margin-bottom: 30px;
  80. &:last-child {
  81. margin-bottom: 0;
  82. }
  83. img {
  84. width: 148px;
  85. height: 216px;
  86. object-fit: contain;
  87. }
  88. .item_content {
  89. margin-left: 40px;
  90. .item_content_title {
  91. font-size: 21px;
  92. font-family: Arial, Arial-Regular;
  93. color: #1a1a1a;
  94. line-height: 28px;
  95. margin-top: 10px;
  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: 16px;
  108. font-family: Arial, Arial-Regular;
  109. color: #1a1a1a;
  110. line-height: 44px;
  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: 20px;
  124. .item {
  125. padding: 10px;
  126. > img {
  127. display: none;
  128. }
  129. .item_content {
  130. padding: 10px;
  131. margin: 0;
  132. .item_content_title {
  133. display: flex;
  134. > div {
  135. font-size: 18px;
  136. line-height: 26px;
  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: 74px;
  145. height: 108px;
  146. object-fit: contain;
  147. margin-right: 10px;
  148. }
  149. }
  150. .item_content_format {
  151. font-size: 14px;
  152. }
  153. .item_content_amount {
  154. font-size: 14px;
  155. line-height: 30px;
  156. span {
  157. font-size: 26px;
  158. }
  159. }
  160. }
  161. .btnBox {
  162. position: static;
  163. width: 100%;
  164. justify-content: center;
  165. padding-bottom: 20px;
  166. }
  167. }
  168. }
  169. }
  170. }
  171. </style>