<template>
  <view>
    <uni-title type="h1" :title="data.title" align="center"></uni-title>
    <view class="subTitle break">{{ data.startDesc }}</view>
    <view v-if="data.children" class="pa-3">
      <view v-for="item in data.children" :key="item" class="pa-2 subTitle">{{ item }}</view>
    </view>
    <view class="subTitle">{{ data.endDesc }}</view>
  </view>
</template>

<script setup>
import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { serviceData } from '@/utils/headhuntingData'

const data = ref({})

onLoad((options) => {
  // 传入需要跳转的链接 使用web-view标签进行跳转
  // options.type
  // options.key
  data.value = serviceData.find(e => e.id === options.key)
})
</script>

<style lang="scss" scoped>
.pa-3 {
  padding: 30rpx;
}
.pa-2 {
  padding: 20rpx;
}
.break {
  color: #333 !important;
}
.subTitle {
  padding: 0 20rpx;
  font-size: 24rpx;
  margin-bottom: 20rpx;
  line-height: 40rpx;
  color: #666;
}

</style>