新增地数公众号页面

This commit is contained in:
Jian Shen
2022-06-22 10:55:38 +08:00
parent 0a243ea265
commit 806939a4a3
5 changed files with 592 additions and 8 deletions
@@ -153,13 +153,16 @@ public class SaleLeadsController {
"业务需求:" + saleLeads.getBusiness() + " " + saleLeads.getOtherBusiness() + "\n\n"
+ "姓名:" + saleLeads.getUname() + "\n\n"
+ "城市:" + saleLeads.getCity() + "\n\n"
+ "工作职能:" + saleLeads.getWork() + "" + saleLeads.getOtherWork() + "\n\n"
+ "工作职能:" + saleLeads.getWork() + " " + saleLeads.getOtherWork() + "\n\n"
+ "手机:" + saleLeads.getMobile() + "\n\n"
+ "邮箱:" + saleLeads.getEmail() + "\n\n"
+ "公司名称:" + saleLeads.getCompany() + "\n\n"
+ "行业性质:" + saleLeads.getIndustryNature() + "\n\n";
if (org.apache.commons.lang3.StringUtils.isNotBlank(refUrl) && refUrl.contains("bd_vid")) {
+ "行业性质:" + saleLeads.getIndustryNature() + " " + saleLeads.getOtherIndustryNature() + "\n\n";
body = body.replaceAll("null", "").replaceAll("其他,请填写", "");
if (StringUtils.isNotBlank(refUrl) && refUrl.contains("bd_vid")) {
body += "线索来源:百度";
} else if (StringUtils.isNotBlank(refUrl) && refUrl.contains("didata.wechat")) {
body += "线索来源: 地数公众号";
} else {
body += "线索来源:房价网";
}
@@ -175,14 +178,14 @@ public class SaleLeadsController {
Map<String, String> headers = new HashMap<String, String>();
headers.put("Content-Type", "application/json; charset=utf-8");
request.postWithBody(ding_url, requestBody, headers, "UTF-8");
} catch (HttpRequestException e) {
} catch (Exception e) {
e.printStackTrace();
}
saleLeadsService.save(saleLeads);
// 对于百度广告过来的信息,进行回传
try {
if (org.apache.commons.lang3.StringUtils.isNotBlank(refUrl) && refUrl.contains("bd_vid")) {
if (StringUtils.isNotBlank(refUrl) && refUrl.contains("bd_vid")) {
HttpRequest httpRequest = new HttpRequest();
final String baiduUrl = "https://ocpc.baidu.com/ocpcapi/api/uploadConvertData";
Map<String, String> bdHeaders = new HashMap<String, String>();
@@ -228,7 +231,12 @@ public class SaleLeadsController {
if(StringUtils.isNotBlank(refUrl) && refUrl.contains("/resource/info")){
url = refUrl.substring(refUrl.indexOf("/resource/info"), refUrl.length());
}else{
} else if (StringUtils.isNotBlank(refUrl) && refUrl.contains("didata.wechat")) { // 地数公众号跳转
url = "/enquire/didataSuccess";
if (StringUtils.isNotBlank(refUrl)) {
url = url + "?backUrl=" + URLEncoder.encode(refUrl);
}
} else{
url = "/enquire/success";
if (StringUtils.isNotBlank(refUrl)) {
url = url + "?backUrl=" + URLEncoder.encode(refUrl);
@@ -297,6 +305,10 @@ public class SaleLeadsController {
return model;
}
public Object didataResultAction(SaleLeadsModel model) {
return model;
}
public SaleLeadsService getSaleLeadsService() {
return saleLeadsService;
}
@@ -309,7 +309,17 @@
<ladder>/</ladder>
</ladders>
</rule>
<rule controller="saleLeads" action="didataApply" channel="enquire">
<ladders>
<ladder>/didataApply</ladder>
</ladders>
</rule>
<rule controller="saleLeads" action="didataResult" channel="enquire">
<ladders>
<ladder>/didataSuccess</ladder>
</ladders>
</rule>
<rule controller="saleLeads" action="result" channel="enquire">
<ladders>
@@ -0,0 +1,474 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<title>时空价值挖掘平台 -地数 didata.ai</title>
<meta name="keywords" content="地址数据智能处理,时空价值计算,时空数据统计分析,自动化客户分类建模">
<meta name="description" content="提交联系信息,估价科技将为您提供详尽的产品功能及服务介绍">
<#include "../jsconstants.ftl" />
<link href="${staticUrl}/style/fangjia/v5/common.css?v=${version}" rel="stylesheet">
<link href="${staticUrl}/style/fangjia/v5/main.css?v=${version}" rel="stylesheet">
<link href="${staticUrl}/style/fangjia/v5/city.css?v=${version}" rel="stylesheet">
<link href="${staticUrl}/style/fangjia/v5/user.css?v=${version}" rel="stylesheet">
<script src="${staticUrl}/js/fangjia/v5/jquery-1.7.2.min.js?v=${version}"></script>
<style>
.inputInfoBox01 .inputInfo label.label01a{margin-top:10px;}
</style>
<script>
if((navigator.userAgent.match(/(iPad|iPhone|iPod|Android|ios)/i))){
document.write("<link href='${staticUrl}/style/fangjia/v5/sm.css?v=${version}' rel='stylesheet'>");
document.write("<link href='${staticUrl}/style/fangjia/v5/main-m.css?v=${version}' rel='stylesheet'>");
document.write("<link href='${staticUrl}/style/fangjia/v5/city-m.css?v=${version}' rel='stylesheet'>");
document.write("<link href='${staticUrl}/style/fangjia/v5/theme-orange.css?v=${version}' rel='stylesheet'>");
document.write("<link href='${staticUrl}/style/fangjia/v5/mobile.css?v=${version}' rel='stylesheet'>");
}
</script>
<style>
@media(max-device-width:768px){
.main{padding-top:0;}
.main_left{display:none;}
.main_right{float:none;width:100%;}
.user{width:100%;margin-top:6rem;}
.user02{margin-left:0;}
.title{text-align:center;position:static;}
.title p{margin:1rem;}
.content{padding:0 1rem;padding-top:2rem;}
.content03 .inputInfoBox{overflow:visible;}
.inputInfoBox01{float:none;}
.inputInfoBox01 .inputInfo{width:100%;height:40px;margin-bottom:20px;clear:both;}
.inputInfoBox01 .inputInfo label{float:left;line-height:40px;}
.inputInfoBox01 .inputInfo label.label01{float:left;line-height:20px;width:66px;}
.inputInfoBox01 .inputInfo label.label01a{clear:both;margin-bottom:17px;margin-top:17px;}
.inputInfoBox01 .inputInfo label i{margin-left:5px;}
.inputInfoBox01a{margin-right:0;}
.inpu,.sel{height:40px;line-height:40px;}
.inpu,.sel,.demand{width:89.5%;float:right;}
.dialogBox .inpu{float:left;}
.inpu01{width:70%;}
.inpu02a{margin-top:17px;}
#selectedCity{width:auto;}
.error01{top:-17px;left:78px;}
.user_btn,.line{width:100%;}
.footerM{display:none;}
}
@media(max-device-width:414px){
.inpu,.sel,.demand{width:79.5%;}
.inpu01{width:45%;}
}
@media(max-device-width:375px){
.inpu,.sel,.demand{width:77%;}
.inpu01{width:40%;}
}
@media(max-device-width:320px){
.inpu,.sel,.demand{width:73%;}
.inpu01{width:30%;}
.demand p span{width:80%;}
}
</style>
</head>
<body>
<#escape x as x?html>
<div class="header">
<div style="background-color: black;">
<div class="logo" style="padding-top:2px;">
<img class="img-box__img4" src="http://www.didata.ai/upload/20220522/3324a05faa1a88d483572ec64ac48c82.png"></img>
<#-- <a href="http://www.didata.ai/upload/20220522/3324a05faa1a88d483572ec64ac48c82.png"></a>-->
</div>
</div>
</div>
<div class="main">
<div class="main_right">
<div class="user user02">
<div class="title">
<p><label>预约产品Demo申请</label></p>
<p><small>我们很乐意为您提供帮助<br/>
&radic; 详尽的产品功能及服务介绍<br/>
&radic; 针对您所处的行业与业务场景,提供专业的服务方案<br/>
&radic; 根据您的业务规模和需求,提供优惠的价格方案<br/>
紧急咨询可拨打<strong>400-188-3787</strong><br/>
预约申请请留下您的联系方式,我们会尽快与您联系<br/>
</small>
</p>
</div>
<div class="content content03">
<form action="${wwwUrl}/saleLeads/doAdd" method="POST" id="_add_form">
<input type="hidden" name="mid" value="${mid!}"/>
<input type="hidden" name="downUrl" value="${downUrl!}"/>
<input type="hidden" name="backUrl" value="${backUrl!}"/>
<input type="hidden" name="resourceId" value="${resourceId!}"/>
<div class="inputInfoBox">
<div class="inputInfoBox01 inputInfoBox01a">
<div class="inputInfo">
<label>您的姓名<i>*</i></label>
<input class="inpu inpu02" name="saleLeads.uname" id="uname" type="text" autocomplete="off" placeholder="请输入您的姓名">
<div class="error error01 dn"><i></i><span></span></div>
</div>
<div class="inputInfo">
<label>公司名称<i>*</i></label>
<input class="inpu inpu02" name="saleLeads.company" id="company" type="text" autocomplete="off" placeholder="请输入您的公司名称">
<div class="error error01 dn"><i></i><span></span></div>
</div>
<div class="inputInfo">
<label><a class="ls2_01">手</a><a class="ls2_02">机</a><i>*</i></label>
<input class="inpu inpu02" type="text" name="saleLeads.mobile" id="mobile" autocomplete="off" placeholder="请输入您的手机号码">
<div class="error error01 dn"><i></i><span></span></div>
</div>
<div class="inputInfo">
<label><a class="ls2_01">留</a><a class="ls2_02">言</a><i></i></label>
<textarea class="inpu inpu02" scoll="auto" style="height:60px;padding-top:2px;" name="saleLeads.business" id="business">
</textarea>
<div class="error error01 dn"><i></i><span></span></div>
</div>
</div>
</div>
</form>
</div>
<a class="user_btn">提交</a>
</div>
</div>
</div>
</div>
<#include "/header/v5/_footer.ftl" />
<#include "../citys.ftl"/>
<style>
@media(max-device-width:768px){
.main{padding-top:0;}
.main_left{display:none;}
.main_right{float:none;width:100%;}
.user{width:100%;margin-top:6rem;}
.user02{margin-left:0;}
.title{text-align:center;position:static;}
.title p{margin:1rem;}
.content{padding:0 1rem;padding-top:2rem;}
.content03 .inputInfoBox{overflow:visible;}
.inputInfoBox01{float:none;}
.inputInfoBox01 .inputInfo{width:100%;height:40px;margin-bottom:20px;clear:both;}
.inputInfoBox01 .inputInfo label{float:left;line-height:40px;}
.inputInfoBox01 .inputInfo label.label01{float:left;line-height:20px;width:66px;}
.inputInfoBox01 .inputInfo label.label01a{clear:both;margin-bottom:17px;margin-top:17px;}
.inputInfoBox01 .inputInfo label i{margin-left:5px;}
.inputInfoBox01a{margin-right:0;}
.inpu,.sel{height:40px;line-height:40px;}
.inpu,.sel,.demand{width:89.5%;float:right;}
.dialogBox .inpu{float:left;}
.inpu01{width:70%;}
.inpu02a{margin-top:17px;}
#selectedCity{width:auto;}
.error01{top:-17px;left:78px;}
.user_btn,.line{width:100%;}
.footerM{display:none;}
}
@media(max-device-width:414px){
.inpu,.sel,.demand{width:79.5%;}
.inpu01{width:45%;}
}
@media(max-device-width:375px){
.inpu,.sel,.demand{width:77%;}
.inpu01{width:40%;}
}
@media(max-device-width:320px){
.inpu,.sel,.demand{width:73%;}
.inpu01{width:30%;}
.demand p span{width:80%;}
}
.img-box__img4 {
background-color: black;
width: 100%;
height: 50px;
object-fit: contain;
}
</style>
<script>
var retFlag = 1;
</script>
<script type="text/javascript" src="${staticUrl}/js/fangjiaNew.js?v=${version}"></script>
<script src="${staticUrl}/js/fangjia/v5/main.js?v=${version}"></script>
<script src="${staticUrl}/js/fangjia/v5/city.js?v=${version}"></script>
<script type="text/javascript" src="//g.alicdn.com/sj/lib/zepto/zepto.js" charset="utf-8"></script>
<script>
/* 关闭路由,以实现不同页面之间的相互跳转(仅开发环境需要) */
Zepto = $
$.config = {router: false}
</script>
<script src="${staticUrl}/js/fangjia/v5/light7.js?v=${version}"></script>
<script src="${staticUrl}/js/fangjia/v5/cn.js?v=${version}"></script>
<script>
var controllerName = '${controllerName}';
var mid = '${mid!}'
$(function(){
if((navigator.userAgent.match(/(iPad|iPhone|iPod|Android|ios)/i))){
$(".popup-about01 .tabs a").removeAttr("href");//去除城市页面跳转
}
})
$(".user_btn").click(function(){
if(!checkContactName()){
scrollTo(0,0);
return false;
}
if(!checkCompany()){
scrollTo(0,0);
return false;
}
if(!checkMobile2()){
scrollTo(0,0);
return false;
}
/*if(!checkEmail()){
scrollBy(0,-300);
return false;
}
if(!checkWork()){
scrollBy(0,-100);
return false;
}
if(!checkNature()){
scrollBy(0,-200);
return false;
}
if(mid=="1018"||mid=="1016"){
if(!checkOtherInfo()){
scrollBy(0,-100);
return false;
}
}
*/
// var cls = $(".agreement i").attr("class");
// if(cls.indexOf("checked")>-1){
// $("#emailStatus").val(true);
// }else{
// $("#emailStatus").val(false);
// }
$("#_add_form").submit();
});
function checkOtherNature(){
var otherNature = $("#otherIndustryNature").val();
if($.trim(otherNature) == ""){
$("#otherIndustryNature").parent().find(".error:eq(0)").show();
$("#otherIndustryNature").parent().find(".error:eq(0) span").text("其他行业性质不能为空");
return false;
}else{
$("#otherIndustryNature").parent().find(".error:eq(0)").hide();
if(!checkIndustryNature()){
return false;
}
}
return true;
}
function checkIndustryNature(){
var otherWork = $("#otherWork2").val();
if($.trim(otherWork) == ""){
$("#otherIndustryNature").parent().find(".error:eq(1) span").text("其他工作职能不能为空");
$("#otherIndustryNature").parent().find(".error:eq(1)").removeClass("dn")
return false;
}else{
$("#otherIndustryNature").parent().find(".error:eq(1)").hide();
}
return true;
}
function checkWork(){
var val = $("#nature").val();
if(val!=""){
if(val.indexOf("请填写")>0){
return checkOtherNature();
}else{
var work = $(".duty:visible").find("select").val()
if($.trim(work) == "请选择您的工作职能"){
$(".duty:visible").find(".error span").text("工作职能不能为空");
$(".duty:visible").find(".error").show();
return false;
}else if(work.indexOf("请填写")>-1){
return checkOtherWork();
}else{
$("#work").val(work);
$(".duty:visible").find(".error").text("");
}
}
}
return true;
}
function checkOtherWork(){
var otherWork = $("#otherWork").val();
if($.trim(otherWork) == ""){
$("#otherWork").parent().find(".error span").text("其他工作职能不能为空");
$("#otherWork").parent().find(".error").show();
return false;
}else{
$("#otherWork").parent().find(".error").text("");
}
return true;
}
function checkNature(){
var val = $("#nature").val();
if ($.trim(val) == "") {
$("#nature").parent().find(".error span").text("行业性质不能为空");
$("#nature").parent().find(".error").show();
return false;
}else{
$("#nature").parent().find(".error").text("");
if(val.indexOf("请填写")>-1){
return checkOtherNature();
}
}
return true;
}
function checkMobile2(){
var val = $("#mobile").val();
if ($.trim(val) == "") {
$("#mobile").parent().find(".error span").text("手机号码不能为空");
$("#mobile").parent().find(".error").show();
return false;
}else if(!(/^1\d{10}$/.test(val))){
$("#mobile").parent().find(".error span").text("手机号码格式错误");
$("#mobile").parent().find(".error").show();
return false;
} else{
$("#mobile").parent().find(".error").text("");
}
return true;
}
function checkContactName(){
var val = $("#uname").val();
if ($.trim(val) == "") {
$("#uname").parent().find(".error span").text("您的姓名不能为空");
$("#uname").parent().find(".error").show();
return false;
}else{
$("#uname").parent().find(".error").hide();
}
return true;
}
function checkEmail(){
var val = $("#email").val();
if($.trim(val) == ""){
$("#email").parent().find(".error span").text("电子邮箱不能为空");
$("#email").parent().find(".error").show();
return false;
}else if (!/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/.test(val)) {
$("#email").parent().find(".error span").text("电子邮箱格式错误");
$("#email").parent().find(".error").show();
return false;
}else{
$("#email").parent().find(".error").text("");
}
return true;
}
function checkCompany(){
var val = $("#company").val();
if ($.trim(val) === "") {
$("#company").parent().find(".error span").text("公司名称不能为空");
$("#company").parent().find(".error").show();
return false;
}else{
$("#company").parent().find(".error").text("");
}
return true;
}
function checkOtherInfo(){
var box = $(".demand p i.checked");
if(box.length>0){
$(".demand").parent().find(".error span").text("")
$(".demand").parent().find(".error").hide();
var selectOtherFlag = false;
var content = []
box.each(function(){
var s = $(this).parent().find("span").text();
if(s.indexOf("请填写")>0){
selectOtherFlag = true;
}
content.push(s);
})
$("#business").val(content.join("_"));
if(selectOtherFlag){
var otherBusiness = $("#otherBusiness").val();
if ($.trim(otherBusiness) == "") {
$("#otherBusiness").parent().find(".error span").text("其他业务需求不能为空");
$("#otherBusiness").parent().find(".error").show();
return false;
}else{
$("#otherBusiness").parent().find(".error").text("");
}
}
}else{
$(".demand").parent().find(".error span").text("请至少勾选1项业务需求")
$(".demand").parent().find(".error").show();
return false;
}
return true;
}
/* 定位城市 */
$("body").on("click", ".letter a", function () {
var s = $(this).html();
$(".content").scrollTop(0);
$(".content").scrollTop($("#" + s + "1").offset().top - 66);
});
$(".content-block01").scroll(function () {
$(".content-block01 .letter").css("position","absolute");
$(".content-block01 .letter").css("top", 116 - $("#cityContainer").position().top);
});
/* 获取城市 移动端 */
$(".popup-about01 .cityGPS").on("click", function () {
$("#selectedCity,#city").val($(this).find("p").text());
//$(".adBoxApp01").show();
});
$("body").delegate(".popup-about01 a","click", function(){
$("#selectedCity,#city").val($(this).text());
//$(".adBoxApp01").show();
});
$(".popup-about01-mobile .cityGPS").on("click", function () {
$("#selectedCity,#city").val($(this).find("p").text());
//$(".adBoxApp01").show();
});
$("body").delegate(".popup-about01-mobile a","click", function(){
$("#selectedCity,#city").val($(this).text());
//$(".adBoxApp01").show();
});
$(".popup-about01 .icon-left").on("click", function () {
//$(".adBoxApp01").show();
});
</script>
</#escape>
</body>
</html>
@@ -0,0 +1,87 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<title>咨询信息提交成功 - 地数 didata.ai</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link href="${staticUrl}/style/fangjia/v5/common.css?v=${version}" rel="stylesheet">
<link href="${staticUrl}/style/fangjia/v5/main.css?v=${version}" rel="stylesheet">
<link href="${staticUrl}/style/fangjia/v5/user.css?v=${version}" rel="stylesheet">
<script src="${staticUrl}/js/fangjia/v5/jquery-1.7.2.min.js?v=${version}"></script>
<script>
if((navigator.userAgent.match(/(iPad|iPhone|iPod|Android|ios)/i))){
document.write("<link href='${staticUrl}/style/fangjia/v5/mobile.css?v=${version}' rel='stylesheet'>");
}
</script>
<style>
@media(max-device-width:768px){
.main{padding-top:0;}
.main_right{float:none;width:100%;}
.user{width:90%;margin-top:15rem;}
.footerM{display:none;}
}
.img-box__img4 {
background-color: black;
width: 100%;
height: 50px;
object-fit: contain;
}
</style>
</head>
<body>
<div class="header">
<div style="background-color: black;">
<div class="logo" style="padding-top:2px;">
<img class="img-box__img4" src="http://www.didata.ai/upload/20220522/3324a05faa1a88d483572ec64ac48c82.png"></img>
<#-- <a href="http://www.didata.ai/upload/20220522/3324a05faa1a88d483572ec64ac48c82.png"></a>-->
</div>
</div>
</div>
<div class="main">
<div class="main_right">
<div class="user user03">
<div class="content">
<p class="success"><i></i>您的信息已提交成功</p>
<p class="link" style="color:#333;">我们的专业数据顾问将会尽快与您取得联系,感谢您的咨询!</p>
<p class="note">若您有任何问题,欢迎拨打客服电话:<a>400-188-3787</a></p>
</div>
</div>
</div>
</div>
<#include "/header/v5/_footer.ftl"/>
<style>
@media(max-device-width:768px){
.main{padding-top:0;}
.main_right{float:none;width:100%;}
.user{width:90%;margin-top:15rem;}
.footerM{display:none;}
}
</style>
<script src="${staticUrl}/js/fangjia/v5/main.js?v=${version}"></script>
<script>
var url = '${backUrl!}';
var downUrl = '${downUrl!}';
if(!downUrl){
setTimeout("location.href='"+url+"'",3000);
}else{
setTimeout("location.href='"+url+"&downUrl="+downUrl+"'",3000);
}
</script>
</body>
</html>
@@ -22,7 +22,8 @@ public enum SalesLeadEnum {
DOWN_APPLY("1016", "下载申请"),
FDANG_DIAO_BAO_GAO("1017", "房产专业调查评估报告"),
BUSINESS_ASK("1018", "业务咨询"),
HOUSE_EVAL("1019", "房产评估");
HOUSE_EVAL("1019", "房产评估"),
DIDATA("1020", "地数平台");