20191212.html 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718
  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. html,body{background: #FFFFFF;}
  49. .mui-content {
  50. background: #f2f2f2;
  51. }
  52. .center-header {
  53. position: relative;
  54. background: #9fa0a0;
  55. height: 160px;
  56. }
  57. .center-header .wecat-head {
  58. position: absolute;
  59. left: 0;
  60. top: 0;
  61. width: 100%;
  62. text-align: center;
  63. color: #fff;
  64. }
  65. .center-header .bottom-vip {
  66. font-size: 12px;
  67. background: #2f2d3a;
  68. position: absolute;
  69. left: 14px;
  70. right: 14px;
  71. bottom: 0;
  72. height: 40px;
  73. border-radius: 15px 15px 0 0;
  74. color: #fff;
  75. padding: 10px 0;
  76. }
  77. .center-header .bottom-vip .mui-table-cell:first-child {
  78. width: 13em;
  79. padding-left: 12px;
  80. }
  81. .center-header .vip-l {
  82. /* margin: 0 14px; */
  83. vertical-align: middle;
  84. }
  85. .center-header .vip-icon {
  86. display: inline-block;
  87. vertical-align: middle;
  88. margin-right: 2px;
  89. width: 15px;
  90. }
  91. .center-header .vip-title {
  92. vertical-align: middle;
  93. }
  94. .center-header .vip-arrow {
  95. display: inline-block;
  96. vertical-align: middle;
  97. margin-left: 5px;
  98. margin-right: 12px;
  99. width: 7px;
  100. padding-bottom: 3px;
  101. }
  102. .center-header .sign-in {
  103. position: absolute;
  104. right: 4px;
  105. top: 5px;
  106. color: #fff;
  107. padding: 5px 10px;
  108. height: 28px;
  109. }
  110. .center-header .sign-in>img {
  111. width: 19px;
  112. }
  113. .center-header .sign-in>span {
  114. vertical-align: top;
  115. font-size: 12px;
  116. }
  117. .center-header #userNickname {
  118. font-size: 14px;
  119. }
  120. #menu-nav .mui-control-item {
  121. line-height: 1.2;
  122. padding: 6px 0 12px 0;
  123. color: #666;
  124. font-size: 12px;
  125. }
  126. p{color: #999;font-size: 12px;}
  127. .center-content{background: #f2f2f2;padding:10px 14px 14px 14px;}
  128. .center-content .my-count{padding: 12px 0;background: #fff;border-radius: 8px;margin-bottom: 8px;}
  129. .center-content .mui-navigate-right:after{font-size: 20px;color: #999;top: 48%;}
  130. .center-content .mui-table-view:after{left: 15px;right: 15px; background: #e5e5e5;}
  131. .my-center-no .mui-table-view-cell .mui-icon{color: #999;font-size: 18px;}
  132. .order-box{padding:0;background: #fff;margin-bottom: 8px;border-radius: 8px;overflow: hidden;}
  133. .order-box .mui-badge{background: transparent;color: #bbb;font-size: 12px;}
  134. strong{font-size: 16px;}
  135. .order-box strong{font-size: 14px;}
  136. .my-center-no{border-radius: 8px;overflow: hidden;font-size: 12px;}
  137. .dalog {
  138. position: fixed;
  139. left: 0;
  140. top: 0;
  141. bottom: 0;
  142. right: 0;
  143. background: rgba(0, 0, 0, .7);
  144. display: none;
  145. z-index: 99;
  146. }
  147. .dalog>div {
  148. position: absolute;
  149. width: 270px;
  150. height: 290px;
  151. left: 50%;
  152. margin-left: -135px;
  153. top: 50%;
  154. margin-top: -150px;
  155. text-align: center;
  156. }
  157. .dalog .tp-box {
  158. background: #fff;
  159. padding: 10px 12px;
  160. border-radius: 8px;
  161. margin-bottom: 8px;
  162. }
  163. .dalog ul{
  164. padding-top: 12px;
  165. }
  166. .dalog ol{
  167. width: 185px;
  168. display: block;
  169. margin: 0 auto;
  170. text-align: left;
  171. padding-bottom: 4px;
  172. }
  173. .dalog ol>li{
  174. font-size: 12px;
  175. margin:0;
  176. white-space: nowrap;
  177. }
  178. .dalog ul>li {
  179. margin:0 0 16px 0;
  180. color: #727171;
  181. }
  182. .dalog ul>li:last-child{
  183. margin-bottom: 10px;
  184. }
  185. .dalog ul li p {
  186. color: #666;
  187. }
  188. .dalog .btn-see-integral {
  189. border-radius: 25px;
  190. background: #727171;
  191. color: #fff;
  192. padding: 5px 22px;
  193. border: 0;
  194. font-size: 14px;
  195. }
  196. .dalog .icon-guanbicha {
  197. color: #fff;
  198. font-size: 26px;
  199. }
  200. .dalog strong {
  201. font-size: 22px;
  202. letter-spacing: 4px;
  203. }
  204. .dalog .icon-A-zhucewancheng {
  205. font-size: 40px;
  206. }
  207. </style>
  208. </head>
  209. <script>
  210. var start = new Date(2019,12-1,6,00,00,00);
  211. var end = new Date(2019,12-1,14,23,59,59);
  212. var d = new Date().getTime(); //当前时间戳
  213. if (!(d > start && d <= end)) {
  214. location.href = "index.html";
  215. }
  216. </script>
  217. <body>
  218. <footer class="mui-bar mui-bar-tab" id="footer-bar-tab">
  219. <a class="mui-tab-item mui-active">
  220. <span class="iconfont icon-shouye"></span>
  221. <span class="mui-tab-label">首页</span>
  222. </a>
  223. <a class="mui-tab-item">
  224. <span class="iconfont icon-gouwuche"></span>
  225. <span class="mui-tab-label">购物车</span>
  226. </a>
  227. <a class="mui-tab-item">
  228. <span class="iconfont icon-dingdan"></span>
  229. <span class="mui-tab-label">订单</span>
  230. </a>
  231. <a class="mui-tab-item">
  232. <span class="iconfont icon-wode"></span>
  233. <span class="mui-tab-label">我的</span>
  234. </a>
  235. </footer>
  236. <div class="" style="">
  237. <img width="100%" src="images/20191212/banner.jpg" />
  238. </div>
  239. <div class="" style="color: #d7543b;">
  240. <img width="100%" src="images/20191212/zhucehuiyuan-aiberle.png" />
  241. </div>
  242. <div class="coupon_class ul_class" style="padding-bottom: 3px;background-color:#f8f8f8 ;width: 96%;margin-left: 2%;border-radius: 7px;overflow:hidden">
  243. <div style="padding-bottom: 10px;">
  244. <img src="images/20191212/maiyisonger.png" style="display: block;margin: auto; width: 70px;padding-top: 0px;">
  245. </div>
  246. <ul>
  247. <li style="width: 47%;margin-left: 2%;border-radius: 7px;padding-bottom: 5px;" class="watero_lv"><img src="images/20191212/watero-lv.jpg" /></li>
  248. <li style="width: 47%;margin-left: 2%;border-radius: 7px;padding-bottom: 5px;" class="aiberle_lv"><img src="images/20191212/aiberle-lv.jpg" /></li>
  249. </ul>
  250. </div>
  251. <div class="slogan_class ul_class" style="padding-top:15px;overflow:hidden; background: #fff;">
  252. <ul style="width: 98%;">
  253. <li style="margin: 0px;width: 48%;margin-left: 2%;" class="to_new_slt"><img style="" src="images/20191212/index_1.jpg" /></li>
  254. <li style="margin: 0px;width: 48%;margin-left: 2%;" class="go_pro_list" type="aiberle"><img style="" src="images/20191212/index_2.jpg" /></li>
  255. </ul>
  256. <ul style="width: 98%;">
  257. <li style="margin: 0px;width: 48%;margin-left: 2%;margin-top: 10px;" class="erweima"><img style="" src="images/20191212/index_3.jpg" /></li>
  258. <li style="margin: 0px;width: 48%;margin-left: 2%;margin-top: 10px;" class="go_cent"><img style="" src="images/20191212/index_4.jpg" /></li>
  259. </ul>
  260. </div>
  261. <div class="mui-content" style="background: #fff;padding-top:15px ;">
  262. <!--list结束-->
  263. <div class="index-title go_web_shop" style="margin-top: 0px;">
  264. <strong>Aiberle</strong><span class="mui-pull-right go_pro_list" type="aiberle"><font>更多</font><span class="mui-icon mui-icon-arrowright"></span></span>
  265. </div>
  266. <div class="chanpin-box" style="padding-bottom: 5px;">
  267. <ul class="mui-table-view mui-grid-view my-view-no to_goods" style="width: 98%;" >
  268. <li class="mui-table-view-cell mui-media mui-col-xs-4" style="margin: 0px;padding-left: 2%;padding-top: 0px;">
  269. <a proid="36" class="go_chanpin_details" style="margin: 0px;">
  270. <img class="mui-media-object" src="images/20191212/lv_tz.jpg">
  271. </a>
  272. </li>
  273. <li class="mui-table-view-cell mui-media mui-col-xs-4" style="margin: 0px;padding-left: 2%;padding-top: 0px;" >
  274. <a proid="33" class="go_chanpin_details" style="margin: 0px;">
  275. <img class="mui-media-object" src="images/20191212/wb_1_sj.jpg">
  276. </a>
  277. </li>
  278. <li class="mui-table-view-cell mui-media mui-col-xs-4" style="margin: 0px;padding-left: 2%;padding-top: 0px;">
  279. <a proid="39" class="go_chanpin_details" style="margin: 0px;">
  280. <img class="mui-media-object" src="images/20191212/lv_sj.jpg">
  281. </a>
  282. </li>
  283. </ul>
  284. <ul class="mui-table-view mui-grid-view my-view-no to_goods" style="width: 98%;" >
  285. <li class="mui-table-view-cell mui-media mui-col-xs-4" style="margin: 0px;padding-left: 2%;padding-top: 0px;">
  286. <a proid="46" class="go_chanpin_details" style="margin: 0px;">
  287. <img class="mui-media-object" src="images/20191212/fg_sj.jpg">
  288. </a>
  289. </li>
  290. <li class="mui-table-view-cell mui-media mui-col-xs-4" style="margin: 0px;padding-left: 2%;padding-top: 0px;" >
  291. <a proid="58" class="go_chanpin_details" style="margin: 0px;">
  292. <img class="mui-media-object" src="images/20191212/new_s3.jpg">
  293. </a>
  294. </li>
  295. <li class="mui-table-view-cell mui-media mui-col-xs-4" style="margin: 0px;padding-left: 2%;padding-top: 0px;">
  296. <a proid="54" class="go_chanpin_details" style="margin: 0px;">
  297. <img class="mui-media-object" src="images/20191212/rsj.jpg">
  298. </a>
  299. </li>
  300. </ul>
  301. <ul class="mui-table-view mui-grid-view my-view-no to_goods" style="width: 98%;" >
  302. <li class="mui-table-view-cell mui-media mui-col-xs-4" style="margin: 0px;padding-left: 2%;padding-top: 0px;">
  303. <a proid="52" class="go_chanpin_details" style="margin: 0px;">
  304. <img class="mui-media-object" src="images/20191212/new_hs.jpg">
  305. </a>
  306. </li>
  307. <li class="mui-table-view-cell mui-media mui-col-xs-4" style="margin: 0px;padding-left: 2%;padding-top: 0px;" >
  308. <a proid="41" class="go_chanpin_details" style="margin: 0px;">
  309. <img class="mui-media-object" src="images/20191212/old_hs.jpg">
  310. </a>
  311. </li>
  312. <!-- <li class="mui-table-view-cell mui-media mui-col-xs-4" style="margin: 0px;padding-left: 2%;padding-top: 0px;">
  313. <a proid="40" class="go_chanpin_details" style="margin: 0px;">
  314. <img class="mui-media-object" src="images/20191212/longtou_new.jpg">
  315. </a>
  316. </li> -->
  317. </ul>
  318. </div>
  319. <div class="index-title go_web_shop2" style="">
  320. <strong>WaterO</strong><span class="mui-pull-right go_pro_list" type="watero"><font>更多</font><span class="mui-icon mui-icon-arrowright"></span></span>
  321. </div>
  322. <div class="chanpin-box">
  323. <ul class="mui-table-view mui-grid-view my-view-no to_goods" id="index-pro-list2" style="width: 98%;" >
  324. <li class="mui-table-view-cell mui-media mui-col-xs-4" style="margin: 0px;padding-left: 2%;padding-top: 0px;">
  325. <a proid="60" class="go_chanpin_details" style="margin: 0px;">
  326. <img class="mui-media-object" src="images/20191212/watero_tz.jpg">
  327. </a>
  328. </li>
  329. <li class="mui-table-view-cell mui-media mui-col-xs-4" style="margin: 0px;padding-left: 2%;padding-top: 0px;" >
  330. <a proid="47" class="go_chanpin_details" style="margin: 0px;">
  331. <img class="mui-media-object" src="images/20191212/zqj.jpg">
  332. </a>
  333. </li>
  334. <li class="mui-table-view-cell mui-media mui-col-xs-4" style="margin: 0px;padding-left: 2%;padding-top: 0px;">
  335. <a proid="48" class="go_chanpin_details" style="margin: 0px;">
  336. <img class="mui-media-object" src="images/20191212/hei_sj.jpg">
  337. </a>
  338. </li>
  339. </ul>
  340. </div>
  341. <div class="mui-content-padded my-content-padded" id="advs_banner" style="display: block;">
  342. <!--<a><img src="images/fuqing-1.png"></a>-->
  343. </div>
  344. <!--商城首页end-->
  345. </div>
  346. <div class="dalog">
  347. <div>
  348. <div class="tp-box">
  349. <img src="images/20191212/erweima.jpg" style="width: 100%;">
  350. </div>
  351. <br />
  352. <div class="mui-text-center">
  353. <i class="iconfont icon-guanbi"></i>
  354. </div>
  355. </div>
  356. </div>
  357. <div class="year-dalog"></div>
  358. <script src="js/mui.min.js"></script>
  359. <script src="js/jquery-2.1.1.min.js"></script>
  360. <script src="js/jquery.autocompleter.js"></script>
  361. <script src="js/main.js"></script>
  362. <script src="js/wechat-utils-1.0.js"></script>
  363. </body>
  364. <script>
  365. // 读取值
  366. var colors = [];
  367. var histoty = JSON.parse(localStorage.getItem('search_histoty'));
  368. var clickdate = JSON.parse(localStorage.getItem('clickdate'));
  369. //console.log(histoty)
  370. if (histoty != null) {
  371. var str = histoty.text;
  372. for (i = 0; i < str.length; i++) {
  373. var childTypeId = ''
  374. if (typeof(str[i].childTypeId) != "undefined") {
  375. childTypeId = 'childTypeid=' + str[i].childTypeId;
  376. }
  377. $("#history").append('<button type="button" class="mui-btn" name="' + str[i].id + '" typeid="' + str[i].typeId +
  378. '" ' + childTypeId + '>' + str[i].label + '</button>');
  379. }
  380. }
  381. mui.ready(function() {
  382. calculatingTime();
  383. $.ajax(base_path + '/wechat/indexData?dates=' + new Date().getTime(), {
  384. data: {},
  385. dataType: 'json',
  386. xhrFields: {
  387. withCredentials: true
  388. },
  389. crossDomain: true,
  390. type: 'post',
  391. timeout: 15000,
  392. success: function(dt) {
  393. //判断一下
  394. if (dt.isRedirect) {
  395. location.href = dt.redirectURL;
  396. }
  397. },
  398. error: function(xhr, type, errorThrown) {
  399. console.log(xhr);
  400. mui.alert("获取数据失败!网络错误");
  401. }
  402. });
  403. //搜索框焦点事件
  404. $('#search').on('focus', function(e) {
  405. window.scrollTo(0, 0, 500);
  406. $(".icon-caidan").hide();
  407. $('.my-btn-cancel').show();
  408. if ($(this).val().length > 0) {
  409. $('#search-hot').hide(500);
  410. $(".autocompleter-list").css("height", $(document).height())
  411. } else {
  412. $("#search-hot").css("height", $(document.body).height()).show();
  413. $("body").css("overflow", "hidden");
  414. }
  415. });
  416. //搜索框失去焦点事件
  417. $('#search').on('blur', function(e) {
  418. setTimeout(function() {
  419. $('#search-hot,.my-btn-cancel').hide();
  420. $("body").css("overflow", "auto");
  421. $(".icon-caidan").show();
  422. }, 700);
  423. });
  424. //点击后把text赋值到搜索框
  425. $(document).on('tap', '#history button', function() {
  426. $('#search').val($(this).text());
  427. console.log($(this).text())
  428. $('#search-hot').hide();
  429. $("body").css("overflow", "auto");
  430. var parameter = {};
  431. parameter["id"] = $(this).attr("name");
  432. parameter["label"] = $(this).text();
  433. parameter["typeId"] = $(this).attr("typeid");
  434. if (typeof($(this).attr("childtypeId")) != "undefined") {
  435. parameter["childTypeId"] = $(this).attr("childtypeid");
  436. }
  437. search(parameter);
  438. });
  439. //搜索框本地缓存
  440. function search(selected) {
  441. if (!window.localStorage) {
  442. mui.alert("您的浏览器不支持localStorage");
  443. } else {
  444. //自定义json数据
  445. var obj = {},
  446. searchobj = {};
  447. if (histoty != null) {
  448. var str = histoty.text;
  449. if (str.length > 2) {
  450. str.splice(2, 1)
  451. }
  452. str.splice(0, 0, selected)
  453. obj = {
  454. text: str
  455. }
  456. } else {
  457. obj = {
  458. text: [selected]
  459. };
  460. }
  461. searchobj = {
  462. text: [selected]
  463. }
  464. //json格式化插入
  465. localStorage.setItem('search_histoty', JSON.stringify(obj));
  466. sessionStorage.setItem('search_data', JSON.stringify(searchobj));
  467. mui.openWindow({
  468. url: 'pro-list.html?productId=' + selected.typeId
  469. });
  470. }
  471. }
  472. //监听搜索框值改变事件
  473. $('#search').on('input', function(e) {
  474. if ($(this).val().length > 0) {
  475. $('#search-hot').hide();
  476. $(".autocompleter-list").css("height", $(document).height());
  477. } else {
  478. $('#search-hot').show();
  479. $("body").css("overflow", "hidden");
  480. $(".autocompleter-list").css("height", "auto");
  481. }
  482. });
  483. $(".loading").hide().css("opacity", "0");
  484. });
  485. //取消搜索
  486. $(document).on('tap', '.my-btn-cancel', function() {
  487. $(this).hide();
  488. $('#search-hot').hide();
  489. $("body").css("overflow", "auto");
  490. $('#search').autocompleter("close");
  491. $(".autocompleter-list").empty().css("height", "auto");
  492. $('.autocompleter-hint').removeClass('autocompleter-hint-show').empty();
  493. $(".icon-caidan").show();
  494. $('#search').blur();
  495. });
  496. //打开菜单
  497. $(document).on('tap', '.icon-caidan', function() {
  498. $("#menu").css("height", $(window).height());
  499. $("#menu>li").addClass("active");
  500. });
  501. //关闭菜单
  502. $(document).on('tap', '.icon-guanbi', function() {
  503. $("#menu>li").removeClass("active");
  504. $("#menu").css("height", "0px");
  505. });
  506. //精选产品详情
  507. $(document).on('tap', '#index-pro-list .mui-table-view-cell>a', function() {
  508. location.href = 'pro-details.html?productId=' + $(this).attr("name")
  509. });
  510. //精选产品详情2
  511. $(document).on('tap', '.to_goods>li>a', function() {
  512. location.href = 'pro-details.html?productId=' + $(this).attr("proid")
  513. });
  514. mui('body').on('tap', '.to_new_slt', function() {
  515. location.href = 'pro-details.html?productId=59'
  516. });
  517. mui('body').on('tap', '.to_new_xs', function() {
  518. location.href = "pro-list.html?productId=13";
  519. });
  520. //产品详情-配件
  521. $(document).on('tap', '#index-pro-items>.mui-control-item', function() {
  522. location.href = 'pro-list.html?productId=' + $(this).attr("name") + '&childTypeId=' + $(this).attr("item");
  523. });
  524. //more更多产品
  525. $(document).on('tap', '.go_pro_list', function() {
  526. if ($(this).attr("type") == "aiberle") {
  527. location.href = "pro-list.html?productId=13";
  528. } else {
  529. location.href = "pro-list.html?productId=14";
  530. }
  531. });
  532. //菜单跳转
  533. $(document).on('tap', '#menu>.line>a', function() {
  534. location.href = 'pro-list.html?productId=' + $(this).attr("name") + '&childTypeId=' + $(this).attr("item");
  535. });
  536. mui('body').on('tap', '.erweima', function() {
  537. $('.dalog').show();
  538. });
  539. // 关闭弹窗
  540. $(document).on('tap', '.icon-guanbi', function() {
  541. $('.dalog').hide();
  542. });
  543. mui('body').on('tap', '.go_cent', function() {
  544. mui.openWindow({
  545. url: 'vip-equity.html'
  546. })
  547. });
  548. // $(document).on('tap', '.coupon_class>ul>li', function() {
  549. // var couponId = this.getAttribute("couponId");
  550. // $.ajax(base_path + '/wechat/coupon/receive_coupon_end?dates=' + new Date().getTime(), {
  551. // data: {
  552. // "couponId": couponId
  553. // },
  554. // dataType: 'json',
  555. // xhrFields: {
  556. // withCredentials: true
  557. // },
  558. // crossDomain: true,
  559. // type: 'post',
  560. // timeout: 15000,
  561. // success: function(dt) {
  562. // if(dt.isRedirect) {
  563. // location.href = dt.redirectURL;
  564. // } else {
  565. // if(dt.status) {
  566. // mui.toast(dt.message);
  567. // } else {
  568. // mui.toast(dt.message);
  569. // }
  570. // }
  571. // },
  572. // error: function(xhr, type, errorThrown) {
  573. // console.log(xhr);
  574. // mui.alert("领取失败!网络出小差了", function() {
  575. // });
  576. // }
  577. // });
  578. // });
  579. /**
  580. *
  581. */
  582. var msStartDate = new Date(2019,10,10,00,00,00); //秒杀
  583. var msEndDate = new Date(2019,10,11,00,00,00); //秒杀结束
  584. var limitPurchaseDate = new Date(2019,10,11,11,00,00); //限时购
  585. var limitPurchaseEndDate = new Date(2019,10,11,12,00,00); //限时购-结束
  586. // var msStartDate = new Date(2019,10,01,15,42,00); //秒杀开始
  587. // var msEndDate = new Date(2019,10,01,15,43,00); //秒杀结束
  588. // var limitPurchaseDate = new Date(2019,10,01,15,43,00); //限时购
  589. function calculatingTime(){
  590. var jetLag = getJetLag(msStartDate);
  591. if(jetLag.dateDiff > 0){ //未开始
  592. $("#sj_01").show();
  593. $("#ms_01").show();
  594. $("#sj_01").text(jetLag.allHours+":"+jetLag.minutes+":"+jetLag.seconds)
  595. }else{
  596. //已开始
  597. $("#ms_01").hide();
  598. $("#sj_01").hide();
  599. var msEndJetLeg = getJetLag(msEndDate);
  600. if(msEndJetLeg.dateDiff >= 0){ //已开始
  601. $("#ms_02").show();
  602. $("#sj_02").show();
  603. $("#sj_02").text(msEndJetLeg.allHours+":"+msEndJetLeg.minutes+":"+msEndJetLeg.seconds)
  604. }else{ //一结束
  605. $("#ms_02").hide();
  606. $("#ms_03").show();
  607. $("#sj_02").hide();
  608. }
  609. }
  610. var limitPurchaseEndDateJetlag = getJetLag(limitPurchaseEndDate);
  611. if(limitPurchaseEndDateJetlag.dateDiff < 0){
  612. $("#xs_01").hide();
  613. $("#xs_02").hide();
  614. $("#xs_03").show();
  615. }else{
  616. var lPDjetLag = getJetLag(limitPurchaseDate);
  617. if(lPDjetLag.dateDiff > 0){
  618. $("#xs_01").show();
  619. $("#xs_02").hide();
  620. }else{
  621. $("#xs_01").hide();
  622. $("#xs_02").show();
  623. }
  624. }
  625. }
  626. // $(document).ready(function() {
  627. // //一秒刷新一次显示时间
  628. // setInterval(function(){
  629. // calculatingTime();
  630. // },1000)
  631. // })
  632. function getJetLag(scfDate){
  633. var newdate = new Date();//获取当前时间
  634. var dateDiff = scfDate.getTime() - newdate;//时间差的毫秒数
  635. var dayDiff = Math.floor(dateDiff / (24 * 3600 * 1000));//计算出相差天数
  636. var leave1=dateDiff%(24*3600*1000) //计算天数后剩余的毫秒数
  637. var hours=Math.floor(leave1/(3600*1000))//计算出小时数
  638. var allHours = hours + dayDiff*24; //计算总小时数
  639. //计算相差分钟数
  640. var leave2=leave1%(3600*1000) //计算小时数后剩余的毫秒数
  641. var minutes=Math.floor(leave2/(60*1000))//计算相差分钟数
  642. //计算相差秒数
  643. var leave3=leave2%(60*1000) //计算分钟数后剩余的毫秒数
  644. var seconds=Math.round(leave3/1000)
  645. //console.log("总小时:"+ allHours +";相差天数:"+dayDiff+";小时:"+hours+";分钟"+minutes+";秒数"+seconds);
  646. if(hours < 10){
  647. hours = "0"+hours;
  648. }
  649. if(allHours < 10){
  650. allHours = "0"+allHours;
  651. }
  652. if(minutes < 10){
  653. minutes = "0"+minutes;
  654. }
  655. if(seconds < 10){
  656. seconds = "0"+seconds;
  657. }
  658. var jetLag = new Object();
  659. jetLag.dateDiff = dateDiff;
  660. jetLag.dayDiff = dayDiff;
  661. jetLag.hours = hours;
  662. jetLag.allHours = allHours;
  663. jetLag.minutes = minutes;
  664. jetLag.seconds = seconds;
  665. return jetLag;
  666. }
  667. </script>
  668. </html>