message.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <template>
  2. <view class="total-page page-env-20 page-box scroll_content">
  3. <Nav :title="'消息'" :genre="1" :fixedHeight="50"></Nav>
  4. <view class="task-tabs" :style="{top:`${$tools.topHeight()}px`}">
  5. <z-tabs ref="tabs" :list="tabsList" :active-style="{color:'#10B261',fontWeight:'bold',fontSize:'30rpx'}"
  6. :bar-style="{background:'#10B261'}" :inactive-style="{fontWeight:'bold',fontSize:'28rpx'}"
  7. :current="current" :bar-animate-mode="'worm'" @change="tabsChange" />
  8. </view>
  9. <EnScroll ref="scroll" class="main" @onRefresh="onRefresh" @onScrollBottom="onScrollBottom">
  10. <view class="m-t20">
  11. <Enblank :message="'暂无消息'" v-if="!messageList.length">
  12. </Enblank>
  13. </view>
  14. <view class="m-lr20 page-env-160">
  15. <view class="row-c page-box-bg-fff m-t20 r-30 p-30 box-shadow-197" v-for="(item,index) in 30"
  16. :key="index">
  17. <image class="wh-80" :src="getLeftImg(index)" mode=""></image>
  18. <view class="flex m-l20">
  19. <view class="row-justify-sb center flex">
  20. <text class="text-color-333 sys-weight-400 size-30">您有新的可执行任务{{index}}</text>
  21. <image class="wh-30 m-l16" style="margin-top: 4rpx;" src="/static/img/task/task-phone.png"
  22. mode=""></image>
  23. </view>
  24. <view class="row-justify-sb center m-t10">
  25. <text class="size-26 text-color-666">垫资还款</text>
  26. <text class="size-24 text-color-999">2024/12/24用款</text>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. <!-- <view class="placeholder sys-list-background-color" style="height: 60rpx;" v-if="is_bottom"></view> -->
  32. </EnScroll>
  33. </view>
  34. </template>
  35. <script>
  36. // 任务列表
  37. import TaskItem from "@/common/task/task-item.vue";
  38. export default {
  39. components: {
  40. TaskItem
  41. },
  42. data() {
  43. return {
  44. current: 0,
  45. tabsList: [{
  46. name: '全部(12)',
  47. // 可以禁用某个item
  48. is_dot: true,
  49. dot_color: 'red',
  50. disabled: false
  51. }, {
  52. name: '未读(15)',
  53. // 可以禁用某个item
  54. is_dot: true,
  55. dot_color: 'yellow',
  56. disabled: false
  57. }, {
  58. name: '已读',
  59. // 可以禁用某个item
  60. is_dot: false,
  61. dot_color: '',
  62. disabled: false
  63. }],
  64. leftImg: ['task-house', 'task-business', 'task-repayment'],
  65. iconList: ['task-audit', 'task-do', 'task-stay'],
  66. messageList: []
  67. }
  68. },
  69. watch: {
  70. },
  71. methods: {
  72. tabsChange(index) {
  73. this.current = index;
  74. },
  75. getLeftImg(index) {
  76. return `/static/img/task/${this.leftImg[0]}.png`
  77. },
  78. // 下拉刷新
  79. onRefresh() {
  80. uni.showLoading({
  81. title: '数据加载中'
  82. })
  83. setTimeout(() => {
  84. uni.showToast({
  85. title: '加载完成',
  86. icon: 'none'
  87. })
  88. this.$refs.scroll.onEndPulling()
  89. }, 1000)
  90. console.log("下拉刷新");
  91. },
  92. // 滚动到底部
  93. onScrollBottom() {
  94. uni.showLoading({
  95. title: '数据加载中'
  96. })
  97. setTimeout(() => {
  98. uni.showToast({
  99. title: '加载完成',
  100. icon: 'none'
  101. })
  102. }, 1000)
  103. console.log("到底部了");
  104. },
  105. },
  106. }
  107. </script>
  108. <style lang="scss" scoped>
  109. </style>