<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>宝智达冷链官网</title>
    <meta content="width=device-width, initial-scale=1.0" name="viewport">
    <meta content="" name="keywords">
    <meta content="" name="description">
    <meta content="Author" name="WebThemez">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Favicons -->
    <link href="../static/img/favicon.png" rel="icon">
    <link href="../static/img/apple-touch-icon.png" rel="apple-touch-icon">
    <link href="/static/layui/css/layui.css" rel="stylesheet">
    
    <!--字体 -->
    <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,700,700i|Raleway:300,400,500,700,800|Montserrat:300,400,700"
          rel="stylesheet">

    <!-- Bootstrap CSS File -->
    <link href="../static/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">


    <!-- Libraries CSS Files -->
    <link href="../static/lib/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <link href="../static/lib/animate/animate.min.css" rel="stylesheet">
    <link href="../static/lib/ionicons/css/ionicons.min.css" rel="stylesheet">
    <link href="../static/lib/owlcarousel/assets/owl.carousel.min.css" rel="stylesheet">
    <link href="../static/lib/magnific-popup/magnific-popup.css" rel="stylesheet">
    <link href="../static/lib/ionicons/css/ionicons.min.css" rel="stylesheet">

    <!-- Main Stylesheet File -->
    <link href="../static/css/style.css" rel="stylesheet">
  </head>

  <body id="body">
    <header id="header">
      <div class="container">
        <div id="logo" class="pull-left">
          <img src="../static/img/favicon.png" alt="Logo" class="logo-image"/>
          <h1><a href="/" class="scrollto"><span></span>宝智达冷链</a></h1>
        </div>
        <nav id="nav-menu-container">
          <ul class="layui-nav layui-bg-gray">
            <li class="layui-nav-item"><a href="/">首页</a></li>
            <li class="layui-nav-item"><a href="/about">关于我们</a></li>
            <li class="layui-nav-item">
              <a href="/news?types=industry">新闻</a>
              <dl class="layui-nav-child">
                <dd><a href="/news?types=firm">公司新闻</a></dd>
                <dd><a href="/news?types=industry">行业新闻</a></dd>
              </dl>
            </li>
            <li class="layui-nav-item"><a href="/services/">服务介绍</a></li>
            <li class="layui-nav-item">
              <a href="/product?ptype={{.productFirst}}">产品介绍</a>
              <dl class="layui-nav-child">
                {{range .productType}}
                <dd><a href="/product?ptype={{.Name}}">{{.Name}}</a></dd>
                {{end}}
              </dl>
            </li>
            <li class="layui-nav-item"><a href="/recruit">全国代理招募</a></li>
            <li class="layui-nav-item"><a href="/contact">联系我们</a></li>
          </ul>
        </nav>
      </div>
    </header>


    <!--==========================
