'use client'
import React, {useEffect} from 'react';
import SubTitle from "@/components/subTitle";
import {BDMapGL} from "@/utils/BDMap";
import Image from "next/image";

function ContactUs() {

  const BDMapInit = () => {
    BDMapGL('94KOPB1NRjoXmLvlJN6HMi7eVC50z09K').then((BMapGL: any) => {
      const map = new BMapGL.Map('container')
      const point = new BMapGL.Point(112.863450,28.178478)
      map.centerAndZoom(point, 16)
      map.enableScrollWheelZoom(true) //设置鼠标放大缩小
      map.addControl(new BMapGL.ScaleControl()) //卡尺
      const marker = new BMapGL.Marker(point) // 创建标注
      map.addOverlay(marker)
    })
  }
  useEffect(() => {
    BDMapInit()
  }, []);
  return (
    <>
      {/* 联系我们 */}
      <section id="section-4" className="w-4/5 mx-auto scroll-mt-10 py-12 px-4">
        <div className="my-10 sm:my-6">
          <SubTitle title="联系我们"/>
        </div>
        <div className="grid sm:grid-cols-1 md:grid-cols-2 gap-6">
          <div className="h-88" id="container"></div>
          <div className="space-y-4">
            <div className="bg-gray-300 w-60 h-60">
              <Image src={'/assets/about/22.jpg'} alt={'qrcode'} width={500} height={500}/>
            </div>
            <p>电话：0731-85315153</p>
            <p>邮箱：337843345@qq.com</p>
            <p>地址：湖南省长沙市岳麓区梅溪湖街道泉水路461号长沙健康医疗大数据产业孵化基地1-2#楼 未来楼5楼左侧</p>
          </div>
        </div>
      </section>
    </>
  );
}

export default ContactUs;