Commit 82204409 by 颜景龙

领取礼物

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