footprint.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <template>
  2. <div class="goods-search flex-col bg-white">
  3. <div class="nav-container flex">
  4. <el-breadcrumb style="flex: 1;" separator="/">
  5. <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
  6. <el-breadcrumb-item class="line1" style="max-width: 800px;">我的足迹</el-breadcrumb-item>
  7. </el-breadcrumb>
  8. </div>
  9. <div class="content">
  10. <!-- 搜索结果列表 -->
  11. <div v-if="talentsList.length > 0">
  12. <talents-list :list="talentsList" />
  13. <div class="pagination flex row-center" style="padding-bottom: 38px" v-if="count">
  14. <el-pagination background hide-on-single-page layout="prev, pager, next" :page-size="9"
  15. :total="count" prev-text="上一页" next-text="下一页" @current-change="changePage">
  16. </el-pagination>
  17. </div>
  18. </div>
  19. <null-data v-else :img="require('@/static/images/goods_null.png')" text="暂无数据~"></null-data>
  20. </div>
  21. </div>
  22. </template>
  23. <script>
  24. export default {
  25. data() {
  26. return {
  27. page: 1,
  28. talentsList: [],
  29. };
  30. },
  31. watch: {},
  32. created() {
  33. this.getTalents();
  34. },
  35. mounted() {},
  36. computed: {},
  37. methods: {
  38. changePage(current) {
  39. this.page = current
  40. this.getTalents()
  41. },
  42. async getTalents() {
  43. const params = {
  44. page_size: 9,
  45. page_no: this.page
  46. }
  47. const {
  48. code,
  49. data,
  50. _meta
  51. } = await this.$get('article/footprint', {
  52. params,
  53. })
  54. if (code == 1) {
  55. this.talentsList = data
  56. this.count = _meta.totalCount
  57. }
  58. },
  59. }
  60. };
  61. </script>
  62. <style lang="scss">
  63. page {
  64. height: 100%;
  65. padding: 0;
  66. }
  67. .goods-search {
  68. height: 100%;
  69. position: relative;
  70. .header-wrap {
  71. position: relative;
  72. z-index: 999;
  73. .search {
  74. background: #fff;
  75. box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.03);
  76. position: relative;
  77. z-index: 1;
  78. padding: 0 30px 20px;
  79. }
  80. }
  81. .nav-container {
  82. padding: 24px 24px 0;
  83. }
  84. .search-content {
  85. // position: absolute;
  86. width: 100%;
  87. height: 100%;
  88. // padding-top: 100px;
  89. z-index: 100;
  90. .search-words {
  91. padding-left: 24px;
  92. padding-bottom: 20px;
  93. .title {
  94. padding: 26px 0;
  95. // font-size: 32px;
  96. font-weight: 500;
  97. }
  98. .words {
  99. .item {
  100. line-height: 33px;
  101. height: 33px;
  102. padding: 0 24px;
  103. background: #F7F8FA;
  104. border-radius: 8px 8px 8px 8px;
  105. // font-size: 24px;
  106. color: #666666;
  107. cursor: pointer;
  108. }
  109. }
  110. }
  111. }
  112. .content {
  113. flex: 1;
  114. min-height: 0;
  115. .goods-list {
  116. overflow: hidden;
  117. }
  118. }
  119. }
  120. </style>