20200308.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  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. </body>
  188. <script>
  189. // 读取值
  190. var colors = [];
  191. var histoty = JSON.parse(localStorage.getItem('search_histoty'));
  192. var clickdate = JSON.parse(localStorage.getItem('clickdate'));
  193. //console.log(histoty)
  194. if (histoty != null) {
  195. var str = histoty.text;
  196. for (i = 0; i < str.length; i++) {
  197. var childTypeId = ''
  198. if (typeof(str[i].childTypeId) != "undefined") {
  199. childTypeId = 'childTypeid=' + str[i].childTypeId;
  200. }
  201. $("#history").append('<button type="button" class="mui-btn" name="' + str[i].id + '" typeid="' + str[i].typeId +
  202. '" ' + childTypeId + '>' + str[i].label + '</button>');
  203. }
  204. }
  205. mui.ready(function() {
  206. $.ajax(base_path + '/wechat/indexData?dates=' + new Date().getTime(), {
  207. data: {},
  208. dataType: 'json',
  209. xhrFields: {
  210. withCredentials: true
  211. },
  212. crossDomain: true,
  213. type: 'post',
  214. timeout: 15000,
  215. success: function(dt) {
  216. //判断一下
  217. if (dt.isRedirect) {
  218. location.href = dt.redirectURL;
  219. }
  220. },
  221. error: function(xhr, type, errorThrown) {
  222. console.log(xhr);
  223. mui.alert("获取数据失败!网络错误");
  224. }
  225. });
  226. //搜索框焦点事件
  227. $('#search').on('focus', function(e) {
  228. window.scrollTo(0, 0, 500);
  229. $(".icon-caidan").hide();
  230. $('.my-btn-cancel').show();
  231. if ($(this).val().length > 0) {
  232. $('#search-hot').hide(500);
  233. $(".autocompleter-list").css("height", $(document).height())
  234. } else {
  235. $("#search-hot").css("height", $(document.body).height()).show();
  236. $("body").css("overflow", "hidden");
  237. }
  238. });
  239. //搜索框失去焦点事件
  240. $('#search').on('blur', function(e) {
  241. setTimeout(function() {
  242. $('#search-hot,.my-btn-cancel').hide();
  243. $("body").css("overflow", "auto");
  244. $(".icon-caidan").show();
  245. }, 700);
  246. });
  247. //点击后把text赋值到搜索框
  248. $(document).on('tap', '#history button', function() {
  249. $('#search').val($(this).text());
  250. console.log($(this).text())
  251. $('#search-hot').hide();
  252. $("body").css("overflow", "auto");
  253. var parameter = {};
  254. parameter["id"] = $(this).attr("name");
  255. parameter["label"] = $(this).text();
  256. parameter["typeId"] = $(this).attr("typeid");
  257. if (typeof($(this).attr("childtypeId")) != "undefined") {
  258. parameter["childTypeId"] = $(this).attr("childtypeid");
  259. }
  260. search(parameter);
  261. });
  262. //搜索框本地缓存
  263. function search(selected) {
  264. if (!window.localStorage) {
  265. mui.alert("您的浏览器不支持localStorage");
  266. } else {
  267. //自定义json数据
  268. var obj = {},
  269. searchobj = {};
  270. if (histoty != null) {
  271. var str = histoty.text;
  272. if (str.length > 2) {
  273. str.splice(2, 1)
  274. }
  275. str.splice(0, 0, selected)
  276. obj = {
  277. text: str
  278. }
  279. } else {
  280. obj = {
  281. text: [selected]
  282. };
  283. }
  284. searchobj = {
  285. text: [selected]
  286. }
  287. //json格式化插入
  288. localStorage.setItem('search_histoty', JSON.stringify(obj));
  289. sessionStorage.setItem('search_data', JSON.stringify(searchobj));
  290. mui.openWindow({
  291. url: 'pro-list.html?productId=' + selected.typeId
  292. });
  293. }
  294. }
  295. //监听搜索框值改变事件
  296. $('#search').on('input', function(e) {
  297. if ($(this).val().length > 0) {
  298. $('#search-hot').hide();
  299. $(".autocompleter-list").css("height", $(document).height());
  300. } else {
  301. $('#search-hot').show();
  302. $("body").css("overflow", "hidden");
  303. $(".autocompleter-list").css("height", "auto");
  304. }
  305. });
  306. $(".loading").hide().css("opacity", "0");
  307. });
  308. //取消搜索
  309. $(document).on('tap', '.my-btn-cancel', function() {
  310. $(this).hide();
  311. $('#search-hot').hide();
  312. $("body").css("overflow", "auto");
  313. $('#search').autocompleter("close");
  314. $(".autocompleter-list").empty().css("height", "auto");
  315. $('.autocompleter-hint').removeClass('autocompleter-hint-show').empty();
  316. $(".icon-caidan").show();
  317. $('#search').blur();
  318. });
  319. //打开菜单
  320. $(document).on('tap', '.icon-caidan', function() {
  321. $("#menu").css("height", $(window).height());
  322. $("#menu>li").addClass("active");
  323. });
  324. //关闭菜单
  325. $(document).on('tap', '.icon-guanbi', function() {
  326. $("#menu>li").removeClass("active");
  327. $("#menu").css("height", "0px");
  328. });
  329. //精选产品详情
  330. $(document).on('tap', '.mui-table-view-cell>a', function() {
  331. location.href = 'pro-details.html?productId=' + $(this).attr("proid")
  332. });
  333. mui('body').on('tap', '.to_new_slt', function() {
  334. location.href = 'pro-details.html?productId=65'
  335. });
  336. mui('body').on('tap', '.to_new_slt_2', function() {
  337. location.href = 'vip-equity.html'
  338. });
  339. mui('body').on('tap', '.to_new_xs', function() {
  340. location.href = "pro-list.html?productId=13";
  341. });
  342. //产品详情-配件
  343. $(document).on('tap', '#index-pro-items>.mui-control-item', function() {
  344. location.href = 'pro-list.html?productId=' + $(this).attr("name") + '&childTypeId=' + $(this).attr("item");
  345. });
  346. //more更多产品
  347. $(document).on('tap', '.go_pro_list', function() {
  348. if ($(this).attr("type") == "aiberle") {
  349. location.href = "pro-list.html?productId=13";
  350. } else {
  351. location.href = "pro-list.html?productId=14";
  352. }
  353. });
  354. //菜单跳转
  355. $(document).on('tap', '#menu>.line>a', function() {
  356. location.href = 'pro-list.html?productId=' + $(this).attr("name") + '&childTypeId=' + $(this).attr("item");
  357. });
  358. mui('body').on('tap', '.erweima', function() {
  359. $('.dalog').show();
  360. });
  361. // 关闭弹窗
  362. $(document).on('tap', '.icon-guanbi', function() {
  363. $('.dalog').hide();
  364. });
  365. mui('body').on('tap', '.go_cent', function() {
  366. mui.openWindow({
  367. url: 'vip-equity.html'
  368. })
  369. });
  370. </script>
  371. </html>