index.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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 setup>
  18. import { ref } from "vue";
  19. const list =ref([{
  20. icon: 'iconfont icon-github',
  21. title: '若依问题',
  22. childList: [{
  23. title: '若依开源吗?',
  24. content: '开源'
  25. }, {
  26. title: '若依可以商用吗?',
  27. content: '可以'
  28. }, {
  29. title: '若依官网地址多少?',
  30. content: 'http://ruoyi.vip'
  31. }, {
  32. title: '若依文档地址多少?',
  33. content: 'http://doc.ruoyi.vip'
  34. }]
  35. },
  36. {
  37. icon: 'iconfont icon-help',
  38. title: '其他问题',
  39. childList: [{
  40. title: '如何退出登录?',
  41. content: '请点击[我的] - [应用设置] - [退出登录]即可退出登录',
  42. }, {
  43. title: '如何修改用户头像?',
  44. content: '请点击[我的] - [选择头像] - [点击提交]即可更换用户头像',
  45. }, {
  46. title: '如何修改登录密码?',
  47. content: '请点击[我的] - [应用设置] - [修改密码]即可修改登录密码',
  48. }]
  49. }
  50. ])
  51. function handleText(item) {
  52. uni.navigateTo({
  53. url: `/pages/common/textview/index?title=${item.title}&content=${item.content}`
  54. });
  55. }
  56. </script>
  57. <style lang="scss" scoped>
  58. page {
  59. background-color: #f8f8f8;
  60. }
  61. .help-container {
  62. margin-bottom: 100rpx;
  63. padding: 30rpx;
  64. }
  65. .list-title {
  66. margin-bottom: 30rpx;
  67. }
  68. .childList {
  69. background: #ffffff;
  70. box-shadow: 0px 0px 10rpx rgba(193, 193, 193, 0.2);
  71. border-radius: 16rpx;
  72. margin-top: 10rpx;
  73. }
  74. .line {
  75. width: 100%;
  76. height: 1rpx;
  77. background-color: #F5F5F5;
  78. }
  79. .text-title {
  80. color: #303133;
  81. font-size: 32rpx;
  82. font-weight: bold;
  83. margin-left: 10rpx;
  84. .iconfont {
  85. font-size: 16px;
  86. margin-right: 10rpx;
  87. }
  88. }
  89. .text-item {
  90. font-size: 28rpx;
  91. padding: 24rpx;
  92. }
  93. .question {
  94. color: #606266;
  95. font-size: 28rpx;
  96. }
  97. </style>