20200308.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  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. .header { padding: 10px 0 7px 0; height: 65px; box-shadow: 0 0 0 #fff; background: #fff; }
  21. .header h6 { text-indent: 12px; color: #999; letter-spacing: 2px; }
  22. .go-index { width: 30%; margin-right: 1%; float: none; }
  23. .go-index img { width: 80%; padding-top: 5px; margin-left: 12px; max-width: 100px; }
  24. .swiper-container-horizontal>.swiper-pagination-bullets { bottom: 0; }
  25. .swiper-pagination-bullet-active { background: #63ccde; }
  26. .index-title { padding: 7px 12px 7px 12px; display: block; position: relative; }
  27. .index-title strong { font-size: 17px; }
  28. .index-title .mui-pull-right { color: #333; }
  29. .index-title font { display: inline-block; -webkit-transform: translateY(-1px); transform: translateY(-1px); }
  30. .pro-list .mui-media-object { background: #f2f2f2; border-radius: 5px; display: block; }
  31. .pro-list:before,.pro-list:after {display: none;}
  32. /* .pro-list.mui-table-view.mui-grid-view>li:nth-child(odd) {padding: 10px 8px 0 14px;} */
  33. /* .pro-list.mui-table-view.mui-grid-view>li:nth-child(even) {padding: 10px 0 0 22px;} */
  34. .pro-list.mui-table-view.mui-grid-view>li:nth-child(odd){padding: 0px;}
  35. .pro-list.mui-table-view.mui-grid-view>li:nth-child(even){padding: 0px;}
  36. .mui-table-view.mui-grid-view {padding: 0px;}
  37. .pro-list h6 {margin: 7px 0;color: #bbb;}
  38. .pro-list .pro-price {font-size: 14px;margin-top: 8px;}
  39. .pro-list .pro-price span {color: #db3f53;}
  40. .pro-list .pro-price s {color: #bbb;margin-left: 15px;}
  41. body{padding: 0px;margin: 0px;background-color: #FFFFFF;}
  42. .coupon_class{padding-top:12px ;}
  43. .ul_class>ul>li{float: left;display: block;}
  44. .ul_class>ul>li>img{display: block;width: 100%;}
  45. .ul_class{display: block;width: 100%;}
  46. </style>
  47. </head>
  48. <script>
  49. var start = new Date(2020,2-1,3,00,00,00);
  50. var end = new Date(2020,3-1,8,23,59,59);
  51. var d = new Date().getTime(); //当前时间戳
  52. if (!(d > start && d <= end)) {
  53. location.href = "index.html";
  54. }
  55. </script>
  56. <body>
  57. <footer class="mui-bar mui-bar-tab" id="footer-bar-tab">
  58. <a class="mui-tab-item mui-active">
  59. <span class="iconfont icon-shouye"></span>
  60. <span class="mui-tab-label">首页</span>
  61. </a>
  62. <a class="mui-tab-item">
  63. <span class="iconfont icon-gouwuche"></span>
  64. <span class="mui-tab-label">购物车</span>
  65. </a>
  66. <a class="mui-tab-item">
  67. <span class="iconfont icon-dingdan"></span>
  68. <span class="mui-tab-label">订单</span>
  69. </a>
  70. <a class="mui-tab-item">
  71. <span class="iconfont icon-wode"></span>
  72. <span class="mui-tab-label">我的</span>
  73. </a>
  74. </footer>
  75. <div class="" style="">
  76. <img width="100%" src="images/20200228/aiberle.png" />
  77. </div>
  78. <div class="slogan_class ul_class" style="padding-top:10px;overflow:hidden; background: #fff;">
  79. <ul style="width: 98%;">
  80. <li style="margin: 0px;width: 48%;margin-left: 2%;" class="to_new_slt">
  81. <img style="" src="images/20200228/tz.png" />
  82. </li>
  83. <li style="margin: 0px;width: 48%;margin-left: 2%;" class="to_new_slt_2">
  84. <img style="" src="images/20200228/jf.png" />
  85. </li>
  86. </ul>
  87. </div>
  88. <div class="mui-content" style="background: #f4f7fb; padding-top:15px;margin-top: 17px;width: 96%;margin-left: 2%;padding-bottom: 10px !important;">
  89. <div style="text-align: center;color: #ad504e;font-size: 20px;font-weight: bold;letter-spacing: 10px;padding-bottom: 10px;">爱健康</div>
  90. <div class="chanpin-box">
  91. <ul class="mui-table-view mui-grid-view pro-list" style="width: 98%;background: #f4f7fb;">
  92. <li class="mui-table-view-cell mui-media mui-col-xs-6" style="margin: 0px;padding-left: 2%;">
  93. <a proid="60" class="go_chanpin_details" style="margin: 0px;">
  94. <img class="mui-media-object" src="images/20200228/watero_lv.png">
  95. </a>
  96. </li>
  97. <li class="mui-table-view-cell mui-media mui-col-xs-6 ul_li_a_left" style="margin: 0px;padding-left: 2%;" >
  98. <a proid="36" class="go_chanpin_details" style="margin: 0px;">
  99. <img class="mui-media-object" src="images/20200228/aiber_lv.png">
  100. </a>
  101. </li>
  102. </ul>
  103. <ul class="mui-table-view mui-grid-view pro-list" style="width: 98%;background: #f4f7fb;margin-top: 10px;">
  104. <li class="mui-table-view-cell mui-media mui-col-xs-6" style="margin: 0px;padding-left: 2%;">
  105. <a proid="48" class="go_chanpin_details" style="margin: 0px;">
  106. <img class="mui-media-object" src="images/20200228/WA_1.png">
  107. </a>
  108. </li>
  109. <li class="mui-table-view-cell mui-media mui-col-xs-6 ul_li_a_left" style="margin: 0px;padding-left: 2%;" >
  110. <a proid="46" class="go_chanpin_details" style="margin: 0px;">
  111. <img class="mui-media-object" src="images/20200228/WB_2_bai.png">
  112. </a>
  113. </li>
  114. </ul>
  115. <ul class="mui-table-view mui-grid-view pro-list" style="width: 98%;background: #f4f7fb;margin-top: 10px;">
  116. <li class="mui-table-view-cell mui-media mui-col-xs-6" style="margin: 0px;padding-left: 2%;">
  117. <a proid="64" class="go_chanpin_details" style="margin: 0px;">
  118. <img class="mui-media-object" src="images/20200228/wb_2_lv.png">
  119. </a>
  120. </li>
  121. <li class="mui-table-view-cell mui-media mui-col-xs-6 ul_li_a_left" style="margin: 0px;padding-left: 2%;" >
  122. <a proid="58" class="go_chanpin_details" style="margin: 0px;">
  123. <img class="mui-media-object" src="images/20200228/s3_lan.png">
  124. </a>
  125. </li>
  126. </ul>
  127. </div>
  128. </div>
  129. <!-- 爱家人 -->
  130. <div class="mui-content" style="background: #fbf9f4; padding-top:15px;margin-top: 17px;width: 96%;margin-left: 2%;padding-bottom: 10px !important;">
  131. <div style="text-align: center;color: #ad504e;font-size: 20px;font-weight: bold;letter-spacing: 10px;padding-bottom: 10px;">爱家人</div>
  132. <div class="chanpin-box">
  133. <ul class="mui-table-view mui-grid-view pro-list" style="width: 98%;background: #fbf9f4;">
  134. <li class="mui-table-view-cell mui-media mui-col-xs-6" style="margin: 0px;padding-left: 2%;">
  135. <a proid="44" class="go_chanpin_details" style="margin: 0px;">
  136. <img class="mui-media-object" src="images/20200228/guoshuji.png">
  137. </a>
  138. </li>
  139. <li class="mui-table-view-cell mui-media mui-col-xs-6 ul_li_a_left" style="margin: 0px;padding-left: 2%;" >
  140. <a proid="40" class="go_chanpin_details" style="margin: 0px;">
  141. <img class="mui-media-object" src="images/20200228/slt.png">
  142. </a>
  143. </li>
  144. </ul>
  145. </div>
  146. </div>
  147. <div class="mui-content" style="background:#fbf7f6; padding-top:15px;margin-top: 17px;width: 96%;margin-left: 2%;padding-bottom: 10px !important;">
  148. <div style="text-align: center;color: #ad504e;font-size: 20px;font-weight: bold;letter-spacing: 10px;padding-bottom: 10px;">爱自己</div>
  149. <div class="chanpin-box">
  150. <ul class="mui-table-view mui-grid-view pro-list" style="width: 98%;background:#fbf7f6;">
  151. <li class="mui-table-view-cell mui-media mui-col-xs-6" style="margin: 0px;padding-left: 2%;">
  152. <a proid="42" class="go_chanpin_details" style="margin: 0px;">
  153. <img class="mui-media-object" src="images/20200228/rsj.png">
  154. </a>
  155. </li>
  156. <li class="mui-table-view-cell mui-media mui-col-xs-6 ul_li_a_left" style="margin: 0px;padding-left: 2%;" >
  157. <a proid="41" class="go_chanpin_details" style="margin: 0px;">
  158. <img class="mui-media-object" src="images/20200228/hs.png">
  159. </a>
  160. </li>
  161. </ul>
  162. </div>
  163. </div>
  164. <div class="mui-content" style="background-color: #ffffff;margin-top: 15px;padding-bottom: 50px !important;">
  165. </div>
  166. <script src="js/mui.min.js"></script>
  167. <script src="js/jquery-2.1.1.min.js"></script>
  168. <script src="js/jquery.autocompleter.js"></script>
  169. <script src="js/main.js"></script>
  170. <script src="js/wechat-utils-1.0.js"></script>
  171. </body>
  172. <script>
  173. // 读取值
  174. var colors = [];
  175. var histoty = JSON.parse(localStorage.getItem('search_histoty'));
  176. var clickdate = JSON.parse(localStorage.getItem('clickdate'));
  177. //console.log(histoty)
  178. if (histoty != null) {
  179. var str = histoty.text;
  180. for (i = 0; i < str.length; i++) {
  181. var childTypeId = ''
  182. if (typeof(str[i].childTypeId) != "undefined") {
  183. childTypeId = 'childTypeid=' + str[i].childTypeId;
  184. }
  185. $("#history").append('<button type="button" class="mui-btn" name="' + str[i].id + '" typeid="' + str[i].typeId +
  186. '" ' + childTypeId + '>' + str[i].label + '</button>');
  187. }
  188. }
  189. mui.ready(function() {
  190. $.ajax(base_path + '/wechat/indexData?dates=' + new Date().getTime(), {
  191. data: {},
  192. dataType: 'json',
  193. xhrFields: {
  194. withCredentials: true
  195. },
  196. crossDomain: true,
  197. type: 'post',
  198. timeout: 15000,
  199. success: function(dt) {
  200. //判断一下
  201. if (dt.isRedirect) {
  202. location.href = dt.redirectURL;
  203. }
  204. },
  205. error: function(xhr, type, errorThrown) {
  206. console.log(xhr);
  207. mui.alert("获取数据失败!网络错误");
  208. }
  209. });
  210. //搜索框焦点事件
  211. $('#search').on('focus', function(e) {
  212. window.scrollTo(0, 0, 500);
  213. $(".icon-caidan").hide();
  214. $('.my-btn-cancel').show();
  215. if ($(this).val().length > 0) {
  216. $('#search-hot').hide(500);
  217. $(".autocompleter-list").css("height", $(document).height())
  218. } else {
  219. $("#search-hot").css("height", $(document.body).height()).show();
  220. $("body").css("overflow", "hidden");
  221. }
  222. });
  223. //搜索框失去焦点事件
  224. $('#search').on('blur', function(e) {
  225. setTimeout(function() {
  226. $('#search-hot,.my-btn-cancel').hide();
  227. $("body").css("overflow", "auto");
  228. $(".icon-caidan").show();
  229. }, 700);
  230. });
  231. //点击后把text赋值到搜索框
  232. $(document).on('tap', '#history button', function() {
  233. $('#search').val($(this).text());
  234. console.log($(this).text())
  235. $('#search-hot').hide();
  236. $("body").css("overflow", "auto");
  237. var parameter = {};
  238. parameter["id"] = $(this).attr("name");
  239. parameter["label"] = $(this).text();
  240. parameter["typeId"] = $(this).attr("typeid");
  241. if (typeof($(this).attr("childtypeId")) != "undefined") {
  242. parameter["childTypeId"] = $(this).attr("childtypeid");
  243. }
  244. search(parameter);
  245. });
  246. //搜索框本地缓存
  247. function search(selected) {
  248. if (!window.localStorage) {
  249. mui.alert("您的浏览器不支持localStorage");
  250. } else {
  251. //自定义json数据
  252. var obj = {},
  253. searchobj = {};
  254. if (histoty != null) {
  255. var str = histoty.text;
  256. if (str.length > 2) {
  257. str.splice(2, 1)
  258. }
  259. str.splice(0, 0, selected)
  260. obj = {
  261. text: str
  262. }
  263. } else {
  264. obj = {
  265. text: [selected]
  266. };
  267. }
  268. searchobj = {
  269. text: [selected]
  270. }
  271. //json格式化插入
  272. localStorage.setItem('search_histoty', JSON.stringify(obj));
  273. sessionStorage.setItem('search_data', JSON.stringify(searchobj));
  274. mui.openWindow({
  275. url: 'pro-list.html?productId=' + selected.typeId
  276. });
  277. }
  278. }
  279. //监听搜索框值改变事件
  280. $('#search').on('input', function(e) {
  281. if ($(this).val().length > 0) {
  282. $('#search-hot').hide();
  283. $(".autocompleter-list").css("height", $(document).height());
  284. } else {
  285. $('#search-hot').show();
  286. $("body").css("overflow", "hidden");
  287. $(".autocompleter-list").css("height", "auto");
  288. }
  289. });
  290. $(".loading").hide().css("opacity", "0");
  291. });
  292. //取消搜索
  293. $(document).on('tap', '.my-btn-cancel', function() {
  294. $(this).hide();
  295. $('#search-hot').hide();
  296. $("body").css("overflow", "auto");
  297. $('#search').autocompleter("close");
  298. $(".autocompleter-list").empty().css("height", "auto");
  299. $('.autocompleter-hint').removeClass('autocompleter-hint-show').empty();
  300. $(".icon-caidan").show();
  301. $('#search').blur();
  302. });
  303. //打开菜单
  304. $(document).on('tap', '.icon-caidan', function() {
  305. $("#menu").css("height", $(window).height());
  306. $("#menu>li").addClass("active");
  307. });
  308. //关闭菜单
  309. $(document).on('tap', '.icon-guanbi', function() {
  310. $("#menu>li").removeClass("active");
  311. $("#menu").css("height", "0px");
  312. });
  313. //精选产品详情
  314. $(document).on('tap', '.mui-table-view-cell>a', function() {
  315. location.href = 'pro-details.html?productId=' + $(this).attr("proid")
  316. });
  317. mui('body').on('tap', '.to_new_slt', function() {
  318. location.href = 'pro-details.html?productId=65'
  319. });
  320. mui('body').on('tap', '.to_new_slt_2', function() {
  321. location.href = 'vip-equity.html'
  322. });
  323. mui('body').on('tap', '.to_new_xs', function() {
  324. location.href = "pro-list.html?productId=13";
  325. });
  326. //产品详情-配件
  327. $(document).on('tap', '#index-pro-items>.mui-control-item', function() {
  328. location.href = 'pro-list.html?productId=' + $(this).attr("name") + '&childTypeId=' + $(this).attr("item");
  329. });
  330. //more更多产品
  331. $(document).on('tap', '.go_pro_list', function() {
  332. if ($(this).attr("type") == "aiberle") {
  333. location.href = "pro-list.html?productId=13";
  334. } else {
  335. location.href = "pro-list.html?productId=14";
  336. }
  337. });
  338. //菜单跳转
  339. $(document).on('tap', '#menu>.line>a', function() {
  340. location.href = 'pro-list.html?productId=' + $(this).attr("name") + '&childTypeId=' + $(this).attr("item");
  341. });
  342. mui('body').on('tap', '.erweima', function() {
  343. $('.dalog').show();
  344. });
  345. // 关闭弹窗
  346. $(document).on('tap', '.icon-guanbi', function() {
  347. $('.dalog').hide();
  348. });
  349. mui('body').on('tap', '.go_cent', function() {
  350. mui.openWindow({
  351. url: 'vip-equity.html'
  352. })
  353. });
  354. </script>
  355. </html>