help_feedback.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <template style="background-color:#F6F6F6 ;">
  2. <view style="margin-top: 20rpx;background-color: #FFFFFF;">
  3. <!-- 标题 -->
  4. <view class="title">常见问题</view>
  5. <!-- 线 -->
  6. <u-line color="#EFEFEF" />
  7. <!-- 问题列表 -->
  8. <view class="list">
  9. <u-collapse>
  10. <u-collapse-item :title="item.title" v-for="(item, index) in itemList" :key="index" head-style="font-size: 28rpx;">
  11. <div class="body">{{item.content}}</div>
  12. </u-collapse-item>
  13. </u-collapse>
  14. </view>
  15. <view class="footer">
  16. <view class="cu-bar bg-white tabbar border shop" style="width: 100%;">
  17. <view class="submit" @click="next" style="background-color: #0B73B9; color: #FFFFFF; font-size: 32rpx;">添加意见反馈</view>
  18. </view>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. data() {
  25. return {
  26. itemList: [],
  27. pageindex: 1
  28. }
  29. },
  30. mounted() {
  31. this.gethelpData()
  32. },
  33. onReachBottom() {
  34. this.gethelpData()
  35. },
  36. methods: {
  37. next(e) {
  38. uni.navigateTo({
  39. url: '/pages/common_tools/help_feedback/opinion1'
  40. })
  41. },
  42. gethelpData: async function() {
  43. let res = await this.$request.post("/api/v1/common/getHelpList", {
  44. page: this.pageindex
  45. })
  46. console.log(res)
  47. if (res.status == 0) {
  48. if (this.pageindex > res.data.last_page) {
  49. uni.showToast({
  50. title: "没有更多了",
  51. icon: "none"
  52. })
  53. } else {
  54. this.itemList = this.itemList.concat(res.data.data)
  55. this.pageindex++
  56. }
  57. }
  58. }
  59. }
  60. }
  61. </script>
  62. <style lang="scss">
  63. .title {
  64. height: auto;
  65. display: flex;
  66. align-items: center;
  67. padding: 30rpx 0 30rpx 30rpx;
  68. font-size: 30rpx;
  69. font-weight: bold;
  70. }
  71. .list {
  72. height: auto;
  73. width: 100%;
  74. padding: 0 30rpx;
  75. .body {
  76. padding: 20rpx 30rpx 20rpx 20rpx;
  77. word-break: break-all;
  78. word-wrap: break-word
  79. }
  80. }
  81. .footer {
  82. width: 100%;
  83. height: auto;
  84. display: flex;
  85. position: fixed;
  86. bottom: 0;
  87. }
  88. </style>