20200308.html 15 KB

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