help_feedback.vue 1.9 KB

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