beginner_guide.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <template>
  2. <Theme>
  3. <view class="wrap">
  4. <Navbar title="新手教程" fixed border>
  5. <template #right>
  6. <navMenu :options="{ icon: 'icon-home', text: '主页' }" />
  7. </template>
  8. </Navbar>
  9. <view class="content">
  10. <view class="step">
  11. <view
  12. class="step_content"
  13. v-for="(item, index) in detail"
  14. :key="index"
  15. >
  16. <view class="step_content_title">{{ item.name }}</view>
  17. <view
  18. class="step_wrapper"
  19. v-for="(val, num) in item.lists"
  20. :key="num"
  21. >
  22. <view class="wrapper_title">
  23. <text class="uppercase">{{ t("步骤") }}{{ num + 1 }}</text>
  24. {{ val.title }}
  25. </view>
  26. <view class="wrapper_content">
  27. <rich-text :nodes="val.content"></rich-text>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. </Theme>
  35. </template>
  36. <script setup>
  37. import Navbar from "@/components/navbar";
  38. import navMenu from "@/components/nav_menu";
  39. import { ref } from "vue";
  40. import { CONTENT_TUTORIAL } from "@/api";
  41. import { t } from "@/locale";
  42. const detail = ref([]);
  43. const getDetail = async () => {
  44. try {
  45. const res = await CONTENT_TUTORIAL();
  46. detail.value = res.data;
  47. } catch (error) {}
  48. };
  49. getDetail();
  50. </script>
  51. <style lang="less" scoped>
  52. @import url("@/style.less");
  53. .wrap {
  54. min-height: 100vh;
  55. background-color: var(--light);
  56. .content {
  57. padding: 24rpx;
  58. .step {
  59. &_content {
  60. &_title {
  61. border-left: 4px solid var(--black);
  62. color: var(--text);
  63. font-weight: 700;
  64. .size(48rpx);
  65. padding-left: 24rpx;
  66. height: 80rpx;
  67. margin-bottom: 24rpx;
  68. margin-top: 24rpx;
  69. }
  70. .step_wrapper {
  71. .wrapper_title {
  72. .ver();
  73. .size();
  74. font-weight: 700;
  75. color: var(--text-02);
  76. .uppercase {
  77. height: 76rpx;
  78. border-radius: 50px;
  79. padding: 0 40rpx;
  80. background-color: var(--text);
  81. color: var(--light);
  82. .ver();
  83. margin-right: 24rpx;
  84. }
  85. }
  86. .wrapper_content {
  87. margin-top: 40rpx;
  88. padding-left: 16rpx;
  89. /deep/ .method-wrapper {
  90. .flex();
  91. flex-direction: column;
  92. gap: 24rpx;
  93. .method-card {
  94. .flex();
  95. flex-direction: column;
  96. gap: 24rpx;
  97. color: #000;
  98. .size(28rpx);
  99. line-height: 60rpx;
  100. .method-tag {
  101. background: #fff3ea;
  102. color: #000;
  103. .size(28rpx);
  104. font-weight: 700;
  105. height: 76rpx;
  106. width: fit-content;
  107. min-width: 88rpx;
  108. padding: 0 16px;
  109. .flex_center();
  110. }
  111. .method-img-wrapper {
  112. padding-bottom: 0 !important;
  113. }
  114. }
  115. }
  116. /deep/ img {
  117. width: 100%;
  118. display: block;
  119. }
  120. }
  121. }
  122. }
  123. }
  124. }
  125. }
  126. </style>