index.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <template>
  2. <view class="help-container">
  3. <u-navbar :titleStyle="{ color: '#fff' }" :autoBack="true" title="常见问题" :placeholder="true" :safeAreaInsetTop="true" :bgColor="proxy.$settingStore.themeColor.color">
  4. <template #left>
  5. <view class="u-nav-slot">
  6. <u-icon name="arrow-left" size="19" color="#fff"></u-icon>
  7. </view>
  8. </template>
  9. </u-navbar>
  10. <view class="uni-content-header"></view>
  11. <view class="uni-content-body">
  12. <view class="list-title" v-for="(item, findex) in list" :key="findex" :title="item.title">
  13. <view class="text-title"> <view :class="item.icon"></view>{{ item.title }} </view>
  14. <view class="childList">
  15. <view v-for="(child, zindex) in item.childList" :key="zindex" class="question" hover-class="hover" @click="handleText(child)">
  16. <view class="text-item">{{ child.title }}</view>
  17. <view class="line" v-if="zindex !== item.childList.length - 1"></view>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. </template>
  24. <script setup>
  25. import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
  26. import { ref, onMounted, inject, computed, shallowRef, reactive, getCurrentInstance, toRefs } from "vue";
  27. import { publicStores, useStores } from "@/store/modules/index";
  28. const useStore = useStores();
  29. const { proxy } = getCurrentInstance();
  30. const data = reactive({
  31. list: [
  32. // {
  33. // icon: 'iconfont icon-github',
  34. // title: '若依问题',
  35. // childList: [{
  36. // title: '若依开源吗?',
  37. // content: '开源'
  38. // }, {
  39. // title: '若依可以商用吗?',
  40. // content: '可以'
  41. // }, {
  42. // title: '若依官网地址多少?',
  43. // content: 'http://ruoyi.vip'
  44. // }, {
  45. // title: '若依文档地址多少?',
  46. // content: 'http://doc.ruoyi.vip'
  47. // }]
  48. // },
  49. {
  50. icon: "iconfont ucicon-Help",
  51. title: "其他问题",
  52. childList: [
  53. {
  54. title: "如何退出登录?",
  55. content: "请点击[我的] - [应用设置] - [退出登录]即可退出登录",
  56. },
  57. {
  58. title: "如何修改用户头像?",
  59. content: "请点击[我的] - [选择头像] - [点击提交]即可更换用户头像",
  60. },
  61. {
  62. title: "如何修改登录密码?",
  63. content: "请点击[我的] - [应用设置] - [修改密码]即可修改登录密码",
  64. },
  65. ],
  66. },
  67. ],
  68. });
  69. const { list } = toRefs(data);
  70. function handleText(item) {
  71. proxy.$tab.navigateTo(`/pages/common/textview/index?title=${item.title}&content=${item.content}`);
  72. }
  73. onShow(() => {
  74. //调用系统主题颜色
  75. proxy.$settingStore.systemThemeColor([1]);
  76. });
  77. </script>
  78. <style lang="scss" scoped>
  79. .help-container {
  80. .uni-content-body {
  81. padding: 30rpx;
  82. .list-title {
  83. margin-bottom: 30rpx;
  84. }
  85. .childList {
  86. background: #ffffff;
  87. box-shadow: 0px 0px 10rpx rgba(193, 193, 193, 0.2);
  88. border-radius: 16rpx;
  89. margin-top: 10rpx;
  90. }
  91. .line {
  92. width: 100%;
  93. height: 1rpx;
  94. background-color: #f5f5f5;
  95. }
  96. .text-title {
  97. display: flex;
  98. color: #303133;
  99. font-size: 32rpx;
  100. font-weight: bold;
  101. margin-left: 10rpx;
  102. .iconfont {
  103. font-size: 16px;
  104. margin: auto 10rpx auto 0;
  105. }
  106. }
  107. .text-item {
  108. font-size: 28rpx;
  109. padding: 24rpx;
  110. }
  111. .question {
  112. color: #606266;
  113. font-size: 28rpx;
  114. }
  115. }
  116. }
  117. </style>