index.vue 2.7 KB

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