20200308.html 15 KB

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