help.vue 1.1 KB

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