浏览代码

修复bug

wangxiaoming 7 年之前
父节点
当前提交
2d50580eff
共有 4 个文件被更改,包括 48 次插入17 次删除
  1. 2 1
      aiberle/clearing.html
  2. 11 7
      aiberle/pro-details.html
  3. 12 8
      aiberle/pro-list.html
  4. 23 1
      aiberle/shopping-cart.html

+ 2 - 1
aiberle/clearing.html

@@ -17,7 +17,7 @@
 		</style>
 		<script type="text/javascript">
 			// 屏蔽分享
-			window.hiddenAllWechatMenu = true;
+			//window.hiddenAllWechatMenu = true;
 		</script>
 	</head>
 
@@ -121,6 +121,7 @@ var yhq_id='';			mui.ready(function() {
 								if(dt.isRedirect) {
 									location.href = dt.redirectURL;
 								} else {
+									console.log(dt);
 									if(dt.status == true) {
 										// 购物项遍历
 										console.log(dt)

+ 11 - 7
aiberle/pro-details.html

@@ -344,14 +344,18 @@
 					var cartidList = ''; //购物项id集合
 					$.each($(".my-picker .mui-numbox"), function(index) {
 						var th = $(this);
-						if(typeof(th.attr("cartid")) != "undefined") {
-							var a = '';
-							if(index != 0) {
-								a = '-' + th.attr("cartid"); //组装购物项id
-							} else {
-								a = th.attr("cartid");
+						if(th.attr("cartid") != "undefined") {
+//							var a = '';
+//							if(index != 0) {
+//								a = '-' + th.attr("cartid"); //组装购物项id
+//							} else {
+//								a = th.attr("cartid");
+//							}
+							if(cartidList == ''){
+								cartidList += th.attr("cartid") ;
+							}else{
+								cartidList += '-' + th.attr("cartid") ;
 							}
-							cartidList += a;
 						}
 					});
 

+ 12 - 8
aiberle/pro-list.html

@@ -472,14 +472,18 @@ window.addEventListener("popstate", function() {
 					var cartidList = ''; //购物项id集合
 					$.each($(".my-picker .mui-numbox"), function(index) {
 						var th = $(this);
-						if(typeof(th.attr("cartid")) != "undefined") {
-							var a = '';
-							if(index != 0) {
-								a = '-' + th.attr("cartid"); //组装购物项id
-							} else {
-								a = th.attr("cartid");
+						if(th.attr("cartid") != "undefined") {
+//							var a = '';
+//							if(index != 0) {
+//								a = '-' + th.attr("cartid"); //组装购物项id
+//							} else {
+//								a = th.attr("cartid");
+//							}
+							if(cartidList == ''){
+								cartidList += th.attr("cartid") ;
+							}else{
+								cartidList += '-' + th.attr("cartid") ;
 							}
-							cartidList += a;
 						}
 					});
 
@@ -498,7 +502,7 @@ window.addEventListener("popstate", function() {
 			});
 		//产品详情
 			$(document).on('tap', '.pro-table-pull>li', function() {
-				location.href = 'pro-details.html?productId=' + $(this).attr("name")
+				//location.href = 'pro-details.html?productId=' + $(this).attr("name")
 			});	
 		</script>
 	</body>

+ 23 - 1
aiberle/shopping-cart.html

@@ -27,6 +27,26 @@
 				&nbsp;&nbsp;加载中...
 			</div>
 		</div>
+		
+		<footer class="mui-bar mui-bar-tab" id="footer-bar-tab" style="display: none;">
+			<a class="mui-tab-item ">
+				<span class="iconfont icon-shouye"></span>
+				<span class="mui-tab-label">首页</span>
+			</a>
+			<a class="mui-tab-item mui-active">
+				<span class="iconfont icon-gouwuche"></span>
+				<span class="mui-tab-label">购物车</span>
+			</a>
+			<a class="mui-tab-item">
+				<span class="iconfont icon-dingdan"></span>
+				<span class="mui-tab-label">订单</span>
+			</a>
+			<a class="mui-tab-item">
+				<span class="iconfont icon-wode"></span>
+				<span class="mui-tab-label">我的</span>
+			</a>
+		</footer>
+		
 		<div class="mui-content">
 			<div class="gwc_null">
 				<img width="130px" src="images/cart-null.png">
@@ -139,7 +159,9 @@
 								if(dt.data.cartList.length==0){
 									$(".shopping-box,.buy-footer1").hide();
 									$(".gwc_null").show();
+									$("#footer-bar-tab").show();
 								}else{
+									
 									mui.each(dt.data.cartList, function(index) {									
 										var li = document.createElement("li");
 										li.className = 'mui-table-view-cell mui-media';
@@ -335,7 +357,7 @@
 			//跳转产品列表页面
 			mui('body').on('tap', '.go_web_shop', function() {
 				mui.openWindow({
-					url: 'chanpin_list.html'
+					url: 'pro-list.html'
 				});
 			});