huaxia/js/artistCenter/artistCenter.js

133 lines
5.3 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

$(function(){
$('.ty_left a').on('click',function(){//左侧导航的点击事件
$('.ty_left a li').removeClass('ty_lititnoe')
$('.ty_left a li').addClass('ty_litittwo')
// $('.ty_left li span').removeClass('left-title')
$(this).find('li').removeClass('ty_litittwo')
$(this).find('li').addClass('ty_lititnoe')
// $(this).find('span').addClass('left-title')
var leftIndex = $(this).index()
console.log(leftIndex);
clearAll()
switch (leftIndex){
case 2://个人资料
console.log($(this).find('span').text());
$('#personal').css('display','')
break;
case 3://密码修改
console.log($(this).find('span').text());
$('#updatePass').css('display','')
break;
case 4://我的订单
console.log($(this).find('span').text());
$('#myOrder').css('display','')
break;
case 5://我的关注
console.log($(this).find('span').text());
$('#myAttention').css('display','')
break;
case 6://我的收藏
console.log($(this).find('span').text());
$('#myCollection').css('display','')
break;
case 7://我的积分
console.log($(this).find('span').text());
$('#myIntegral').css('display','')
break;
case 8://我的优惠券
console.log($(this).find('span').text());
$('#myCoupon').css('display','')
break;
case 9://我的征稿作品管理
console.log($(this).find('span').text());
$('#myZG').css('display','')
break;
case 10://收货地址
console.log($(this).find('span').text());
$('#mySH').css('display','')
break;
case 11://推荐商品
console.log($(this).find('span').text());
$('#myTJ').css('display','')
break;
case 12://艺术访谈
console.log($(this).find('span').text());
$('#myFW').css('display','')
break;
case 13://书刊杂志
console.log($(this).find('span').text());
$('#mySK').css('display','')
break;
}
})
})
function addCont(e){
clearAll()
$('#addContent').css('display','')
if(e==1) {
$('#addContent .tjzp').removeClass('dn')
$('#addContent .ty_tit').text('推荐作品')//推荐作品
}
if(e==2) {
$('#addContent .ysft').addClass('dn')
$('#addContent .ty_tit').text('添加内容')//艺术访谈
}
if(e==3) {
$('#addContent .ysft').addClass('dn')
$('#addContent .zhaz').removeClass('dn')
$('#addContent .ty_tit').text('添加内容')//书刊杂志
}
}
function selectAllT(){//推荐作品全选,全不选事件
var isCheck = $('.chooseAllT').is(':checked')
$("#myTJ input[type='checkbox']").each(function(){
this.checked = isCheck
})
}
function selectAllF(){//艺术访谈全选,全不选事件
var isCheck = $('.chooseAllF').is(':checked')
$("#myFW input[type='checkbox']").each(function(){
this.checked = isCheck
})
}
function selectAll(){//书刊全选,全不选事件
var isCheck = $('.chooseAll').is(':checked')
$("#mySK input[type='checkbox']").each(function(){
this.checked = isCheck
})
}
function zhazList(){//书刊杂志
var zhazHtml = '';
var zhazData = [
{imgSrc:'../../img/grzx/zgimg.png',title:'雅尊Yazun现代轻奢艺术镂空装饰品 摆设工艺品 B款',time:'2019-12-20',status:'未审核'},
{imgSrc:'../../img/grzx/zgimg.png',title:'雅尊Yazun现代轻奢艺术镂空装饰品 摆设工艺品 B款',time:'2019-12-20',status:'未审核'},
{imgSrc:'../../img/grzx/zgimg.png',title:'雅尊Yazun现代轻奢艺术镂空装饰品 摆设工艺品 B款',time:'2019-12-20',status:'未审核'},
{imgSrc:'../../img/grzx/zgimg.png',title:'雅尊Yazun现代轻奢艺术镂空装饰品 摆设工艺品 B款',time:'2019-12-20',status:'未审核'},
{imgSrc:'../../img/grzx/zgimg.png',title:'雅尊Yazun现代轻奢艺术镂空装饰品 摆设工艺品 B款',time:'2019-12-20',status:'未审核'},
{imgSrc:'../../img/grzx/zgimg.png',title:'雅尊Yazun现代轻奢艺术镂空装饰品 摆设工艺品 B款',time:'2019-12-20',status:'未审核'},
{imgSrc:'../../img/grzx/zgimg.png',title:'雅尊Yazun现代轻奢艺术镂空装饰品 摆设工艺品 B款',time:'2019-12-20',status:'未审核'},
{imgSrc:'../../img/grzx/zgimg.png',title:'雅尊Yazun现代轻奢艺术镂空装饰品 摆设工艺品 B款',time:'2019-12-20',status:'未审核'},
{imgSrc:'../../img/grzx/zgimg.png',title:'雅尊Yazun现代轻奢艺术镂空装饰品 摆设工艺品 B款',time:'2019-12-20',status:'未审核'},
{imgSrc:'../../img/grzx/zgimg.png',title:'雅尊Yazun现代轻奢艺术镂空装饰品 摆设工艺品 B款',time:'2019-12-20',status:'未审核'},
]
$.each(zhazData, function(commentIndex, comment) {
zhazHtml +=``
});
  $('#zhaz-list').prepend(zhazHtml);
}
function clearAll(){
$('#personal').css('display','none')//个人资料
$('#updatePass').css('display','none')//密码修改
$('#myOrder').css('display','none')//我的订单
$('#myAttention').css('display','none')//我的关注
$('#myCollection').css('display','none')//我的收藏
$('#myIntegral').css('display','none')//我的积分
$('#myCoupon').css('display','none')//我的优惠券
$('#myZG').css('display','none')//我的征稿作品管理
$('#mySH').css('display','none')//收货地址
$('#myTJ').css('display','none')//推荐商品
$('#myFW').css('display','none')//艺术访谈
$('#mySK').css('display','none')//书刊杂志
$('#addContent').css('display','none')//书刊杂志
}