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

177 lines
5.5 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>
<head>
<meta charset="utf-8">
{include file="include/head" /}
<title>个人中心</title>
<link href="__PUBLIC__/m_web/css/login.css" rel="stylesheet" type="text/css">
</head>
<body style="background: #f4f5f5;">
<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">
<div class="m_Container">
<div class="left"><img class="headimg" src="__PUBLIC__/m_web/images/user/user-img_03.png" alt=""/></div>
<div class="right text_28">
<p>用户:<?php echo $customer_info['firstname']; ?></p>
<p class="margin-top-14">状态:已登录</p>
</div>
</div>
</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>全部</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="/mobile/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): ?>
<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>
<?php endforeach; ?>
</ul>
<?php else: ?>
<!--无收藏-->
<div class="margin-top-90 margin-bottom-90 text_32 text_center">您未收藏任何产品</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>全选</div>
<div class="collection_b_right 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">确定删除?</p>
<p class="all_del_left">
<span class="bg_red u_button_blue text_24">确定</span>
<span class="bg_gray u_button_gray text_24">取消</span>
</p>
</div>
</div>
<!--底部-->
{include file="include/bottom" /}
</body>
</html>
<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>
<script type="text/javascript">
function cancel_collection(product_id, type=0)
{
if (product_id == '')
{
alert('请先选择产品');
$(".all_del").hide();
return;
}
var data = {
type: 1,
coll_id: product_id
};
$.ajax({
url: '/mobile/collection/cancel_collection.html',
type: 'post',
dataType: 'json',
data: data,
success: function (res) {
if (type == 1)
{
location.reload();
}
}
})
}
</script>