吉光研途前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

159 lines
3.5 KiB

  1. <template>
  2. <view class="page__view">
  3. <!-- 导航栏 -->
  4. <navbar :title="details.title" leftClick @leftClick="$utils.navigateBack" bgColor="#4883F9" color="#FFFFFF" />
  5. <!-- 轮播图 -->
  6. <view class="swiper">
  7. <uv-swiper :list="bannerList" keyName="image" :autoplay="bannerList.length > 1" :indicator="bannerList.length > 1" indicatorMode="dot" indicatorActiveColor="#4883F9" indicatorInactiveColor="#FFFFFF" height="424rpx"></uv-swiper>
  8. </view>
  9. <!-- 学生情况 -->
  10. <view class="section">
  11. <view class="section-header">
  12. <arrow></arrow>
  13. <view>学生情况</view>
  14. </view>
  15. <view class="section-content">
  16. <uv-parse :content="details.studentCondition"></uv-parse>
  17. </view>
  18. </view>
  19. <!-- 服务项目 -->
  20. <view class="section">
  21. <view class="section-header">
  22. <arrow></arrow>
  23. <view>服务项目</view>
  24. </view>
  25. <view class="section-content">
  26. <uv-parse :content="details.serviceItem"></uv-parse>
  27. </view>
  28. </view>
  29. <!-- 服务过程 -->
  30. <view class="section">
  31. <view class="section-header">
  32. <arrow></arrow>
  33. <view>服务过程</view>
  34. </view>
  35. <view class="section-content">
  36. <uv-parse :content="details.serviceProcess"></uv-parse>
  37. </view>
  38. </view>
  39. <!-- 服务结果 -->
  40. <view class="section">
  41. <view class="section-header">
  42. <arrow></arrow>
  43. <view>服务结果</view>
  44. </view>
  45. <view class="section-content">
  46. <uv-parse :content="details.serviceResult"></uv-parse>
  47. </view>
  48. </view>
  49. <!-- 服务感受 -->
  50. <view class="section">
  51. <view class="section-header">
  52. <arrow></arrow>
  53. <view>服务感受</view>
  54. </view>
  55. <view class="section-content">
  56. <uv-parse :content="details.serviceFeeling"></uv-parse>
  57. </view>
  58. </view>
  59. </view>
  60. </template>
  61. <script>
  62. import arrow from '@/components/base/arrow.vue'
  63. export default {
  64. components: {
  65. arrow,
  66. },
  67. data() {
  68. return {
  69. details: {},
  70. }
  71. },
  72. onLoad({ articleId }) {
  73. this.getData(articleId)
  74. },
  75. computed: {
  76. bannerList() {
  77. const { image } = this.details || {}
  78. return (image || '').split(',').map(url => ({ image: url }))
  79. }
  80. },
  81. methods: {
  82. async getData(articleId) {
  83. try {
  84. this.details = await this.$fetch('queryAriticleById', { articleId })
  85. } catch (err) {
  86. }
  87. },
  88. },
  89. }
  90. </script>
  91. <style scoped lang="scss">
  92. .page__view {
  93. box-sizing: border-box;
  94. padding-bottom: 36rpx;
  95. background: #FFFFFF;
  96. }
  97. .swiper {
  98. margin: 20rpx 18rpx 47rpx 18rpx;
  99. border-radius: 25rpx;
  100. overflow: hidden;
  101. /deep/ .uv-swiper-indicator__wrapper__dot {
  102. width: 15rpx;
  103. height: 15rpx;
  104. }
  105. /deep/ .uv-swiper-indicator__wrapper__dot--active {
  106. width: 15rpx;
  107. }
  108. }
  109. .section {
  110. width: 100%;
  111. padding: 0 18rpx;
  112. box-sizing: border-box;
  113. & + & {
  114. margin-top: 40rpx;
  115. }
  116. &-header {
  117. display: flex;
  118. align-items: center;
  119. justify-content: flex-start;
  120. column-gap: 5rpx;
  121. padding-left: 11rpx;
  122. font-size: 32rpx;
  123. font-weight: 700;
  124. color: #000000;
  125. }
  126. &-content {
  127. margin-top: 24rpx;
  128. padding: 24rpx;
  129. box-sizing: border-box;
  130. white-space: pre-line;
  131. font-size: 28rpx;
  132. color: #000000;
  133. background: #F8F8F8;
  134. border-radius: 15rpx;
  135. }
  136. }
  137. </style>