186 行
7.4 KiB
HTML
可执行文件
186 行
7.4 KiB
HTML
可执行文件
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<!--[1.4.44]-->
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>联系我们</title>
|
|
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Webinfo/Templatetwo/css/contact.css"/>
|
|
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Webinfo/Templatetwo/css/public.css"/>
|
|
<link href="{$webinfo['logo']['icourl']}" type="image/x-icon" rel="shortcut icon">
|
|
</head>
|
|
|
|
<body>
|
|
<div class="bodys">
|
|
<div class="header">
|
|
<div class="headerbox">
|
|
<div style="display: flex;align-items: center;">
|
|
<img class="logo" src="{$webinfo['logo']['weblogo']}"/>
|
|
<a href='{:U("Main/Index/index")}' class="headeri">首页</a>
|
|
<a href='{:U("Main/Product/index")}' class="headeri">产品中心</a>
|
|
<a href='{:U("Main/News/index")}' class="headeri">新闻动态</a>
|
|
<a href='{:U("Main/About/index")}' class="headeri">关于我们</a>
|
|
<a href='javascript:;' class="headeri headeric">联系我们</a>
|
|
</div>
|
|
<div class="login">商家登录</div>
|
|
</div>
|
|
</div>
|
|
<div class="banner">
|
|
<img src="{$banner['image']}" alt="">
|
|
</div>
|
|
<!-- 联系我们 -->
|
|
<div class="contact">
|
|
<div class="biaoti">
|
|
<p class="title">联系我们</p>
|
|
<p class="xianz">STORE DISPLAY</p>
|
|
</div>
|
|
<div class="contact-c">
|
|
<div class="contact-left">
|
|
<div>
|
|
<i><img src="__PUBLIC__/Webinfo/Templatetwo/images/icon_03_jfyz.png" alt=""></i>
|
|
<span>服务热线:</span>
|
|
<span>{$contact['tell']}</span>
|
|
</div>
|
|
<div>
|
|
<i><img src="__PUBLIC__/Webinfo/Templatetwo/images/icon_07_jrby.png" alt=""></i>
|
|
<span style="letter-spacing: 5px;">联系人:</span>
|
|
<span>{$contact['name']}</span>
|
|
</div>
|
|
<div>
|
|
<i><img src="__PUBLIC__/Webinfo/Templatetwo/images/icon_15_0nnk.png" alt=""></i>
|
|
<span>邮政编码:</span>
|
|
<span>{$list['code']}</span>
|
|
</div>
|
|
<div style="margin-bottom: 50px;">
|
|
<i><img src="__PUBLIC__/Webinfo/Templatetwo/images/icon_19_9xlt.png" alt=""></i>
|
|
<span>公司地址:</span>
|
|
<span>{$list['address']}</span>
|
|
</div>
|
|
<div id="allmap" class="map" style="width:100%;flex: 1;height: 200px;">
|
|
<div id="container" style="border:1px solid #C0C0C0;width:150px;height:auto; display:none;"></div>
|
|
</div>
|
|
</div>
|
|
<div class="contact-right">
|
|
<form class="forms">
|
|
<p>昵称</p>
|
|
<input type="text" name="name" id="name" value="">
|
|
<p>联系电话</p>
|
|
<input type="text" name="phone" id="phone" value="">
|
|
<p>电子邮箱</p>
|
|
<input type="text" name="email" id="email" value="">
|
|
<p>内容</p>
|
|
<textarea name="content" id="content"></textarea>
|
|
<button type="button" class="sub" id="submit">提交</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<include file="Templatetwo/footer"/>
|
|
</div>
|
|
<input type="hidden" id="longitude" value="{$aboutusinfofooter['longitude']}">
|
|
<input type="hidden" id="latitude" value="{$aboutusinfofooter['latitude']}">
|
|
</body>
|
|
<script type="text/javascript" src="__PUBLIC__/Webinfo/Templatetwo/js/jquery-3.2.1.min.js"></script>
|
|
<script type="text/javascript" src="__PUBLIC__/Webinfo/Templatetwo/js/public.js"></script>
|
|
<script type="text/javascript" src="__PUBLIC__/layui/layui.js"></script>
|
|
<script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&ak=ObMZWhkHzzF0zbnNgF72Bcws8GHqnya7"></script>
|
|
<script type="text/javascript">
|
|
|
|
|
|
var url = window.location.protocol + "//" + window.location.host;
|
|
var a = url + "/index.php/Retail/login/index.html?code=1";
|
|
$(".login").click(function () {
|
|
window.location.href = a;
|
|
});
|
|
|
|
|
|
var layer;
|
|
layui.use('layer', function () {
|
|
layer = layui.layer;
|
|
})
|
|
$("#submit").click(function () {
|
|
//名字验证
|
|
var name = $('#name').val();
|
|
if (name == '') {
|
|
top.layer.msg('昵称不能为空', {icon: 4, time: 1000});
|
|
return false;
|
|
}
|
|
//手机验证
|
|
var myreg = /^[1][3,4,5,7,8,9][0-9]{9}$/;
|
|
var phone = $('#phone').val();
|
|
if (phone == '') {
|
|
top.layer.msg('联系方式不能为空', {icon: 4, time: 1000});
|
|
return false;
|
|
} else if (!myreg.test(phone)) {
|
|
top.layer.msg('请输入正确的联系方式', {icon: 4, time: 1000});
|
|
return false;
|
|
}
|
|
//邮箱验证
|
|
var reg = /^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/;
|
|
var email = $("#email").val();
|
|
if (email == '') {
|
|
top.layer.msg('邮箱不能为空', {icon: 4, time: 1000});
|
|
return false;
|
|
} else if (!reg.test(email)) {
|
|
top.layer.msg('请输入正确的邮箱', {icon: 4, time: 1000});
|
|
return false;
|
|
}
|
|
//内容验证
|
|
var name = $('#content').val();
|
|
if (name == '') {
|
|
top.layer.msg('内容不能为空', {icon: 4, time: 1000});
|
|
return false;
|
|
}
|
|
if (name.length > 50) {
|
|
top.layer.msg('字数不得大于50', {icon: 4, time: 3000});
|
|
return false;
|
|
}
|
|
var reg = /^[\??。'"‘’“”\.\w\u4E00-\u9FA5\uF900-\uFA2D]{1,50}$/;
|
|
if (!reg.test(name)) {
|
|
top.layer.msg('存在非法字符', {icon: 4, time: 3000});
|
|
return false;
|
|
}
|
|
$.ajax({
|
|
url: "{:U('adds')}",
|
|
type: 'post',
|
|
data: $("form").serialize(),
|
|
success: function (res) {
|
|
console.log(res);
|
|
if (res.status == 1) {
|
|
top.layer.msg(res.msg, {icon: 1, time: 1000});
|
|
} else {
|
|
top.layer.msg(res.msg, {icon: 4, time: 1000});
|
|
}
|
|
},
|
|
error: function () {
|
|
|
|
}
|
|
});
|
|
});
|
|
/**
|
|
* 百度地图
|
|
*/
|
|
// 百度地图API功能
|
|
var longitude = $('#longitude').val();
|
|
var latitude = $('#latitude').val();
|
|
if (!longitude) {
|
|
longitude = 116.404;
|
|
}
|
|
if (!latitude) {
|
|
latitude = 39.915;
|
|
}
|
|
var point = new BMap.Point(longitude, latitude);
|
|
var map = new BMap.Map("allmap"); // 创建Map实例
|
|
map.centerAndZoom(point, 11); // 初始化地图,设置中心点坐标和地图级别
|
|
//添加地图类型控件
|
|
map.addControl(new BMap.MapTypeControl({
|
|
mapTypes: [
|
|
BMAP_NORMAL_MAP,
|
|
BMAP_HYBRID_MAP
|
|
]
|
|
}));
|
|
map.setCurrentCity("北京"); // 设置地图显示的城市 此项是必须设置的
|
|
map.enableScrollWheelZoom(true); //开启鼠标滚轮缩放
|
|
var marker = new BMap.Marker(point); // 创建标注
|
|
map.addOverlay(marker); // 将标注添加到地图中
|
|
</script>
|
|
</html> |