作者 anyv
1 个管道 的构建 通过 耗费 1 秒

1

... ... @@ -132,6 +132,7 @@
<script src="__TMPL__/public/assets/js/base.js"></script>
<script src="__TMPL__/public/assets/js/jquery.js"></script>
<script>
$(function() {
$(".order_newsNum div").on("click", function(evt) {
if ($(this).text() == "-") {
... ... @@ -159,25 +160,25 @@
// 单选
$(".sh_cartround img").each(function() {
$(this).on("click", function() {
if ($(this).attr("src") == "__TMPL__/public/assets/images/39_0.png") {
$(this).attr("src", "__TMPL__/public/assets/images/39.png");
calcTotal2();
if ($(this).attr("src") == "img/39_0.png") {
$(this).attr("src", "img/39.png");
calcTotal();
} else {
$(this).attr("src", "__TMPL__/public/assets/images/39_0.png");
calcTotal2();
$(this).attr("src", "img/39_0.png");
calcTotal();
}
});
});
// 全选
$(".shop_carts1 img").click(function() {
if ($(this).attr("src") == "__TMPL__/public/assets/images/39_1.png") {
$(this).attr("src", "__TMPL__/public/assets/images/39.png");
$(".sh_cartround img").attr("src", "__TMPL__/public/assets/images/39.png");
if ($(this).attr("src") == "img/39_1.png") {
$(this).attr("src", "img/39.png");
$(".sh_cartround img").attr("src", "img/39.png");
calcTotal();
} else {
$(this).attr("src", "__TMPL__/public/assets/images/39_1.png");
$(".sh_cartround img").attr("src", "__TMPL__/public/assets/images/39_0.png");
$(this).attr("src", "img/39_1.png");
$(".sh_cartround img").attr("src", "img/39_0.png");
$(".zoji span").text("0");
}
});
... ... @@ -196,7 +197,7 @@
// 点击删除
$(".shop_remove2").click(function() {
$($(".sh_cartround img")).each(function() {
if ($(this).attr("src") == "__TMPL__/public/assets/images/39.png") {
if ($(this).attr("src") == "img/39.png") {
$(this)
.parents("li")
.remove();
... ... @@ -238,6 +239,7 @@
$(".zoji span").html(totalPrice.toFixed(2));
}
});
</script>
</body>
... ...