From 133e3c84dc3d959bd02a0fb7cb07e8e4046b5726 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=B9=8F?= Date: Fri, 27 Aug 2021 16:06:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=AD=E7=89=A9=E8=BD=A6=E7=8B=AC=E7=AB=8B?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/train/shopcart.css | 28 +++++++++++++++++++++++ js/train-mobile/train.js | 48 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 css/train/shopcart.css diff --git a/css/train/shopcart.css b/css/train/shopcart.css new file mode 100644 index 0000000..b8c3c6e --- /dev/null +++ b/css/train/shopcart.css @@ -0,0 +1,28 @@ +body{ font-family:Verdana, Geneva, sans-serif;} +/*购物车整体*/ +.shoppingcart{ } +/*页头*/ +.cartTitleBG{height:60px; background:url(https://data.chinahighlights.com/css/images/train/shopping-cart-bg.jpg) repeat;} +.cartTitle{ height:60px; background:url(https://data.chinahighlights.com/css/images/train/shopping-cart.png) no-repeat; margin:0 0 15px 0; } +/*正文*/ +h1{ font-size:14px; font-weight:100; color:#8d8a8a; margin:0 0 10px 0; padding:0;} +/*价格部分*/ +#cartTable.priceTable{ border-top:3px solid #d1d1d1;} +#cartTable.priceTable tr th{ border-bottom:1px solid #d1d1d1; font-size:13px; color:#8d8a8a; font-weight:100; padding:5px 0 5px 0; text-align:center;} +#cartTable.priceTable tr td{ font-size:12px; color:#545454; text-align:center; padding:10px 0 10px 0; border-bottom:1px solid #d1d1d1!important; line-height:20px;} +#cartTable.priceTable tr td span.leftTicket{ color:#1e97cf; font-style:italic;} +#cartTable.priceTable tr td span.ticketPrice{ color:#d82c23; font-size:18px;} +a.delete{ color:#1486c1;} +/*按钮*/ +.moreRoute{ font-size:13px; color:#545454; text-align:right; margin:10px 0 10px 0;} +a.addroute{ display:inline-block; font-size:15px; color:#FFF; background:url(https://data.chinahighlights.com/css/images/train/shopping-cart.png) no-repeat 5px -98px; float:right; height:30px; padding:5px 35px 0 10px; margin:0 0 0 15px; text-decoration:none;} +a.addroute:hover{ background:url(https://data.chinahighlights.com/css/images/train/shopping-cart.png) no-repeat 5px -151px;} +a.continue{ display:inline-block; font-size:15px; color:#FFF; background:url(https://data.chinahighlights.com/css/images/train/shopping-cart.png) no-repeat -147px -97px; float:right; height:28px; padding:5px 24px 0 10px; margin:0 0 0 15px; text-decoration:none;} +a.continue:hover{ background:url(https://data.chinahighlights.com/css/images/train/shopping-cart.png) no-repeat -147px -150px;} +span.note{ display:block; float:right; display:block; padding:12px 0 0 0; } +.clear { + clear: both; + width: 100%; + border: 0; + line-height: 0 +} \ No newline at end of file diff --git a/js/train-mobile/train.js b/js/train-mobile/train.js index 209db16..111404e 100644 --- a/js/train-mobile/train.js +++ b/js/train-mobile/train.js @@ -463,4 +463,50 @@ function autocomplete(inp, arr) { hideDv(); }); - } \ No newline at end of file + } + + + +/** 表单验证 */ +function Chk_InnerTrainForm(){ + var Txt_FZ_1 = document.getElementById("Txt_FZ_1").value; + var Txt_DZ_1 = document.getElementById("Txt_DZ_1").value; + var stationDate_1 = document.getElementById("stationDate_1").value; + if (Txt_FZ_1 === '') { + alert("Please enter your departure city!"); + document.getElementById("Txt_FZ_1").focus(); + return false; + } + if (Txt_DZ_1 === '') { + alert("Please enter your arrival city!"); + document.getElementById("Txt_DZ_1").focus(); + return false; + } + if (stationDate_1 === '') { + alert("Please select a travel date!"); + document.getElementById("stationDate_1").focus(); + return false; + } + loaderOn(); + return true; +} + +function Chk_IntelTrainForm(){ + var IT_Txt_FZ_1 = document.getElementById("IT_Txt_FZ_1").value; + var IT_Txt_DZ_1 = document.getElementById("IT_Txt_DZ_1").value; + var stationDate_IT_1 = document.getElementById("stationDate_IT_1").value; + if (IT_Txt_FZ_1 === '') { + alert("Please select your departure city!"); + return false; + } + if (IT_Txt_DZ_1 === '') { + alert("Please select your arrival city!"); + return false; + } + if (stationDate_IT_1 === '') { + alert("Please select a travel date!"); + return false; + } + loaderOn(); + return true; +} \ No newline at end of file