Page Banner Section
    ============================-->
    <section id="innerBanner">
      <div class="inner-content">
        <h2><span>联系我们</span></h2>
        <div>
        </div>
      </div>
    </section><!-- #Page Banner -->

    <main id="main">
      <section id="contact" class="wow fadeInUp">
        <div class="container">
          <div class="section-header">
            <p>欢迎随时与我们联系！无论您有关于产品的问题，需要技术支持，或是想要探讨合作机会，我们的团队都乐意为您提供帮助。请通过以下方式联系我们：</p>
          </div>
          <div class="row contact-info">
            <div class="col-lg-5">
              <div class="contact-address">
                <i class="ion-ios-location-outline"></i>
                <h3>地址</h3>
                <address>贵州省贵阳市观山湖区金融城 MAXC 819宝智达科技</address>
              </div>
              <div class="contact-phone">
                <i class="ion-ios-telephone-outline"></i>
                <h3>电话</h3>
                <p><a href="tel:+ 400-600-0968">+ 400-600-0968</a></p>
              </div>
              <div class="contact-email">
                <i class="ion-ios-email-outline"></i>
                <h3>邮件</h3>
                <p><a href="mailto:380236930@qq.com">380236930@qq.com</a></p>
              </div>
              <div class="contact-email">
                <i class="ion-ios-chatbubble-outline"></i>
                <h3>公司公众号</h3>
                <p><a>宝智达冷链科技 （在微信搜索：宝智达冷链科技或扫描下方二维码即可关注公众号）</a></p>
              </div>
              <div class="contact-email">
                <i class="ion-ios-photos-outline"></i>
                <h3>公司微信小程序：</h3>
                <p><a>宝智达冷链科技（在微信搜索：宝智达冷链科技或扫描下方二维码即可进入冷链小程序 ）</a></p>
              </div>
            </div>
            <div class="col-lg-7">
              <div class="container">
                <div class="form">
                  <!-- Form itself -->
                  <form class="layui-form layui-form-pane" action="/api/contact" method="post" id="contactForm" lay-filter="LAY-contactForm">
                    <div class="layui-form-item">
                      <label class="layui-form-label">您的名字</label>
                      <div class="layui-input-block">
                        <input type="text" name="name" lay-verify="required" placeholder="请输入您的名字" autocomplete="off" class="layui-input">
                      </div>
                    </div>
                    <div class="layui-form-item">
                      <label class="layui-form-label">联系方式</label>
                      <div class="layui-input-block">
                        <input type="text" name="phone" lay-verify="required|phone" placeholder="请输入联系方式" autocomplete="off" class="layui-input">
                      </div>
                    </div>
                    <div class="layui-form-item">
                      <label class="layui-form-label">信息</label>
                      <div class="layui-input-block">
                        <textarea name="message" lay-verify="required" style="height: 260px" placeholder="请输入信息" class="layui-textarea" maxlength="999"></textarea>
                      </div>
                    </div>
                    <div class="layui-form-item">
                      <div class="layui-input-block">
                        <button class="layui-btn layui-btn-normal" lay-submit lay-filter="formSubmit">发送</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                      </div>
                    </div>
                  </form>
                </div>

              </div>
            </div>
            <div class="col-lg-3 image-container">
              <img src="/image/wechat.png" alt="微信图标" class="fixed-size-image">
              <img src="/image/programs.png" alt="小程序图标" class="fixed-size-image">
            </div>
          </div>
        </div>
      </section><!-- #contact -->

    </main>

    <!--==========================
Footer
    ============================-->
    <footer id="footer">
      <div class="container">
        <div class="copyright">
          Copyright &copy; 2018.Company name All rights reserved.<a target="_blank" href="http://sc.chinaz.com/moban/">&#x7F51;&#x9875;&#x6A21;&#x677F;</a>
        </div>
        <div class="credits">
        </div>
      </div>
    </footer><!-- #footer -->

    <a href="#" class="back-to-top"><i class="fa fa-chevron-up"></i></a>

    <!-- JavaScript  -->
    <script src="../static/lib/jquery/jquery.min.js"></script>
    <script src="../static/lib/jquery/jquery-migrate.min.js"></script>
    <script src="../static/lib/bootstrap/js/bootstrap.bundle.min.js"></script>
    <script src="../static/lib/easing/easing.min.js"></script>
    <script src="../static/lib/superfish/hoverIntent.js"></script>
    <script src="../static/lib/superfish/superfish.min.js"></script>
    <script src="../static/lib/wow/wow.min.js"></script>
    <script src="../static/lib/owlcarousel/owl.carousel.min.js"></script>
    <script src="../static/lib/magnific-popup/magnific-popup.min.js"></script>
    <script src="../static/lib/sticky/sticky.js"></script>
    <script src="../static/js/main.js"></script>
    <script src="/static/layui/layui.js"></script>
    <script>
      layui.use(['form'], function () {
        var $ = layui.jquery;
        var form = layui.form;
        // 监听表单提交事件
        form.on('submit(formSubmit)', function (data) {
          event.preventDefault();
          // 获取表单数据
          var name = data.field.name;
          var phone = data.field.phone;
          var message = data.field.message;
          // 在这里可以添加验证逻辑，比如检查数据是否为空或格式是否正确
          if (!name || !phone || !message) {
            layer.alert('所有字段都为必填项');
            return false;
          }
          // 模拟异步提交
          $.ajax({
              url: "addcontact",  // 你的API地址
              type: "POST",
                data: {
                name: name,
                  phone: phone,
                  message: message
              },
              success: function(response) {
                if (response.Code === 200) {
                  layer.msg('提交成功', { icon: 1 });
                  // 提交成功后的操作，例如清空表单
                  form.reset("#contactForm");
                } else {
                  layer.alert(response.message);
                }
              },
              error: function() {
                layer.alert('提交失败，请稍后重试');
              }
              });
              return false; // 阻止表单再次提交
              });
              });
    </script>
  </body>
</html>
