nursingRoom.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <view class="common-details-container">
  3. <view class="common-header-wrapper">
  4. <image :src="content.image" mode="scaleToFill" />
  5. </view>
  6. <view class="common-content-wrapper">
  7. <view class="common-card">
  8. <!-- common title -->
  9. <view class="common-card-title">{{ boyInfo?.title }}</view>
  10. <!-- sub title -->
  11. <view class="common-sub-title">营业时间:{{ boyInfo?.businessAt }}</view>
  12. <view class="common-sub-title">客服电话:{{ boyInfo?.mobile }}</view>
  13. </view>
  14. <view class="common-card">
  15. <view class="common-card-title u-margin-bottom-20">基本介绍</view>
  16. <view class="common-card-content">
  17. <u-parse :html="content?.intro" />
  18. </view>
  19. <view class="common-card-title u-margin-top-45">设施配置</view>
  20. <view class="bottom-box-wrap">
  21. <HyTag v-for="item in content?.facilities" :key="item" :text="item.name" :imgUrl="item.img" />
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. <script setup lang="ts">
  28. import { ref } from 'vue'
  29. import { onLoad } from '@dcloudio/uni-app'
  30. import { getParkServiceBoy } from '@/api/home'
  31. const boyInfo = ref<any>({})
  32. const content = ref<any>({})
  33. onLoad(async () => {
  34. const parkId = uni.getStorageSync('parkId')
  35. const res = await getParkServiceBoy(parkId)
  36. if (res.code === 200) {
  37. boyInfo.value = res.data
  38. content.value = JSON.parse(boyInfo.value.content)
  39. }
  40. })
  41. </script>
  42. <style lang="scss" scoepd>
  43. @import '../base.scss';
  44. .bottom-box-wrap {
  45. display: flex;
  46. flex-wrap: wrap;
  47. align-items: center;
  48. justify-content: space-between;
  49. margin-top: 24rpx;
  50. :deep(.tag-item-wrapper) {
  51. margin-right: 30rpx;
  52. }
  53. }
  54. </style>