<template>

</template>
<script setup lang="ts">
// 创建站点
import {useServerRequest} from "~/composables/useServerRequest";
import type {ApiResult} from "~/api";
import type {Company} from "~/api/system/company/model";

const {data: website} = await useServerRequest<ApiResult<Company>>('/cms/website/createWebsite', {
  baseURL: 'http://127.0.0.1:9002/api',
  method: 'post',
  body: company.value?.data
})
if (website.value?.code == 401) {
  console.log('网站不存在', website.value)
}
if (website.value?.code == 0) {
  console.log('网站存在', website.value)
}
</script>

<style scoped lang="less">

</style>
