Commit 82204409 by 颜景龙

领取礼物

parent 2b755894
正在显示 包含 45 行增加35 行删除
......@@ -192,9 +192,19 @@
text-align: right;
}
.return-img {
background: #ccc;
border-radius: 2rem;
z-index: 11;
height: 2rem;
width: 2rem;
margin: 0.5rem;
}
</style>
</head>
<body>
<img id="return-img" class="return-img" src="./left_white.png" />
<div class="class-banner">
</div>
<div class="gift-panel clearfix">
......@@ -260,7 +270,7 @@
<p id="description" class="description"></p>
<div class="form-panel">
<form class="zform" action="http://www.baidu.com" id="uploadForm">
<form class="zform" id="uploadForm">
<input type="hidden" data-required="true" data-descriptions="id" name="id" id="id">
<input type="hidden" data-required="true" data-descriptions="customerUserId" name="customerUserId" id="customerUserId">
<div class="zform-control">
......@@ -289,7 +299,7 @@
<script src="https://cdn.bootcss.com/zepto/1.2.0/zepto.min.js"></script>
<script src="../js/zepto-mvalidate.js"></script>
<script type="text/javascript">
var HTTP_URL = 'http://192.168.31.28:8080/weido';
var HTTP_URL = 'http://192.168.31.217:8080/wedo';
function getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
......@@ -380,38 +390,33 @@
firstInvalidFocus: true,
valid:function(event,options){
//点击提交按钮时,表单通过验证触发函数
var body = {
id: $("#id").val(),
consigneeName: $("#consigneeName").val(),
telephone: $("#telephone").val(),
address: $("#address").val(),
customerUserId: $("#customerUserId").val()
};
event.preventDefault();
// $.ajax({
// type: 'POST',
// url: HTTP_URL+"/wedofit/gift/info",
// data: JSON.stringify({
// customerUserId: id,
// id: 8356215132383232
// }),
// contentType: 'application/json',
// dataType: 'json',
// success: function(result){
// if (result.code == 0) {
// var data = result.data;
// initGiftList(data.giftInfo);
// $('.class-banner').css({'background-image': `url(${HTTP_URL}${data.imgPath})`});
// }
// },
// error: function(xhr, type){
// alert('Ajax error!')
// }
// });
event.preventDefault();
var body = {
giftId: parseInt($("#id").val()),
consigneeName: $("#consigneeName").val(),
telephone: $("#telephone").val(),
address: $("#address").val(),
userId: parseInt($("#customerUserId").val())
};
$.ajax({
type: 'POST',
url: HTTP_URL+"/wedofit/gift/getGift",
data: JSON.stringify(body),
contentType: 'application/json',
dataType: 'json',
success: function(result){
if (result.code == 0) {
location.href="ydl://goback";
} else {
alert(result.data);
}
},
error: function(xhr, type){
alert('系统错误!');
}
});
},
eachValidField:function(val){},
......@@ -434,7 +439,12 @@
required : '请填写收获地址'
},
}
});
});
$("#return-img").on('click', function(e){
location.href="ydl://goback";
});
});
</script>
</body>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此消息的编辑!
注册登录 后发表评论