Forráskód Böngészése

Merge branch 'master' of http://git.iamberry.com/wangxiaoming/iamberry-watero

wangxiaoming 6 éve
szülő
commit
17b2f4516b

+ 1 - 2
watero-wechat-web/src/main/webapp/WEB-INF/views/wechat/chanpin_list.html

@@ -106,7 +106,6 @@
 <script src="//s.iamberry.com/watero/js/shop/main.js?v=2017030601"></script>
 <script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
 <script src="//s.iamberry.com/watero/js/shop/validate.js?v=2016111701"></script>
-<script src="//s.iamberry.com/watero/js/shop/chanpin_list.js?v=2017042701"></script>
-<!--<script src="http://test.iamberry.com/watero/common/shop/js/page/chanpin_list.js"></script>-->
+<script src="//s.iamberry.com/watero/js/shop/chanpin_list.js?v=2018030501"></script>
 </body>
 </html>

+ 75 - 10
watero-wechat-web/src/main/webapp/WEB-INF/views/wechat/clearing.html

@@ -136,12 +136,18 @@
 			</div>
 		</li>
 		<li class="mui-table-view-cell" id="vipSub" style="display: none;">
-			<div style="display: block;"><span>VIP专享(1年滤芯套装)</span><span class="mui-pull-right"><span id="vip_price">- ¥0</span></span></div>
+			<div><span>VIP专享(1年滤芯套装)</span><span class="mui-pull-right"><span id="vip_price">- ¥0</span></span></div>
 		</li>
 		<li class="mui-table-view-cell" id="accSub">
 			<div><span id="yhq_name"></span><span class="mui-pull-right"><span id="yhq_price"></span></span></div>
 			<div>账户余额:<span class="mui-pull-right cl-red">- ¥<span id="used_buy">0</span></span></div>
 		</li>
+		<li class="mui-table-view-cell" id="user2000" style="display: none;">
+			<div><span>全场购满2000元</span><span class="mui-pull-right"><span id="user_2000">赠Aiberle电动牙刷1支</span></span></div>
+		</li>
+		<li class="mui-table-view-cell" id="user3000" style="display: none;">
+			<div><span>全场购满3000元</span><span class="mui-pull-right">- ¥<span id="user_3000">100</span></span></div>
+		</li>
 	</ul>
 	<div class="clearing-count" style="text-align: right;">订单合计:<font class="cl-red">¥</font><span class="cl-red" id="user-pay-money-span">加载中...</span></div>
 	<div class="pay_weixin">
@@ -200,6 +206,7 @@
     var accVipSub=0;
     var exchangeColorId='';
     var t1=0,t2=0,all_t=0;
+    var user38Interests=2;
 
     mui.ready(function() {
         var name,value;
@@ -217,8 +224,8 @@
                     // 购物项遍历
                     //console.log(dt)
                     var liNote = "";
-
                     var cNum = 0;
+                    user38Interests=dt.data.user38Interests;
                     if(dt.data.balance == 0) {
                         $(".pay_ipt_box").hide();
                     } else {
@@ -323,13 +330,28 @@
                                     console.log("请选择要兑换的滤芯");
 								}
 							});
+                            //下次兑换
                             $(document).on('tap', '.nexts', function() {
                                 $("#forward input[yhq_type=3]").removeAttr('checked').prop("disabled","disabled");
                                 $(".dhq-dalog").hide();
                                 flag=false;
+                                if(user38Interests==1){
+                                    console.log(usePayMoney>=2000 && usePayMoney<3000)
+                                    if(usePayMoney>=2000 && usePayMoney<3000){
+                                        $("#user2000").show();
+                                        $("#user-pay-money-span").html(usePayMoney + " 元");
+                                    }else if(usePayMoney>=3000){
+                                        $("#user-pay-money-span").html((usePayMoney-100) + " 元");
+                                        $("#user2000,#user3000").show();
+                                    }else{
+                                        $("#user-pay-money-span").html(usePayMoney + " 元");
+                                    }
+                                }else{
+                                    $("#user-pay-money-span").html(usePayMoney + " 元");
+                                }
+                                console.log("899")
 							});
 
-                            console.log("899")
 
                         }
                         if (dt.data.disable) {
@@ -420,8 +442,21 @@
                         $("#vipSub").show();
                         usePayMoney-=accVipSub;
 					}
-                    $("#user-pay-money-span").html(usePayMoney.toFixed(2) + " 元");
-
+                    if(user38Interests==1){
+                        if(usePayMoney>=2000 && usePayMoney<3000){
+                            $("#user2000").show();
+                            $("#user3000").hide();
+                            $("#user-pay-money-span").html(usePayMoney + " 元");
+                        }else if(usePayMoney>=3000){
+                            $("#user-pay-money-span").html((usePayMoney-100) + " 元");
+                            $("#user2000,#user3000").show();
+                        }else{
+                            $("#user-pay-money-span").html(usePayMoney + " 元");
+                            $("#user3000").hide();
+                        }
+                    }else{
+                        $("#user-pay-money-span").html(usePayMoney + " 元");
+                    }
                     //默认自己拉出地址
                     if(dt.data.addressInfo != undefined && dt.data.addressInfo != null) {
                         $(".btn-add-address").hide();
@@ -452,7 +487,22 @@
                             if($(".dhq-last-add").length>0){
                                 yhq_val = 0;
                             }
-                            $("#user-pay-money-span").html((usePayMoney - yhq_val - ipt_balance).toFixed(2));
+                            console.log("998")
+                            if(user38Interests==1){
+                                if((usePayMoney - yhq_val - ipt_balance)>=2000 && (usePayMoney - yhq_val - ipt_balance)<3000){
+                                    $("#user2000").show();
+                                    $("#user3000").hide();
+                                    $("#user-pay-money-span").html((usePayMoney - yhq_val - ipt_balance).toFixed(2) + " 元");
+                                }else if((usePayMoney - yhq_val - ipt_balance)>=3000){
+                                    $("#user-pay-money-span").html((usePayMoney - yhq_val - ipt_balance-100).toFixed(2) + " 元");
+                                    $("#user2000,#user3000").show();
+                                }else{
+                                    $("#user-pay-money-span").html((usePayMoney - yhq_val - ipt_balance).toFixed(2) + " 元");
+                                    $("#user3000").hide();
+                                }
+                            }else{
+                                $("#user-pay-money-span").html((usePayMoney - yhq_val - ipt_balance).toFixed(2) + " 元");
+                            }
                         }
                     }
 
@@ -673,6 +723,7 @@
                 return;
             }
         });
+        //选择优惠券
         mui('body').on('tap', '.mui-popover-action li>a', function() {
             var a = this,
                 parent;
@@ -695,11 +746,10 @@
                         yhq_val = 0;
                         mui.alert(' ', '当前优惠券不可用', function() {});
                     }
-                    console.log($("input[name=radio1]:checked").prev().html());
                     $("#yhq_name").html($("input[name=radio1]:checked").prev().html());
                     $("#yhq_price").html("- ¥"+parseInt(yhq_val).toFixed(2));
                     $("#accSub,#accSub>div:first-child").show();
-                    $("#user-pay-money-span").html((usePayMoney - yhq_val - ipt_balance).toFixed(2));
+                    //$("#user-pay-money-span").html((usePayMoney -yhq_val- ipt_balance).toFixed(2));
                     $(".dhq-last-add").hide();
                 }else if(yhq_type == 3){
                     if(yhq_val > (usePayMoney - ipt_balance)) {
@@ -715,15 +765,30 @@
                     if($(".dhq-last-add").length>0){
                         yhq_val = 0;
 					}
-                    $("#user-pay-money-span").html((usePayMoney -yhq_val- ipt_balance).toFixed(2));
+                    //$("#user-pay-money-span").html((usePayMoney -yhq_val- ipt_balance).toFixed(2));
 				} else {
                     yhq_val = accSub(usePayMoney, Math.floor(accMul($("input[name=radio1]:checked").val(), usePayMoney) * 100) / 100);
                     $("#yhq_name").html($("input[name=radio1]:checked").prev().html());
                     $("#yhq_price").html("- ¥"+yhq_val);
                     $("#accSub,#accSub>div:first-child").show();
-                    $("#user-pay-money-span").html((usePayMoney - yhq_val - ipt_balance).toFixed(2));
+                    //$("#user-pay-money-span").html((usePayMoney - yhq_val - ipt_balance).toFixed(2));
                     $(".dhq-last-add").hide();
                 }
+                if(user38Interests==1){
+                    if((usePayMoney - yhq_val - ipt_balance)>=2000 && (usePayMoney - yhq_val - ipt_balance)<3000){
+                        $("#user2000").show();
+                        $("#user3000").hide();
+                        $("#user-pay-money-span").html((usePayMoney - yhq_val - ipt_balance).toFixed(2) + " 元");
+                    }else if((usePayMoney - yhq_val - ipt_balance)>=3000){
+                        $("#user-pay-money-span").html((usePayMoney - yhq_val - ipt_balance-100).toFixed(2) + " 元");
+                        $("#user2000,#user3000").show();
+                    }else{
+                        $("#user3000").hide();
+                        $("#user-pay-money-span").html((usePayMoney - yhq_val - ipt_balance).toFixed(2) + " 元");
+                    }
+                }else{
+                    $("#user-pay-money-span").html((usePayMoney - yhq_val - ipt_balance).toFixed(2) + " 元");
+                }
             }
         });
         mui.os.ios ? listener_ipt() : keyup_fn();

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 23 - 6
watero-wechat-web/src/main/webapp/WEB-INF/views/wechat/index.html


+ 1 - 1
watero-wechat-web/src/main/webapp/common/shop/js/page/chanpin_list.js

@@ -117,7 +117,7 @@ mui.ready(function() {
                 $(".tab-with-chanpin-list .icon-dingzhi").parent().addClass('mui-active');
                 break;
             case "2":
-                $(".tab-with-chanpin-list .icon-filter").parent().addClass('mui-active');
+                $(".tab-with-chanpin-list .icon-lvxin").parent().addClass('mui-active');
                 break;
             default:
                 $(".tab-with-chanpin-list .icon-machine").parent().addClass('mui-active');