wangxiaoming пре 6 година
родитељ
комит
ad42fc8fc1
4 измењених фајлова са 59 додато и 80 уклоњено
  1. 4 18
      watero/chanpin_list.html
  2. 7 7
      watero/css/style.css
  3. 39 33
      watero/index.html
  4. 9 22
      watero/js/page/chanpin_list.js

+ 4 - 18
watero/chanpin_list.html

@@ -3,7 +3,7 @@
 
 <head>
 	<meta charset="UTF-8">
-	<title></title>
+	<title>产品列表</title>
 	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
 	<meta name="apple-mobile-web-app-capable" content="yes">
 	<meta name="apple-mobile-web-app-status-bar-style" content="black">
@@ -15,7 +15,7 @@
 		.mui-table-view.mui-grid-view .mui-table-view-cell .mui-media-object:nth-of-type(odd){padding-right: 4px;}
 		.mui-pull-caption{font-size: 12px;}
 		.tab-with-chanpin-list{margin-top: 0;padding-top: 5px;}
-		#pullrefresh_chanpin_list{padding-top: 56px;}
+		#pullrefresh_chanpin_list{padding-top: 46px;}
 		#pullrefresh_chanpin_list .mui-table-view-cell{border-bottom: 0;text-align: left;}
 		#pullrefresh_chanpin_list .mui-table-view-chevron .mui-table-view-cell:last-child{border-bottom: 0;}
 		#pullrefresh_chanpin_list .mui-table-view-cell:after{display: none;}
@@ -75,24 +75,10 @@
 </header>-->
 <div class="mui-segmented-control tab-with-chanpin-list">
 	<a class="mui-control-item mui-active">
-		<span class="iconfont icon-shuiji"></span>
-		<span class="mui-tab-label">水机</span>
-	</a>
-	<!--<a class="mui-control-item" style="display: none">
-		<span class="iconfont icon-dingzhi"></span>
-		<span class="mui-tab-label">定制</span>
-	</a>-->
-	<a class="mui-control-item" style="">
-		<span class="iconfont icon-gehu"></span>
-		<span class="mui-tab-label">个护</span>
-	</a>
-	<a class="mui-control-item" style="">
-		<span class="iconfont icon-jiadian"></span>
-		<span class="mui-tab-label">电器</span>
+		<span class="mui-tab-label">经典款净水机</span>
 	</a>
 	<a class="mui-control-item">
-		<span class="iconfont icon-lvxin"></span>
-		<span class="mui-tab-label">配件</span>
+		<span class="mui-tab-label">制氢款净水机</span>
 	</a>
 </div>
 <!--下拉刷新容器-->

+ 7 - 7
watero/css/style.css

