help.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <template>
  2. <view>
  3. <ujp-navbar title="帮助中心"></ujp-navbar>
  4. <view class="collapse">
  5. <u-collapse v-if="itemList.length">
  6. <u-collapse-item :title="item.title" v-for="(item, index) in itemList" :key="index">
  7. <!-- -->
  8. <view v-html="item.content"></view>
  9. <!-- <textarea maxlength="-1" :auto-height="true" v-model="item.content" readonly ></textarea>
  10. -->
  11. </u-collapse-item>
  12. </u-collapse>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. import * as API from '@/apis/finance.js'
  18. export default {
  19. data() {
  20. return {
  21. itemList: [],
  22. }
  23. },
  24. onReady() {
  25. this.getHomePage()
  26. },
  27. methods: {
  28. getHomePage(){
  29. uni.showLoading({
  30. title: "加载中",
  31. mask: true,
  32. })
  33. API.helpList({
  34. category:3
  35. }).then((res) => {
  36. this.itemList = res.data.helpList
  37. uni.hideLoading()
  38. }).catch(error => {
  39. uni.showToast({
  40. title: error
  41. })
  42. })
  43. }
  44. }
  45. }
  46. </script>
  47. <style>
  48. page{
  49. background-color: #F7F7F7;
  50. }
  51. </style>
  52. <style lang="scss" scoped>
  53. .collapse{
  54. margin: 16px;
  55. background-color: #fff;
  56. padding:0 10px;
  57. }
  58. </style>