helpCenter.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template>
  2. <view class="container">
  3. <!-- <u-navbar title="帮助中心" leftIconColor="#ffffff" titleStyle="color:#fff" :autoBack="true" placeholder></u-navbar> -->
  4. <view class="list">
  5. <view class="item" v-for="(v,i) in list" :key="i" @click="goPath('/pages/mine/agreement?helpId='+v.id)">
  6. <view class="item_l">{{v.problemTitle}}</view>
  7. <view class="item_r"><text class="iconfont icon-jiantou"></text></view>
  8. </view>
  9. <!-- <empty marginTop="50" v-if="(!list||list.length<=0)&&status!='loading'"></empty> -->
  10. <view class="empty-box" v-if="(!list||list.length<=0)&&status!='loading'">
  11. <u-image src="/static/none.png" mode="aspectFill" width="582rpx" height="582rpx"></u-image>
  12. <span class="empty-txt">暂无数据!</span>
  13. <!-- <u-empty marginTop="100" style="width: 100%;"></u-empty> -->
  14. </view>
  15. <u-loadmore v-else :status="status" />
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. import {
  21. problemPage
  22. } from "@/api/user.js"
  23. export default {
  24. data() {
  25. return {
  26. status: 'loadmore', //加载前值为loadmore,加载中为loading,没有数据为nomore
  27. params: {
  28. pageSize: 20,
  29. pageNum: 1,
  30. status: 1
  31. },
  32. list: []
  33. }
  34. },
  35. onPullDownRefresh() {
  36. this.params.pageNum = 1;
  37. this.getList();
  38. },
  39. onReachBottom() {
  40. if (this.status == "loadmore") {
  41. this.params.pageNum++;
  42. this.getList()
  43. }
  44. },
  45. onLoad() {
  46. this.getList();
  47. },
  48. methods: {
  49. getList() {
  50. problemPage(this.params).then(res => {
  51. if (this.params.pageNum == 1) {
  52. this.list = res.rows
  53. } else {
  54. this.list.push(...res.rows);
  55. }
  56. if (this.list.length < res.total) {
  57. this.status = 'loadmore';
  58. } else {
  59. this.status = 'nomore';
  60. }
  61. }).finally(() => {
  62. uni.stopPullDownRefresh();
  63. })
  64. },
  65. goPath(path) {
  66. uni.navigateTo({
  67. url: path
  68. })
  69. },
  70. },
  71. }
  72. </script>
  73. <style lang='scss' scoped>
  74. ::v-deep .u-navbar__content,
  75. ::v-deep .u-status-bar {
  76. background-color: #c90700 !important;
  77. }
  78. .container {
  79. padding-bottom: 50rpx;
  80. background: #ffffff;
  81. .list {
  82. padding: 15rpx 30rpx;
  83. .item {
  84. display: flex;
  85. justify-content: space-between;
  86. align-items: center;
  87. padding: 35rpx 0 30rpx;
  88. border-bottom: 1rpx solid #e6e6e6;
  89. .item_l {
  90. font-size: 28rpx;
  91. color: #1a1a1a;
  92. white-space: nowrap;
  93. text-overflow: ellipsis;
  94. overflow: hidden;
  95. width: calc(100% - 100rpx);
  96. }
  97. .item_r {
  98. color: #a3a3a3;
  99. }
  100. }
  101. }
  102. }
  103. </style>