wangxiaoming %!s(int64=7) %!d(string=hai) anos
pai
achega
93998e8530
Modificáronse 4 ficheiros con 49 adicións e 8 borrados
  1. 9 1
      aiberle/clearing.html
  2. 2 1
      aiberle/my-center.html
  3. 4 1
      aiberle/order-details.html
  4. 34 5
      aiberle/pay-win.html

+ 9 - 1
aiberle/clearing.html

@@ -132,7 +132,7 @@ var yhq_id='';			mui.ready(function() {
 											console.log("有优惠券" + dt.data.couponItems.length + "张")
 											var str='';
 											mui.each(dt.data.couponItems,function(){
-												str+= '<li class="my-table-view-cell" style="opacity:.5"><div class="mui-table"><div class="mui-table-cell table-middle mui-col-xs-11">优惠券:¥'+ ((this.couponConsumeEnough)/100).toFixed(2)+'<h6>有效期至:'+this.couponUseEndDate+'</h6></div><div class="mui-table-cell table-middle mui-col-xs-1"><input name="checkbox" val="'+(this.couponConsumeEnough/100).toFixed(2)+'" type="checkbox" class="mui-pull-left" id="'+this.couponId+'"/></div></div></li>';
+												str+= '<li class="my-table-view-cell" style="opacity:.5"><div class="mui-table"><div class="mui-table-cell table-middle mui-col-xs-11">优惠券:¥'+ ((this.couponReduce)/100).toFixed(2)+'<h6>有效期至:'+this.couponUseEndDate+'</h6></div><div class="mui-table-cell table-middle mui-col-xs-1"><input name="checkbox" val="'+(this.couponReduce/100).toFixed(2)+'" type="checkbox" class="mui-pull-left" id="'+this.couponItemId+'"/></div></div></li>';
 											});
 											$("body").append('<div class="my-picker"><ul class="mui-table-view mui-table-view-striped mui-table-view-condensed my-grid-view-no" style="padding: 20px 0 30px 0;overflow: scroll;max-height: 400px;">' + str + '</ul><button class="mui-btn my-btn-block my-btn-buy-know" disabled="disabled">确认使用</button></div>');
 										}
@@ -218,6 +218,14 @@ var yhq_id='';			mui.ready(function() {
 				$(".my-picker").removeClass("active");
 				$(".mui-backdrop").css("opacity",0).remove();
 				$(".btn-youhuiquan>span").text("-¥"+$("input[name=checkbox]:checked").attr("val")).show();
+				
+				var cout = $("input[name=checkbox]:checked").attr("val");
+				var count_price = payTotal - cout*100;
+				
+				if(count_price <= 0) {
+					count_price = 0.0; //判断商品价格减去现金券价格若<0 则显示0
+				}
+				$(".count_price").text((count_price/100).toFixed(2));
 			});
 	// 获取微信共享地址
 	$(document).on('tap', '#user-address-div', function() {

+ 2 - 1
aiberle/my-center.html

@@ -102,7 +102,8 @@
 						</div>
 					</div>
 				</li>
-				<li class="mui-table-view-cell" href="coupon_list.html">
+				<li class="mui-table-view-cell" >
+					<!--href="coupon_list.html"-->
 					<div class="mui-table">
 						<div class="mui-table-cell mui-col-xs-5 table-middle">
 							<span class="iconfont icon-quanbao"></span>券包

+ 4 - 1
aiberle/order-details.html

@@ -70,7 +70,7 @@
 					<li>
 						下单时间:<span id="salesCreateDate"></span>
 					</li>
-					<li>
+					<li id="salesUserRemarkShow" style="display: none;">
 						订单备注:<span id="salesUserRemark"></span>
 					</li>
 				</ul>
@@ -219,6 +219,9 @@
 								$("#salesCreateDate").html(order.salesCreateDate);
 								$("#salesYetAmount").html(accDiv(order.salesYetAmount,100));
 								$("#salesUserRemark").html(order.salesUserRemark);
+								if(order.salesUserRemark != null && order.salesUserRemark != "" && typeof(order.salesUserRemark) != 'undefined'){
+									$("#salesUserRemarkShow").show();
+								}
 								$("#num").html(num);
 								$("#operation").html(operationHtml);
 							}

+ 34 - 5
aiberle/pay-win.html

@@ -34,11 +34,11 @@
 				<p>感谢您的购买</p>
 				</div>
 				<div style="margin:-40px auto 0 auto;width:240px;text-align: center;">
-					<img width="160px" src="images/qrcode.png" />
-					<p>
-					长按识别,关注aiberle公众号<br /> 随时查看订单信息
-				</p>
-				<div style="padding: 20px 0;">
+					<img width="160px" src="images/qrcode.png" class="code_show"  style="display: none;"/>
+					<p style="padding-bottom: 20px;display: none;" class="code_show" >
+						长按识别,关注aiberle公众号<br /> 随时查看订单信息
+					</p>
+				<div style="">
 					<button type="button" class="mui-btn my-btn go-pro-list">继续逛逛</button>&nbsp;&nbsp;&nbsp;&nbsp;
 					<button type="button" class="mui-btn my-btn go_order_details">查看订单</button>
 				</div>
@@ -51,6 +51,33 @@
 	var orderId=getParam("orderId");		
 	mui.ready(function(){
 		console.log("页面加载完毕")
+		
+		$.ajax(base_path + '/wechat/agent/member?dates=' + new Date().getTime(), {
+					dataType: 'json',
+					type: 'post',
+					xhrFields: {
+						withCredentials: true
+					},
+					crossDomain: true,
+					timeout: 15000,
+					success: function(dt) {
+						var data = dt.data;
+						if(dt.status) {
+							console.log(data);
+							if(data.userStatus == null || data.userStatus == "" || typeof(data.userStatus) == "undefined" || data.userStatus !=2){
+								$(".code_show").show();
+							}
+						} else {
+							$(".code_show").show();
+						}
+					},
+					error: function(xhr, type, errorThrown) {
+						//异常处理;
+						console.log(xhr);
+					}
+				});
+		
+		
 		document.querySelector('.loading-bg').style.display='none';
 	});
 	//跳转订单详情
@@ -65,6 +92,8 @@
 			url: 'pro-list.html'
 		});
 	});
+	
+	
 	</script>
 	</body>
 </html>