index.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <template>
  2. <view class="help-container">
  3. <view v-for="(item, findex) in list" :key="findex" :title="item.title" class="list-title">
  4. <view class="text-title">
  5. <view :class="item.icon"></view>
  6. {{ item.title }}
  7. </view>
  8. <view class="childList">
  9. <view v-for="(child, zindex) in item.childList" :key="zindex" class="question" hover-class="hover"
  10. @click="handleText(child)">
  11. <view class="text-item">{{ child.title }}</view>
  12. <view v-if="zindex !== item.childList.length - 1" class="line"></view>
  13. </view>
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. data() {
  21. return {
  22. list: [{
  23. icon: 'iconfont icon-github',
  24. title: 'AyaoJies问题',
  25. childList: [{
  26. title: 'AyaoJies开源吗?',
  27. content: '开源'
  28. }, {
  29. title: 'AyaoJies可以商用吗?',
  30. content: '可以'
  31. }, {
  32. title: 'AyaoJies官网地址多少?',
  33. content: 'http://ayaojies.vip'
  34. }, {
  35. title: 'AyaoJies文档地址多少?',
  36. content: 'http://doc.ayaojies.vip'
  37. }]
  38. },
  39. {
  40. icon: 'iconfont icon-help',
  41. title: '其他问题',
  42. childList: [{
  43. title: '如何退出登录?',
  44. content: '请点击[我的] - [应用设置] - [退出登录]即可退出登录',
  45. }, {
  46. title: '如何修改用户头像?',
  47. content: '请点击[我的] - [选择头像] - [点击提交]即可更换用户头像',
  48. }, {
  49. title: '如何修改登录密码?',
  50. content: '请点击[我的] - [应用设置] - [修改密码]即可修改登录密码',
  51. }]
  52. }
  53. ]
  54. }
  55. },
  56. methods: {
  57. handleText(item) {
  58. this.$tab.navigateTo(`/pages/common/textview/index?title=${item.title}&content=${item.content}`)
  59. }
  60. }
  61. }
  62. </script>
  63. <style lang="scss" scoped>
  64. page {
  65. background-color: #f8f8f8;
  66. }
  67. .help-container {
  68. margin-bottom: 100 rpx;
  69. padding: 30 rpx;
  70. }
  71. .list-title {
  72. margin-bottom: 30 rpx;
  73. }
  74. .childList {
  75. background: #ffffff;
  76. box-shadow: 0px 0px 10 rpx rgba(193, 193, 193, 0.2);
  77. border-radius: 16 rpx;
  78. margin-top: 10 rpx;
  79. }
  80. .line {
  81. width: 100%;
  82. height: 1 rpx;
  83. background-color: #F5F5F5;
  84. }
  85. .text-title {
  86. color: #303133;
  87. font-size: 32 rpx;
  88. font-weight: bold;
  89. margin-left: 10 rpx;
  90. .iconfont {
  91. font-size: 16px;
  92. margin-right: 10 rpx;
  93. }
  94. }
  95. .text-item {
  96. font-size: 28 rpx;
  97. padding: 24 rpx;
  98. }
  99. .question {
  100. color: #606266;
  101. font-size: 28 rpx;
  102. }
  103. </style>