20191023.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="pragma" content="no-cache">
  6. <meta http-equiv="cache-control" content="no-cache">
  7. <meta http-equiv="expires" content="0">
  8. <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
  9. <meta name="apple-mobile-web-app-capable" content="yes">
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  11. <meta name="format-detection" content="telphone=no, email=no" />
  12. <title>Aiberle爱贝源</title>
  13. <link rel="stylesheet" type="text/css" href="css/mui.min.css" />
  14. <link rel="stylesheet" type="text/css" href="css/iconfont.css" />
  15. <link rel="stylesheet" type="text/css" href="css/main.css" />
  16. <style>
  17. .year-dalog{background:url(images/year-dalog.png) center center no-repeat rgba(0,0,0,.7);background-size: 80% auto; position: fixed;left: 0;top: 0;right: 0;bottom: 0;width: 100%; height: 100%;z-index: 99;display: none;-webkit-transform: translateY(-100%);transform: translateY(-100%); -webkit-transition: .5s;transition: .5s;}
  18. .year-dalog.active{-webkit-transform: translateY(0%);transform: translateY(0%);}
  19. .year-dalog img{width: 100%;}
  20. div{color: #000000;}
  21. /* .header { padding: 10px 0 7px 0; height: 65px; box-shadow: 0 0 0 #fff; background: #fff; }
  22. .header h6 { text-indent: 12px; color: #999; letter-spacing: 2px; }
  23. .go-index { width: 30%; margin-right: 1%; float: none; }
  24. .go-index img { width: 80%; padding-top: 5px; margin-left: 12px; max-width: 100px; }
  25. .swiper-container-horizontal>.swiper-pagination-bullets { bottom: 0; }
  26. .swiper-pagination-bullet-active { background: #63ccde; }
  27. .index-title { padding: 7px 12px 7px 12px; display: block; position: relative; }
  28. .index-title strong { font-size: 17px; }
  29. .index-title .mui-pull-right { color: #333; }
  30. .index-title font { display: inline-block; -webkit-transform: translateY(-1px); transform: translateY(-1px); }
  31. .pro-list .mui-media-object { background: #f2f2f2; border-radius: 5px; display: block; }
  32. .pro-list:before,.pro-list:after {display: none;} */
  33. /* .pro-list.mui-table-view.mui-grid-view>li:nth-child(odd) {padding: 10px 8px 0 14px;} */
  34. /* .pro-list.mui-table-view.mui-grid-view>li:nth-child(even) {padding: 10px 0 0 22px;} */
  35. .pro-list.mui-table-view.mui-grid-view>li:nth-child(odd){padding: 0px;}
  36. .pro-list.mui-table-view.mui-grid-view>li:nth-child(even){padding: 0px;}
  37. .mui-table-view.mui-grid-view {padding: 0px;}
  38. .mui-table-view{}
  39. .pro-list h6 {margin: 7px 0;color: #bbb;}
  40. .pro-list .pro-price {font-size: 14px;margin-top: 8px;}
  41. .pro-list .pro-price span {color: #db3f53;}
  42. .pro-list .pro-price s {color: #bbb;margin-left: 15px;}
  43. body{padding: 0px;margin: 0px;background-color: #FFFFFF;}
  44. .coupon_class{padding-top:12px ;}
  45. .ul_class>ul>li{float: left;display: block;}
  46. .ul_class>ul>li>img{display: block;width: 100%;}
  47. .ul_class{display: block;width: 100%;}
  48. </style>
  49. </head>
  50. <script>
  51. var start = new Date(2019,9,24,8,00,00);
  52. var end = new Date(2019,10,11,23,59,59);
  53. var d = new Date().getTime(); //当前时间戳
  54. if (!(d > start && d <= end)) {
  55. location.href = "index.html";
  56. }
  57. </script>
  58. <body>
  59. <footer class="mui-bar mui-bar-tab" id="footer-bar-tab">
  60. <a class="mui-tab-item mui-active">
  61. <span class="iconfont icon-shouye"></span>
  62. <span class="mui-tab-label">首页</span>
  63. </a>
  64. <a class="mui-tab-item">
  65. <span class="iconfont icon-gouwuche"></span>
  66. <span class="mui-tab-label">购物车</span>
  67. </a>
  68. <a class="mui-tab-item">
  69. <span class="iconfont icon-dingdan"></span>
  70. <span class="mui-tab-label">订单</span>
  71. </a>
  72. <a class="mui-tab-item">
  73. <span class="iconfont icon-wode"></span>
  74. <span class="mui-tab-label">我的</span>
  75. </a>
  76. </footer>
  77. <div class="" style="background-color: #fff2f3;">
  78. <img width="100%" src="images/20191024/banner.jpg" />
  79. </div>
  80. <div class="coupon_class ul_class" style="height: 90px;background-color:#fff2f3 ;">
  81. <ul>
  82. <li style="width: 28%;margin-left: 5%;" couponId="31000"><img src="images/20191024/q_10.png" /></li>
  83. <li style="width: 28%;margin-left: 3%;" couponId="31001"><img src="images/20191024/q_20.png" /></li>
  84. <li style="width: 28%;margin-left: 3%;" couponId="31002"><img src="images/20191024/q_50.png" /></li>
  85. </ul>
  86. </div>
  87. <div class="slogan_class ul_class" style="height: 65px;padding-top:15px ;">
  88. <ul>
  89. <li style="width: 48%;"><img style="margin-left: 3%;" src="images/20191024/box_ms.jpg" /></li>
  90. <li style="width: 48%;"><img style="margin-left: 5%" src="images/20191024/box_xsg.jpg" /></li>
  91. </ul>
  92. </div>
  93. <div class="ms_class ul_class" style="height: 210px;padding-top:5px ;">
  94. <ul>
  95. <li style="width: 48%;"><img style="margin-left: 3%;height: 205px;" src="images/20191024/ms_before.jpg" /></li>
  96. <li style="width: 48%;"><img style="margin-left: 5%;height: 205px;" src="images/20191024/ms_before_zp.jpg" /></li>
  97. </ul>
  98. <div style="position: relative;display: block; top: -104px; left: 20%; font-weight: bold; color: #FF666B; width: 80px; height: 20px; float: left;" id="endDate">23:59:59</div>
  99. </div>
  100. <div class="slogan_class ul_class" style="height: 53px;padding-top:0px ;margin-top: 10px;">
  101. <ul>
  102. <li style="width: 97%;"><img style="margin-left: 1.5%;" src="images/20191024/box_zj.jpg" /></li>
  103. </ul>
  104. </div>
  105. <div class="mui-content" style="background: #fff;padding-top:15px ;">
  106. <!--list结束-->
  107. <div class="index-title go_web_shop" style="margin-top: 0px;">
  108. <strong>Aiberle</strong><span class="mui-pull-right go_pro_list" type="aiberle"><font>更多</font><span class="mui-icon mui-icon-arrowright"></span></span>
  109. </div>
  110. <div class="chanpin-box" style="padding-bottom: 5px;">
  111. <ul class="mui-table-view mui-grid-view my-view-no to_goods" >
  112. <li class="mui-table-view-cell mui-media mui-col-xs-4" style="margin: 0px;padding: 0px;" >
  113. <a proid="33" class="go_chanpin_details" style="width: 96%;padding-left: 3%;padding-right: 1%;margin: 0px;">
  114. <img class="mui-media-object" src="images/20191024/wb_1_sj.jpg">
  115. </a>
  116. </li>
  117. <li class="mui-table-view-cell mui-media mui-col-xs-4" style="margin: 0px;padding: 0px;">
  118. <a proid="39" class="go_chanpin_details" style="width: 96%;padding-left: 2%;padding-right: 2%;margin: 0px;">
  119. <img class="mui-media-object" src="images/20191024/lv_sj.jpg">
  120. </a>
  121. </li>
  122. <li class="mui-table-view-cell mui-media mui-col-xs-4" style="margin: 0px;padding: 0px;">
  123. <a proid="46" class="go_chanpin_details" style="width: 96%;padding-left: 1%;padding-right: 3%;margin: 0px;">
  124. <img class="mui-media-object" src="images/20191024/fg_sj.jpg">
  125. </a>
  126. </li>
  127. </ul>
  128. <ul class="mui-table-view mui-grid-view my-view-no to_goods" style="margin-top: 3px;">
  129. <li class="mui-table-view-cell mui-media mui-col-xs-4" style="margin: 0px;padding: 0px;" >
  130. <a proid="58" class="go_chanpin_details" style="width: 96%;padding-left: 3%;padding-right: 1%;margin: 0px;">
  131. <img class="mui-media-object" src="images/20191024/new_s3.jpg">
  132. </a>
  133. </li>
  134. <li class="mui-table-view-cell mui-media mui-col-xs-4" style="margin: 0px;padding: 0px;">
  135. <a proid="54" class="go_chanpin_details" style="width: 96%;padding-left: 2%;padding-right: 2%;margin: 0px;">
  136. <img class="mui-media-object" src="images/20191024/rsj.jpg">
  137. </a>
  138. </li>
  139. <li class="mui-table-view-cell mui-media mui-col-xs-4" style="margin: 0px;padding: 0px;">
  140. <a proid="52" class="go_chanpin_details" style="width: 96%;padding-left: 1%;padding-right: 3%;margin: 0px;">
  141. <img class="mui-media-object" src="images/20191024/new_hs.jpg">
  142. </a>
  143. </li>
  144. </ul>
  145. <ul class="mui-table-view mui-grid-view my-view-no to_goods" style="margin-top: 3px;">
  146. <li class="mui-table-view-cell mui-media mui-col-xs-4" style="margin: 0px;padding: 0px;" >
  147. <a proid="41" class="go_chanpin_details" style="width: 96%;padding-left: 3%;padding-right: 1%;margin: 0px;">
  148. <img class="mui-media-object" src="images/20191024/old_hs.jpg">
  149. </a>
  150. </li>
  151. <li class="mui-table-view-cell mui-media mui-col-xs-4" style="margin: 0px;padding: 0px;">
  152. <a proid="40" class="go_chanpin_details" style="width: 96%;padding-left: 2%;padding-right: 2%;margin: 0px;">
  153. <img class="mui-media-object" src="images/20191024/longtou_new.jpg">
  154. </a>
  155. </li>
  156. <li class="mui-table-view-cell mui-media mui-col-xs-4" style="margin: 0px;padding: 0px;">
  157. <a proid="36" class="go_chanpin_details" style="width: 96%;padding-left: 1%;padding-right: 3%;margin: 0px;">
  158. <img class="mui-media-object" src="images/20191024/lv_tz.jpg">
  159. </a>
  160. </li>
  161. </ul>
  162. </div>
  163. <div class="index-title go_web_shop2" style="">
  164. <strong>WaterO</strong><span class="mui-pull-right go_pro_list" type="watero"><font>更多</font><span class="mui-icon mui-icon-arrowright"></span></span>
  165. </div>
  166. <div class="chanpin-box">
  167. <ul class="mui-table-view mui-grid-view my-view-no to_goods" id="index-pro-list2" style="padding-bottom: 0;">
  168. <li class="mui-table-view-cell mui-media mui-col-xs-4" style="margin: 0px;padding: 0px;" >
  169. <a proid="47" class="go_chanpin_details" style="width: 96%;padding-left: 3%;padding-right: 1%;margin: 0px;">
  170. <img class="mui-media-object" src="images/20191024/zqj.jpg">
  171. </a>
  172. </li>
  173. <li class="mui-table-view-cell mui-media mui-col-xs-4" style="margin: 0px;padding: 0px;">
  174. <a proid="48" class="go_chanpin_details" style="width: 96%;padding-left: 2%;padding-right: 2%;margin: 0px;">
  175. <img class="mui-media-object" src="images/20191024/hei_sj.jpg">
  176. </a>
  177. </li>
  178. <li class="mui-table-view-cell mui-media mui-col-xs-4" style="margin: 0px;padding: 0px;">
  179. <a proid="60" class="go_chanpin_details" style="width: 96%;padding-left: 1%;padding-right: 3%;margin: 0px;">
  180. <img class="mui-media-object" src="images/20191024/watero_tz.jpg">
  181. </a>
  182. </li>
  183. </ul>
  184. </div>
  185. <div class="mui-content-padded my-content-padded" id="advs_banner" style="display: block;">
  186. <!--<a><img src="images/fuqing-1.png"></a>-->
  187. </div>
  188. <!--商城首页end-->
  189. </div>
  190. <!--春节放假通知-->
  191. <div class="year-dalog"></div>
  192. <script src="js/mui.min.js"></script>
  193. <script src="js/jquery-2.1.1.min.js"></script>
  194. <script src="js/jquery.autocompleter.js"></script>
  195. <script src="js/main.js"></script>
  196. <script src="js/wechat-utils-1.0.js"></script>
  197. </body>
  198. <script>
  199. // 读取值
  200. var colors = [];
  201. var histoty = JSON.parse(localStorage.getItem('search_histoty'));
  202. var clickdate = JSON.parse(localStorage.getItem('clickdate'));
  203. //console.log(histoty)
  204. if (histoty != null) {
  205. var str = histoty.text;
  206. for (i = 0; i < str.length; i++) {
  207. var childTypeId = ''
  208. if (typeof(str[i].childTypeId) != "undefined") {
  209. childTypeId = 'childTypeid=' + str[i].childTypeId;
  210. }
  211. $("#history").append('<button type="button" class="mui-btn" name="' + str[i].id + '" typeid="' + str[i].typeId +
  212. '" ' + childTypeId + '>' + str[i].label + '</button>');
  213. }
  214. }
  215. mui.ready(function() {
  216. $.ajax(base_path + '/wechat/indexData?dates=' + new Date().getTime(), {
  217. data: {},
  218. dataType: 'json',
  219. xhrFields: {
  220. withCredentials: true
  221. },
  222. crossDomain: true,
  223. type: 'post',
  224. timeout: 15000,
  225. success: function(dt) {
  226. //判断一下
  227. if (dt.isRedirect) {
  228. location.href = dt.redirectURL;
  229. }
  230. },
  231. error: function(xhr, type, errorThrown) {
  232. console.log(xhr);
  233. mui.alert("获取数据失败!网络错误");
  234. }
  235. });
  236. //搜索框焦点事件
  237. $('#search').on('focus', function(e) {
  238. window.scrollTo(0, 0, 500);
  239. $(".icon-caidan").hide();
  240. $('.my-btn-cancel').show();
  241. if ($(this).val().length > 0) {
  242. $('#search-hot').hide(500);
  243. $(".autocompleter-list").css("height", $(document).height())
  244. } else {
  245. $("#search-hot").css("height", $(document.body).height()).show();
  246. $("body").css("overflow", "hidden");
  247. }
  248. });
  249. //搜索框失去焦点事件
  250. $('#search').on('blur', function(e) {
  251. setTimeout(function() {
  252. $('#search-hot,.my-btn-cancel').hide();
  253. $("body").css("overflow", "auto");
  254. $(".icon-caidan").show();
  255. }, 700);
  256. });
  257. //点击后把text赋值到搜索框
  258. $(document).on('tap', '#history button', function() {
  259. $('#search').val($(this).text());
  260. console.log($(this).text())
  261. $('#search-hot').hide();
  262. $("body").css("overflow", "auto");
  263. var parameter = {};
  264. parameter["id"] = $(this).attr("name");
  265. parameter["label"] = $(this).text();
  266. parameter["typeId"] = $(this).attr("typeid");
  267. if (typeof($(this).attr("childtypeId")) != "undefined") {
  268. parameter["childTypeId"] = $(this).attr("childtypeid");
  269. }
  270. search(parameter);
  271. });
  272. //搜索框本地缓存
  273. function search(selected) {
  274. if (!window.localStorage) {
  275. mui.alert("您的浏览器不支持localStorage");
  276. } else {
  277. //自定义json数据
  278. var obj = {},
  279. searchobj = {};
  280. if (histoty != null) {
  281. var str = histoty.text;
  282. if (str.length > 2) {
  283. str.splice(2, 1)
  284. }
  285. str.splice(0, 0, selected)
  286. obj = {
  287. text: str
  288. }
  289. } else {
  290. obj = {
  291. text: [selected]
  292. };
  293. }
  294. searchobj = {
  295. text: [selected]
  296. }
  297. //json格式化插入
  298. localStorage.setItem('search_histoty', JSON.stringify(obj));
  299. sessionStorage.setItem('search_data', JSON.stringify(searchobj));
  300. mui.openWindow({
  301. url: 'pro-list.html?productId=' + selected.typeId
  302. });
  303. }
  304. }
  305. //监听搜索框值改变事件
  306. $('#search').on('input', function(e) {
  307. if ($(this).val().length > 0) {
  308. $('#search-hot').hide();
  309. $(".autocompleter-list").css("height", $(document).height());
  310. } else {
  311. $('#search-hot').show();
  312. $("body").css("overflow", "hidden");
  313. $(".autocompleter-list").css("height", "auto");
  314. }
  315. });
  316. $(".loading").hide().css("opacity", "0");
  317. });
  318. //取消搜索
  319. $(document).on('tap', '.my-btn-cancel', function() {
  320. $(this).hide();
  321. $('#search-hot').hide();
  322. $("body").css("overflow", "auto");
  323. $('#search').autocompleter("close");
  324. $(".autocompleter-list").empty().css("height", "auto");
  325. $('.autocompleter-hint').removeClass('autocompleter-hint-show').empty();
  326. $(".icon-caidan").show();
  327. $('#search').blur();
  328. });
  329. //打开菜单
  330. $(document).on('tap', '.icon-caidan', function() {
  331. $("#menu").css("height", $(window).height());
  332. $("#menu>li").addClass("active");
  333. });
  334. //关闭菜单
  335. $(document).on('tap', '.icon-guanbi', function() {
  336. $("#menu>li").removeClass("active");
  337. $("#menu").css("height", "0px");
  338. });
  339. //精选产品详情
  340. $(document).on('tap', '#index-pro-list .mui-table-view-cell>a', function() {
  341. location.href = 'pro-details.html?productId=' + $(this).attr("name")
  342. });
  343. //精选产品详情2
  344. $(document).on('tap', '.to_goods>li>a', function() {
  345. location.href = 'pro-details.html?productId=' + $(this).attr("proid")
  346. });
  347. //产品详情-配件
  348. $(document).on('tap', '#index-pro-items>.mui-control-item', function() {
  349. location.href = 'pro-list.html?productId=' + $(this).attr("name") + '&childTypeId=' + $(this).attr("item");
  350. });
  351. //more更多产品
  352. $(document).on('tap', '.go_pro_list', function() {
  353. if ($(this).attr("type") == "aiberle") {
  354. location.href = "pro-list.html?productId=13";
  355. } else {
  356. location.href = "pro-list.html?productId=14";
  357. }
  358. });
  359. //菜单跳转
  360. $(document).on('tap', '#menu>.line>a', function() {
  361. location.href = 'pro-list.html?productId=' + $(this).attr("name") + '&childTypeId=' + $(this).attr("item");
  362. });
  363. $(document).on('tap', '.coupon_class>ul>li', function() {
  364. var couponId = this.getAttribute("couponId");
  365. $.ajax(base_path + '/wechat/coupon/receive_coupon_end?dates=' + new Date().getTime(), {
  366. data: {
  367. "couponId": couponId
  368. },
  369. dataType: 'json',
  370. xhrFields: {
  371. withCredentials: true
  372. },
  373. crossDomain: true,
  374. type: 'post',
  375. timeout: 15000,
  376. success: function(dt) {
  377. if(dt.isRedirect) {
  378. location.href = dt.redirectURL;
  379. } else {
  380. if(dt.status) {
  381. mui.toast(dt.message);
  382. } else {
  383. mui.toast(dt.message);
  384. }
  385. }
  386. },
  387. error: function(xhr, type, errorThrown) {
  388. console.log(xhr);
  389. mui.alert("领取失败!网络出小差了", function() {
  390. });
  391. }
  392. });
  393. });
  394. /**
  395. *
  396. */
  397. var endDate = new Date(2019,10,10,00,00,00); //秒杀
  398. var endDate = new Date(2019,10,10,00,00,00); //限时购
  399. function calculatingTime(){
  400. var newdate = new Date();//获取当前时间
  401. var dateDiff = endDate.getTime() - newdate;//时间差的毫秒数
  402. var dayDiff = Math.floor(dateDiff / (24 * 3600 * 1000));//计算出相差天数
  403. var leave1=dateDiff%(24*3600*1000) //计算天数后剩余的毫秒数
  404. var hours=Math.floor(leave1/(3600*1000))//计算出小时数
  405. var allHours = hours + dayDiff*24; //计算总小时数
  406. //计算相差分钟数
  407. var leave2=leave1%(3600*1000) //计算小时数后剩余的毫秒数
  408. var minutes=Math.floor(leave2/(60*1000))//计算相差分钟数
  409. //计算相差秒数
  410. var leave3=leave2%(60*1000) //计算分钟数后剩余的毫秒数
  411. var seconds=Math.round(leave3/1000)
  412. //console.log("总小时:"+ allHours +";相差天数:"+dayDiff+";小时:"+hours+";分钟"+minutes+";秒数"+seconds);
  413. if(minutes < 10){
  414. minutes = "0"+minutes;
  415. }
  416. if(seconds < 10){
  417. seconds = "0"+seconds;
  418. }
  419. $("#endDate").text(allHours+":"+minutes+":"+seconds)
  420. }
  421. $(document).ready(function() {
  422. //一秒刷新一次显示时间
  423. setInterval(function(){
  424. calculatingTime();
  425. },1000)
  426. })
  427. </script>
  428. </html>