2 Star 1 Fork 2

徐子玉 / 品贷网

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
mycollect.html 10.41 KB
一键复制 编辑 原始数据 按行查看 历史
徐子玉 提交于 2017-07-05 11:21 . + pdw
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
Remove this if you use the .htaccess -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>我的收藏-品代网(pindai123.com)--国内首家建材行业供应链交易平台,F2B2C运营模式开创网络建材市场新纪元。</title>
<meta name="keywords" content="代理,加盟,招商,批发,零售,建材网上商城,PPR,PVC,PE,管材,管件,波纹管,缠绕管,卫浴,陶瓷,龙头,浴缸,地漏,吊顶,灯具,开关,插线板,插座,电线,电缆,水暖五金,地板,油漆,地暖,太阳能,净水器,装修材料" />
<meta name="description" content="品代网(pindai123.com)是中国首家采用云管理系统,互联网加实体营销管理为一体的交易平台。专业的建材行业综合网上购物平台,销售管材管件,水暖卫浴,厨卫洁具,灯具开关,板材五金,油漆涂料,电线电缆,家装材料,建筑材料,五金配件,防水等。正品低价,品质保证,便捷操作,诚信服务。">
<meta name="author" content="Administrator">
<meta name="viewport" content="width=device-width; initial-scale=1.0">
<!-- Replace favicon.ico & apple-touch-icon.png in the root of your domain and delete these references -->
<link rel="shortcut icon" href="/favicon.ico">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="stylesheet" href="css/indent.css" />
<!-- 个人中心 -->
<link rel="stylesheet" href="css/userinfor.css" />
<link rel="stylesheet" href="css/add.css"/>
<!--右边栏-->
<link rel="stylesheet" href="css/right_side.css" />
<script src="js/jquery-1.7.2.min.js"></script>
<!-- 验证 -->
<script type="text/javascript" src="js/jquery.validate.js"></script>
<!--右边栏-->
<script type="text/javascript" src="js/right-side/parabola.js"></script>
<script type="text/javascript" src="js/right-side/right_side.js"></script>
</head>
<body>
<!-- 右侧固定导航链接 -->
<!--<div class="mui-mbar-tabs">
{$userright_html}
</div>-->
<!-- top_header 顶部 -->
{$user_head_html}
<!--top_logo -->
<div class="top_logo">
{$userinfo_head_html}
</div>
<!-- indent -->
<div id="indent">
<div class="wrap_1200 clearfix">
<!-- 左侧边栏 -->
<div class="indent_left clearfix">
{$indentleft_html}
</div>
<!-- 右侧 -->
<div class="indent_right clearfix">
<!-- 个人中心-->
<div id="til3_con" class="my_info">
<div class="indent_right_box">
<div class="indent_right_box_title">
<ul>
<li class="aaaa">收藏的厂家</li>
<li>收藏的产品</li>
</ul>
<div class="indent_box_title_right" style="display: none;"><a>批量管理</a></div>
</div>
<!--<div class="indent_right_title">我的收藏</div>-->
<div class="indent_right_con" >
<ul class="indent_right_con_manage" style="display: none;">
<li class="manage_chanel">取消管理</li>
<li class="manage_delete">删除</li>
<li class="manage_choose">全选</li>
</ul>
<div class="my_info_con clearfix">
</div>
</div>
</div>
</div>
<!-- 个人中心 end-->
</div>
</div>
</div>
<!--sidebar-->
{$sidebar_html}
<!-- 版权 -->
<div id="footermain">
{$foot_html}
</div>
<script type="text/javascript">
$(document).ready(function () {
loadCollect();
$('.indent_right_box_title li').on('click',function(){
if($(this).html() == "收藏的厂家"){
loadCollect();
}
else{
loadProductCollect();
}
});
// 收藏的厂家,收藏的商品选择
$('.indent_right_box_title ul li').click(function(){
$(this).addClass('aaaa').siblings().removeClass('aaaa');
});
// 批量管理
$('.indent_box_title_right').click(function(){
$('.indent_right_con_manage').show();
$('.my_collect_icon').show();
});
$('.manage_chanel').click(function(){
$('.indent_right_con_manage').hide();
$('.my_collect_icon').hide();
$('.my_collectBox').css('background','#f2f2f2');
$('.manage_choose').css('color','#666');
$('.my_collect_icon').css('background-position','-400px -160px').removeClass('fff');
});
// 单项选择
$('.my_collect_icon').live('click',function(){
if($(this).hasClass('fff')){
$(this).css('background-position','-400px -160px').removeClass('fff');
$(this).parents('.my_collectBox').css('background','#f2f2f2');
$(this).parents('.my_collectBox').removeClass('abb');
}else{
$(this).css('background-position','-430px -160px').addClass('fff');
$(this).parents('.my_collectBox').css('background','#FFA700');
$(this).parents('.my_collectBox').addClass('abb');
}
});
// 全选
$('.manage_choose').click(function(){
if($('.my_collectBox').hasClass('abb')){
$(this).css('color','#666');
$('.my_collect_icon').css('background-position','-400px -160px').removeClass('fff');
$('.my_collectBox').css('background','#f2f2f2');
$('.my_collectBox').removeClass('abb');
}else{
$(this).css('color','#FFA700');
$('.my_collect_icon').css('background-position','-430px -160px').addClass('fff');
$('.my_collectBox').css('background','#FFA700');
$('.my_collectBox').addClass('abb');
}
});
// 删除
$('.manage_delete').click(function(){
$(".my_collectBox").remove('.abb');
});
});
function loadCollect() {
$.post("api.php?act=myCollect", {},
function (data) {
var html = '';
if (data != '') {
data = $.parseJSON(data);
$.each(data, function (n, value) {
html += '<div class="my_collectBox">';
html += '<a href="store.php?id=' + value.FactoryId + '">';
html += '<div class="my_collectBox_pic"><i class="my_collect_icon" style="display:none"></i><img src="' + value.ListPic + '"></div>';
html += '</a>';
html += '<div class="my_collectBox_word">';
html += '<a href="store.php?id=' + value.FactoryId + '">';
html += '<span class="my_collectBox_name">' + value.Abbreviation + '</span>';
html += '</a>';
html += '<a href="javascript:;" class="my_collectBox_cancel" fid="' + value.FactoryId + '">取消收藏</a>';
html += '</div>';
// html += '</a>';
html += '</div>';
});
}
$('.my_info_con.clearfix').html(html);
$('.my_collectBox_cancel').on("click", function () {
var factoryId = $(this).attr('fid');
$.post("api.php?act=collect", {
factoryId: factoryId,
status: 1
}, function (data) {
loadCollect();
});
});
});
}
function loadProductCollect() {
$.post("api.php?act=myProductCollect", {},
function (data) {
var html = '';
if (data != '') {
data = $.parseJSON(data);
$.each(data, function (n, value) {
html += '<div class="my_collectBox">';
html += '<a href="product.php?factoryId='+value.FactoryId+'&productId=' + value.ProductId + '">';
html += '<div class="my_collectBox_pic"><i class="my_collect_icon" style="display:none"></i><img src="' + value.PicUrl + '"></div>';
html += '</a>';
html += '<div class="my_collectBox_word">';
html += '<a href="product.php?factoryId='+value.FactoryId+'&productId=' + value.ProductId + '">';
html += '<span class="my_collectBox_name">' + value.ProductName + '</span>';
html += '</a>';
html += '<a href="javascript:;" class="my_collectBox_cancel" fid="' + value.ProductId + '">取消收藏</a>';
html += '</div>';
// html += '</a>'
html += '</div>';
});
}
$('.my_info_con.clearfix').html(html);
$('.my_collectBox_cancel').on("click", function () {
var productId = $(this).attr('fid');
$.post("api.php?act=productCollect", {
productId: productId,
status: 1
}, function (data) {
loadProductCollect();
});
});
});
}
</script>
</body>
</html>
1
https://gitee.com/xuqipeter/pdw.git
git@gitee.com:xuqipeter/pdw.git
xuqipeter
pdw
品贷网
master

搜索帮助