Commit c2ba6f7c authored by zhangjianguo's avatar zhangjianguo

下次旅行的接口绑定

parent 6c31c91c
......@@ -8,7 +8,7 @@
<meta content="yes" name="apple-mobile-web-app-capable" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<title>下次旅行计划</title>
<script type="text/javascript" src="../../js/autosize2.js"></script>
<script type="text/javascript" src="js/autosize2.js"></script>
<link rel="stylesheet" href="css/animate.min.css">
<link rel="stylesheet" href="css/Travelplan.css">
</head>
......@@ -40,9 +40,9 @@
<div class="c_r"></div>
<div class="text_bg2 animated fadeIn">
<div class="textc">
<p>您好,还记得您在2月12日留下的”半年内想要去欧洲旅游”的计划吗?看看有没有你喜欢的旅程吧~</p>
<p class="center">您好,还记得您在2月12日留下的”半年内想要去欧洲旅游”的计划吗?看看有没有你喜欢的旅程吧~</p>
<div class="xian"></div>
<div class="gwen">您的专属旅游顾问:罗超,17308037817</div>
<div class="gwen">您的专属旅游顾问:xxx,xxxxxxxxxx</div>
</div>
</div>
<div class="wangx animated fadeIn"></div>
......@@ -65,17 +65,17 @@
<img src="http://t8.baidu.com/it/u=4269609316,2027584941&fm=79&app=86&f=JPEG?w=1500&h=1000" alt="" class="cp_img">
<p class="cp_tilte">欧洲XXX</p>
<p class="cp_cen">迪士尼/落地签/xxxx</p>
<div class="cp_btn">
<a class="cp_btn_l" href="sametrade://view/jumpUrl=vtb://teamWalker/view?productID=102">
查看详情
</div>
</a>
</div>
<div class="cp_r">
<img src="http://t8.baidu.com/it/u=4269609316,2027584941&fm=79&app=86&f=JPEG?w=1500&h=1000" alt="" class="cp_img">
<p class="cp_tilte">欧洲XXX</p>
<p class="cp_cen">迪士尼/落地签/xxxx</p>
<div class="cp_btn">
<a class="cp_btn_r" href="vtassistant://view/jumpUrl=vt://productDetail/view?productID=102">
查看详情
</div>
</a>
</div>
</div>
......@@ -87,13 +87,84 @@
</body>
<script src="../../js/moveJs/jquery.min.js"></script>
<script src="js/jquery.min.js"></script>
<script>
$('.wangx').click(function () {
$('html,body').animate({scrollTop:$('.logo').offset().top}, 800)
})
// let href = window.location.href;
// let href = 'http://activity.oytour.com/html/shortLinks/BirthdayLetter.html?GuestId=11&customerId=1549&accountId=1182&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1ODY4NTQ2NTQuMCwiZXhwIjoxNTg3MTEzODU0LjAsInVzZXJJbmZvIjp7InVpZCI6IjExODIiLCJyZXF1ZXN0RnJvbSI6M319.VWDrjGI7lVe8MCis1FFOCuUBB7w_FsQhKoYZ3dEMznU&secretKey=5d5e16254bd741c486fe2b83b42171d2&platform=app';
let href = 'http://activity.oytour.com/html/shortLinks/BirthdayLetter.html?Id=11'
// let href = 'http://activity.oytour.com/html/shortLinks/BirthdayLetter.html?GuestId=11'
let param = href.split('?')[1];
let Id;
let name;
let msg;
if(param.indexOf('&')!=-1){
Id = param.split('&')[0].split('=')[1]
name = param.split('&')[0].split('=')[0]
}else {
Id = param.split('=')[1]
name = param.split('=')[0]
}
if(name== 'Id'){
msg = JSON.stringify( {'msg':{'Id':Id}})
}else {
msg = JSON.stringify( {'msg':{'GuestId':Id}})
}
$.ajax({
type: "POST",
// url: `http://crm.oytour.com/api/SellEventIM/GetNextPlan`,
url: `http://192.168.2.65/api/SellEventIM/GetNextPlan`,
contentType: "application/json",
data: msg,
async: false,
success: function(res) {
if(res.data!=null && res.data.model !=null){
let model = res.data.model;
let CreateDate = model.CreateDate!=null ?model.CreateDate.split('T')[0]:'';
let OptionsName = model.OptionsName!=null ? model.OptionsName:'';
let TextContent = model.TextContent!=null ? model.TextContent:'';
let Contact = model.Contact!=null ? model.Contact:'';
let ContactNumber = model.ContactNumber!=null ? model.ContactNumber:'';
$('.center').text('您好,还记得您在'+CreateDate+'留下的"'+OptionsName+'想要去'+TextContent+'旅游"的计划吗?看看有没有你喜欢的旅程吧~')
$('.gwen').text('您的专属旅游顾问:'+Contact+','+ContactNumber+'')
}
if(res.data!=null && res.data.listNextPlan!=null &&res.data.listNextPlan.length>0 ){
let listNextPlan = res.data.listNextPlan;
$(".cp_l .cp_img").attr('src',JSON.parse(listNextPlan[0].ImgCover)[0].Url);
$(".cp_l .cp_tilte").text(listNextPlan[0].Title.slice(0,5));
$(".cp_l .cp_cen").text(listNextPlan[0].Title);
$('.cp_btn_l').click(function () {
console.log(listNextPlan[0].TCID)
})
$(".cp_r .cp_img").attr('src',JSON.parse(listNextPlan[1].ImgCover)[0].Url);
$(".cp_r .cp_tilte").text(listNextPlan[1].Title.slice(0,5));
$(".cp_r .cp_cen").text(listNextPlan[1].Title);
$('.cp_btn_r').click(function () {
console.log(listNextPlan[1].TCID)
})
}
},
error: function(res) {
}
})
</script>
</html>
......@@ -299,8 +299,12 @@ p{
font-size: 0.11rem;
color: #666666;
margin: 0.05rem 0 0 0.1rem;
height: 0.18rem;
line-height: 0.18rem;
overflow: hidden;
}
.cp_btn{
.cp_btn_l,.cp_btn_r{
text-decoration: none;
width: 0.7rem;
height: 0.23rem;
border-radius: 0.115rem;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment