|
@@ -79,14 +79,17 @@
|
|
|
</div>
|
|
|
</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>
|
|
|
+ </li>
|
|
|
<li class="mui-table-view-cell" id="accSub">
|
|
|
- <div><span id="yhq_name"></span><span class="mui-pull-right cl-red"><span id="yhq_price"></span></span></div>
|
|
|
+ <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>
|
|
|
</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">
|
|
|
- <button type="button" class="mui-btn mui-btn-success mui-btn-block btn-weixin-pay" id="btn-weixin-pay" style="border-radius: 0;">微信支付</button>
|
|
|
+ <button type="button" class="mui-btn mui-btn-success mui-btn-block btn-weixin-pay" id="btn-weixin-pay" style="border-radius: 0;background-color: #55c0dc;border-color: #55c0dc;">立即支付</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div id="forward" class="mui-popover mui-popover-action mui-popover-bottom">
|
|
@@ -117,6 +120,7 @@
|
|
|
var used_balance = 0;
|
|
|
var yhq_type = 1;
|
|
|
var showIs = false;
|
|
|
+ var accVipSub=0;
|
|
|
|
|
|
mui.ready(function() {
|
|
|
var name,value;
|
|
@@ -170,7 +174,7 @@
|
|
|
"<span class='mui-media-object mui-pull-left wh-100'> <img src='" + colorImg + "'></span>" +
|
|
|
"<div class='mui-media-body' style='padding: 5% 0;'>" +
|
|
|
"<div class='wt-space gwc_tit'>" + dt.data.cartItems[i].productName + "<div class='price_sp cl-gwc' id='product-" + productId + "' price='" + price + "'>¥" + total + "</div></div>" +
|
|
|
- "<small class='gwc_pp'>颜色:" + pro_color + "</small>" +
|
|
|
+ "<small class='gwc_pp'>颜色:" + pro_color + "</small><small class='mui-pull-right'>数量x"+dt.data.cartItems[i].cartNum+"</small>"+
|
|
|
"</div>" +
|
|
|
"</a>" +
|
|
|
"</li>";
|
|
@@ -183,13 +187,16 @@
|
|
|
"<span class='mui-media-object mui-pull-left wh-100'> <img src='" + colorImg + "'></span>" +
|
|
|
"<div class='mui-media-body' style='padding: 5% 0;'>" +
|
|
|
"<div class='wt-space gwc_tit'>" + dt.data.cartItems[i].productName + "<div class='price_sp cl-gwc' id='product-" + productId + "' price='" + price + "'>¥" + total + "</div></div>" +
|
|
|
- "<small class='gwc_pp'>颜色:" + pro_color + "</small>" +
|
|
|
+ "<small class='gwc_pp'>颜色:" + pro_color + "</small><small class='mui-pull-right'>数量x"+dt.data.cartItems[i].cartNum+"</small>"+
|
|
|
"</div>" +
|
|
|
"</a>" +
|
|
|
"</li>";
|
|
|
}
|
|
|
-
|
|
|
+ if(dt.data.cartItems[i].cartColorId==5 && dt.data.cartItems[i].cartProductId==38){
|
|
|
+ accVipSub+=(100* dt.data.cartItems[i].cartNum);
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
if (showIs)
|
|
|
{
|
|
|
liNote = liNote +
|
|
@@ -220,6 +227,11 @@
|
|
|
usePayMoney = accDiv(dt.data.payTotal, 100);
|
|
|
$("#total").val(usePayMoney.toFixed(2) + " 元");
|
|
|
$("#user-integral-span").html(dt.data.userIntegral);
|
|
|
+ if(dt.data.userIsVip==2){
|
|
|
+ $("#vip_price").text("- ¥"+(accVipSub).toFixed(2));
|
|
|
+ $("#vipSub").show();
|
|
|
+ usePayMoney-=accVipSub;
|
|
|
+ }
|
|
|
$("#user-pay-money-span").html(usePayMoney.toFixed(2) + " 元");
|
|
|
|
|
|
//默认自己拉出地址
|
|
@@ -447,7 +459,7 @@
|
|
|
}
|
|
|
console.log($("input[name=radio1]:checked").prev().html());
|
|
|
$("#yhq_name").html($("input[name=radio1]:checked").prev().html());
|
|
|
- $("#yhq_price").html("- ¥"+yhq_val);
|
|
|
+ $("#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));
|
|
|
}else if(yhq_type == 3){
|