Files
orico-official-website-old/app/usmobile/view/customer/my_collection.phtml
2024-10-29 14:04:59 +08:00

190 lines
6.1 KiB
PHTML
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
{include file="include/head" /}
<script type="text/javascript">
var navID = "1";
</script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/m_weben/css/login.css">
</head>
<body style="background: #f4f5f5;">
<!--top-->
<div id="content">
{include file="include/top-collection" /}
<div class="img-responsive personal-all margin-top-90">
<img src="__PUBLIC__/m_web/images/user/personal-bg.jpg" alt=""/>
<div class="personal_header">
<?php if (!empty($customer_info)): ?>
<?php
$head_img = $customer_info['picture'] != '' ? $customer_info['picture'] : '__PUBLIC__/web/images/customer/logo_small_03.png';
?>
<div class="m_Container">
<div class="left"><img class="headimg" style="border-radius: 50%;" src="<?php echo $head_img; ?>" alt=""/></div>
<div class="right text_28">
<p>User: <?php echo $customer_info['firstname']; ?></p>
<p class="margin-top-14">Status: Logged in</p>
</div>
</div>
<?php endif; ?>
</div>
</div>
<!--收藏内容-->
<div class="personal-bg margin-top-20 margin-bottom-10 overflow-h">
<div class="m_Container">
<!--导航-->
<div class="collection_c margin-bottom-14 margin-top-10 text_black " id="collection_c">
<div class="scroller">
<ul class="clearfix text_28">
<li class="<?php if ($cid == 0): ?> collection_c_hover <?php endif; ?>"><a href="__ORICOROOT__/customer/my_collection.html" class=""><span>All</span></a></li>
<?php if (!empty($productCategory)): ?>
<?php foreach($productCategory as $key => $value): ?>
<li class="<?php if ($cid == $value['id']): ?> collection_c_hover <?php endif; ?>"><a href="__ORICOROOT__/customer/my_collection/cid/<?php echo $value['id']; ?>" class=""><span><?php echo $value['name']; ?></span></a></li>
<?php endforeach; ?>
<?php endif; ?>
</ul>
</div>
</div>
<!--列表-->
<div class="collection_l f_weight_100">
<?php if (!empty($list)): ?>
<ul>
<?php foreach($list as $key => $value): ?>
<a href="/usmobile/product/detail/id/<?php echo $value['id']; ?>.html">
<li class="">
<div class="Batch_select" style="display: none;">
<input id="" name="check_box" type="checkbox" class="check_box" value="<?php echo $value['id']; ?>"><label></label>
</div>
<div class="left img-responsive"><img src="<?php echo $value['product_two_img']; ?>"></div>
<div class="right">
<p class="text_28 margin-top-14"><?php echo $value['name']?></p>
<p class="text_24 text_gray margin-top-20"><?php echo $value['brand_id']; ?></p>
</div>
</li>
</a>
<?php endforeach; ?>
</ul>
<?php else: ?>
<!--无收藏-->
<div class="margin-top-90 margin-bottom-90 text_32 text_center">You haven't collected any products yet.</div>
<?php endif; ?>
</div>
</div>
<div class="collection_b text_24" style="display: none;">
<div class="m_container margin-bottom-20 margin-top-30 text_gray overflow-h">
<div class="collection_b_left img-responsive"><input type="checkbox" class="check" name="check" value=""><label></label>Select All</div>
<div class="collection_b_right delete">Delete</div>
</div>
</div>
</div>
<div class="all_del Popup img-responsive" style="display: none">
<div class="all_delect content text_center">
<p class="text_28 margin-bottom-30">Confirm Delete</p>
<p class="all_del_left">
<span class="bg_red u_button_blue text_24">Confirm</span>
<span class="bg_gray u_button_gray text_24">Cancel</span>
</p>
</div>
</div>
<script type="text/javascript" src="__PUBLIC__/m_web/js/scroll/iscroll.js"></script>
<script type="text/javascript" src="__PUBLIC__/m_web/js/scroll/navbarscroll.js"></script>
<script type="text/javascript">
/*导航滚动*/
$(function(){
//demo示例一到四 通过lass调取一句可以搞定用于页面中可能有多个导航的情况
$('.collection_c').navbarscroll();
});
/*批量删除*/
$(function(){
$(".Batch").click(function(){
$(".Batch_select").toggle();
$(".collection_b").toggle();
//$(".u_admin01").hide();
//$(".u_admin02").show();
//$(".u_product .check_B").show();
//$(".u_product .s_del").removeClass('u_del');
});
$(".u_admin02 .cancel").click(function(){
//$(".u_admin02").hide();
//$(".u_admin01").show();
//$(".u_product .check_B").hide();
//$(".u_product .s_del").addClass('u_del');
});
})
/*全选*/
$(document).ready(function(){
$(".collection_b_left input[name='check']").click(function(){
if($(this).is(":checked")){
$(".Batch_select input[type='checkbox']").prop("checked",true);
}else{
$(".Batch_select input[type='checkbox']").prop("checked",false);
}
})
});
/*批量管量*/
var checked = [];
$(document).ready(function(){
$(".delete").click(function(){
$('input[name="check_box"]:checked').each(function() {
checked.push($(this).val());
});
$(".all_del").show();
});
$(".all_delect .bg_gray").click(function(){
$(".all_del").hide();
checked = [];
});
$(".all_delect .bg_red").click(function(){
var product_ids = checked;
cancel_collection(product_ids, 1);
})
});
</script>
<!-- bottom s -->
{include file="include/bottom" /}
<!-- bottom e -->
</body>
</html>
<script type="text/javascript">
function cancel_collection(product_id, type=0)
{
if (product_id == '')
{
alert(' Please choose the product first. ');
$(".all_del").hide();
return;
}
var data = {
type: 1,
coll_id: product_id
};
$.ajax({
url: '/us/collection/cancel_collection',
type: 'post',
dataType: 'json',
data: data,
success: function (res) {
if (type == 1)
{
location.reload();
}
}
})
}
</script>