<template>
  <view class="myProject">
    <view class="myProjectItem" v-for="(item,index) in myProjectList" :key="index">
      <view style="display: flex;justify-content: space-between">
        <text>{{item?.name}}</text>
        <!--<text>进行中</text>-->
      </view>
      <view class="myProjectIndex">地址：
        <text>{{item?.provinceName}}{{item.cityName}}{{item.districtsName}}{{item.streetName}}</text>
      </view>
      <view style="display: flex;justify-content: space-between">
        <text>项目负责人：{{item?.contactPersonInfo.name}}</text>
        <text>电话：{{item?.contactPersonInfo.telephone}}</text>
      </view>
       <view class="project" >
         <view v-for="(items,index) in item.serviceProjectList" :key="index">{{items.name}}</view>
       </view>
    </view>
  </view>
</template>

<script setup lang="ts">
import api from "@/request/index";
import {onMounted, ref} from "vue";
import Taro from "@tarojs/taro";
import './myproject.scss'


const myProjectList = ref<myProjectList[]>()
const getMyServiceProject = async () => {
  const token = Taro.getStorageSync('token')
  const resp = await api.get<myProjectList[]>(`/projectManageIndex/getMyServiceProject`, {
    token: token.value
  })
  myProjectList.value = resp.data
  console.log(resp.data)
}
onMounted(async () => {
  await getMyServiceProject()
})
</script>

<!--<style scoped lang="scss">-->

<!--</style>-->
