<template>
  <view class="common-details-container" v-if="content?.intro || content?.image">
    <view class="common-header-wrapper join">
      <image :src="content.image" mode="scaleToFill" />
    </view>
    <view class="common-content-wrapper">
      <view class="common-card">
        <view class="common-card-content">
          <u-parse :html="content.intro" />
        </view>
      </view>
    </view>
  </view>
  <view class="no-data-container" v-else>
    <u-empty />
  </view>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { getParkServiceInvestment } from '@/api/home'
import { useGlobal } from '../../composables/index'
const { minioUrl } = useGlobal()

// 招商加盟详情
const joinInfo = ref<any>({})
const content = ref<any>({})

onLoad(async () => {
  const parkId = uni.getStorageSync('parkId')
  if (parkId) {
    const res = await getParkServiceInvestment(parkId)
    if (res.code === 200) {
      joinInfo.value = res.data
      content.value = JSON.parse(joinInfo.value.content)
    }
  }
})
</script>

<style lang="scss" scoepd>
@import '../base.scss';
</style>