@@ -86,11 +86,11 @@ ul{list-style: none;padding: 0;margin: 0;}
 .tab-with-chanpin-list {background: #fff;border: 0;margin-top: 55px;z-index: 10;}
 .tab-with-chanpin-list .mui-control-item {
     line-height: 1;
-    height: 50px;
-    vertical-align: bottom;
+    height: 40px;
+    vertical-align: middle;
     border: 0;
     border-bottom: 2px solid transparent;
-    color: #bfbfbf;
+    color: #333;
     background-color: transparent !important;
     padding-bottom: 3px;
     position: relative;
@@ -107,7 +107,7 @@ ul{list-style: none;padding: 0;margin: 0;}
 .tab-with-chanpin-list .mui-control-item.mui-active {
     background-color: transparent !important;
     border-bottom: 2px solid #55c0dc !important;
-    color: #55c0dc;
+    color: #333;
 }
 
 .btn-box{display: inline-block;position: absolute;right:0;bottom:12px;width:100%;text-align: left;padding-left:120px;}
@@ -173,10 +173,10 @@ ul{list-style: none;padding: 0;margin: 0;}
 .tb-clearing tr td:nth-of-type(2) {width: 50%;}
 .t-r {text-align: right !important;}
 .tb-clearing tr td:nth-of-type(3) {min-width: 6em;max-width: 10em;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;}
-.count_price_box {color: #eb4e45;text-align: center;}
+.count_price_box {color: #eb4e45;text-align: left;}
 .tb-clearing tr:first-child td:last-child {text-align: center;}
 .ft-14 {font-size: 14px;}
-.quanxuan:after {content: '';position: absolute;width: 1px;height: 70%;background-color: #ababab;right: 0;top: 15%;-webkit-transform: scaleX(.5);transform: scaleX(.5);}
+.quanxuan:after {content: '';position: absolute;width: 1px;height: 70%;background-color: #fff;right: 0;top: 15%;-webkit-transform: scaleX(.5);transform: scaleX(.5);}
 .mt-mr-che {margin:2.5em .3em 0 0;}
 .add_gwc{padding: 18px 25px;border-radius: 0;background-color:#55c0dc !important;color: #fff;border: 0;}
 .add_gwc1 {padding: 18px 25px;border-radius: 0;background-color: #ababab;color: #fff;border: 0;}
@@ -320,7 +320,7 @@ ul{list-style: none;padding: 0;margin: 0;}
 .swiper-pagination-bullet-active{background: #db3f53;}
 .index-title{padding: 7px 12px 7px 12px;display: block;position: relative;}
 .index-title strong{font-size: 17px;}
-.index-title .mui-pull-right{color: #999;}
+.index-title .mui-pull-right{color: #333;}
 .index-title font{display: inline-block;-webkit-transform: translateY(-1px);transform: translateY(-1px);}
 
 .pro-list .mui-media-object{background: #f2f2f2;border-radius: 5px;display: block;}

Разлика између датотеке није приказан због своје велике величине
+ 39 - 33
watero/index.html


+ 9 - 22
watero/js/page/chanpin_list.js

@@ -8,8 +8,7 @@ mui.init({
         }
     }
 });
-var search_str = "",
-    pageNumber = 0,
+var pageNumber = 0,
     pagesize = 10,
     proType = "1";
 
@@ -17,7 +16,6 @@ function pullupRefresh() {
     pageNumber += 1;
     $.ajax(base_path + '/product/productIndex?dates=' + new Date().getTime(), {
         data: {
-            "productName": search_str,
             "pageSize": pagesize,
             "pageNO": pageNumber,
             "productType": proType
@@ -38,7 +36,6 @@ function pullupRefresh() {
                 chanpin_data = dt.data.productList;
                 mui('#pullrefresh_chanpin_list').pullRefresh().endPullupToRefresh(chanpin_data.length < pagesize);
                 var table = document.body.querySelector('.my-tab-view-pull');
-                search_str == "" ? search_str = "" : search_str;
                 mui(chanpin_data).each(function(index) {
                     var pro_color = this.productColor;
                     var li = document.createElement('li');
@@ -125,19 +122,8 @@ mui.ready(function() {
     //springFestivalPop();
     marquee_Show();
     if(proType != 1) {
-        $(".tab-with-chanpin-list .icon-shuiji").parent().removeClass('mui-active');
-        switch(proType) {
-            case "11":
-                console.log("11")
-                $(".tab-with-chanpin-list .icon-dingzhi").parent().addClass('mui-active');
-                break;
-            case "2":
-                $(".tab-with-chanpin-list .icon-lvxin").parent().addClass('mui-active');
-                break;
-            default:
-                $(".tab-with-chanpin-list .icon-machine").parent().addClass('mui-active');
-                break
-        }
+        $(".tab-with-chanpin-list .mui-control-item:first-child").removeClass('mui-active');
+        $(".tab-with-chanpin-list .mui-control-item:last-child").addClass('mui-active');
     }
     mui('#pullrefresh_chanpin_list').pullRefresh().pullupLoading();
     getCartNum();
@@ -172,15 +158,16 @@ mui.each(document.querySelectorAll('.tab-with-chanpin-list .mui-control-item'),
                 proType = 1;
                 break;
             case 1:
-                proType = 13;
-                break;
-            case 2:
-                proType = 14;
+                proType = 16;
                 break;
             default:
-                proType = 2;
+                proType = 1;
                 break
         }
+        var href=location.href;
+        if(href.indexOf("proType")>0){
+        	history.pushState("", "产品列表",'//'+location.host+'/wateroWechat/chanpin_list.html?proType='+proType);
+        }
         $('.my-tab-view-pull').empty();
         mui('#pullrefresh_chanpin_list').pullRefresh().refresh(true);
         mui('#pullrefresh_chanpin_list').pullRefresh().pullupLoading()