morningAll.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <view class="container morning-all-content">
  3. <view class="content-ul" v-for="item in collectList" :key="item.Id" @click="lookDetails(item)">
  4. <view class="title">{{ item.Title }}</view>
  5. <view class="body">
  6. <text style="flex: 1">{{ item.IndustryName }}</text>
  7. <view><van-icon name="arrow" /></view>
  8. </view>
  9. </view>
  10. <u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="20" v-if="page_no > 1" />
  11. </view>
  12. </template>
  13. <script>
  14. import { Reports } from "@/config/api.js";
  15. export default {
  16. data() {
  17. return {
  18. collectList: [],
  19. page_no: 1,
  20. pageSize: 10,
  21. status: "loadmore",
  22. loadText: {
  23. loadmore: "上拉加载更多",
  24. loading: "加载中",
  25. nomore: "已经到底了",
  26. },
  27. };
  28. },
  29. methods: {
  30. // 获取数据
  31. async getDataList() {
  32. const res = await Reports.getMorningMeetingList({
  33. PageSize: this.pageSize,
  34. CurrentIndex: this.page_no,
  35. });
  36. if (res.Ret === 200) {
  37. this.status = res.Data.Paging.IsEnd ? "nomore" : "loadmore";
  38. this.collectList = this.page_no == 1 ? res.Data.List || [] : this.collectList.concat(res.Data.List);
  39. }
  40. },
  41. // 查看资源包
  42. lookDetails(item) {
  43. uni.navigateTo({
  44. url: "/reportPages/morningDetails/morningDetails?id=" + item.Id,
  45. });
  46. },
  47. },
  48. onLoad() {
  49. this.getDataList();
  50. },
  51. // 上滑触底触发分页
  52. onReachBottom() {
  53. if (this.status === "nomore") return;
  54. this.page_no++;
  55. this.status = "loading";
  56. this.getDataList();
  57. },
  58. onShareAppMessage() {
  59. return {
  60. title: "晨会精华汇总",
  61. path: "/reportPages/morningAll/morningAll",
  62. };
  63. },
  64. };
  65. </script>
  66. <style scoped lang="scss">
  67. .morning-all-content {
  68. background: #f7f7f7;
  69. padding: 35rpx;
  70. .content-ul {
  71. padding: 20rpx 30rpx;
  72. background-color: #fff;
  73. margin-bottom: 20rpx;
  74. border-radius: 4rpx;
  75. .title {
  76. font-weight: 500;
  77. font-size: 30rpx;
  78. line-height: 42rpx;
  79. color: #333333;
  80. padding-bottom: 16rpx;
  81. border-bottom: 2rpx dashed #ececec;
  82. }
  83. .body {
  84. padding: 20rpx 0;
  85. display: flex;
  86. align-items: center;
  87. font-weight: 400;
  88. font-size: 28rpx;
  89. line-height: 39rpx;
  90. color: #666666;
  91. }
  92. }
  93. }
  94. </style>