202 lines
11 KiB
JavaScript
202 lines
11 KiB
JavaScript
$(function(){
|
||
$('.ty_left li').on('click',function(){//左侧导航的点击事件
|
||
$('.ty_left li').removeClass('ty_lititnoe')
|
||
$('.ty_left li').addClass('ty_litittwo')
|
||
$('.ty_left li span').removeClass('left-title')
|
||
$(this).removeClass('ty_litittwo')
|
||
$(this).addClass('ty_lititnoe')
|
||
$(this).find('span').addClass('left-title')
|
||
})
|
||
yisList()
|
||
zhazList()
|
||
tjList()
|
||
})
|
||
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 tjList(){//推荐作品
|
||
var tjHtml = '';
|
||
var tjData = [
|
||
{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(tjData, function(commentIndex, comment) {
|
||
tjHtml +=`<tr class="tc">
|
||
<td>
|
||
<div>
|
||
<input type="checkbox" name="" id="" value="" />
|
||
</div>
|
||
</td>
|
||
<td class="p-sx20" valign="top" style="display: flex;justify-content: center;">
|
||
<div style="width: 65px;height: 63px;" class="bd">
|
||
<img height="100%" src="${comment.imgSrc}" >
|
||
</div>
|
||
</td>
|
||
<td class="p-sx20" style="color: #525252;" valign="top">
|
||
<div class="tl linh24 col19 clips2">${comment.title}</div>
|
||
</td>
|
||
<td class="p-sx20" valign="top">
|
||
<div>${comment.time}</div>
|
||
</td>
|
||
<td class="p-sx20" style="color: #525252;" valign="top">
|
||
<div class="colcb">${comment.status}</div>
|
||
</td>
|
||
<td class="p-sx10" valign="top">
|
||
<div style="display: flex;align-items: center;">
|
||
<input style="width: 130px;height: 30px;" type="" name="" id="" value="" />
|
||
<button class="cq-cp" type="button" style="color: #00a608;border: 1px solid #00a608;width: 62px;height: 34px;line-height: 34px;border-radius: 3px;background: #FFFFFF;margin: 0 10px;">编辑</button>
|
||
<button class="cq-cp" type="button" style="color: #066ee2;border: 1px solid #066ee2;width: 62px;height: 34px;line-height: 34px;border-radius: 3px;background: #FFFFFF;" >删除</button>
|
||
</div>
|
||
</td>
|
||
</tr>`
|
||
});
|
||
$('#tj-list').prepend(tjHtml);
|
||
}
|
||
function yisList(){//艺术访谈
|
||
var yisHtml = '';
|
||
var yisData = [
|
||
{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(yisData, function(commentIndex, comment) {
|
||
yisHtml +=`<tr class="tc">
|
||
<td>
|
||
<div>
|
||
<input type="checkbox" name="" id="" value="" />
|
||
</div>
|
||
</td>
|
||
<td class="p-sx20" valign="top" style="display: flex;justify-content: center;">
|
||
<div style="width: 65px;height: 63px;" class="bd">
|
||
<img height="100%" src="${comment.imgSrc}" >
|
||
</div>
|
||
</td>
|
||
<td class="p-sx20" style="color: #525252;" valign="top">
|
||
<div class="tl linh24 col19 clips2">${comment.title}</div>
|
||
</td>
|
||
<td class="p-sx20" valign="top">
|
||
<div>${comment.time}</div>
|
||
</td>
|
||
<td class="p-sx20" style="color: #525252;" valign="top">
|
||
<div class="colcb">${comment.status}</div>
|
||
</td>
|
||
<td class="p-sx10" valign="top">
|
||
<div style="display: flex;align-items: center;">
|
||
<input style="width: 130px;height: 30px;" type="" name="" id="" value="" />
|
||
<button class="cq-cp" type="button" style="color: #00a608;border: 1px solid #00a608;width: 62px;height: 34px;line-height: 34px;border-radius: 3px;background: #FFFFFF;margin: 0 10px;">编辑</button>
|
||
<button class="cq-cp" type="button" style="color: #066ee2;border: 1px solid #066ee2;width: 62px;height: 34px;line-height: 34px;border-radius: 3px;background: #FFFFFF;" >删除</button>
|
||
</div>
|
||
</td>
|
||
</tr>`
|
||
});
|
||
$('#yis-list').prepend(yisHtml);
|
||
}
|
||
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 +=`<tr class="tc">
|
||
<td>
|
||
<div>
|
||
<input type="checkbox" name="" id="" value="" />
|
||
</div>
|
||
</td>
|
||
<td class="p-sx20" valign="top" style="display: flex;justify-content: center;">
|
||
<div style="width: 65px;height: 63px;" class="bd">
|
||
<img height="100%" src="${comment.imgSrc}" >
|
||
</div>
|
||
</td>
|
||
<td class="p-sx20" style="color: #525252;" valign="top">
|
||
<div class="tl linh24 col19 clips2">${comment.title}</div>
|
||
</td>
|
||
<td class="p-sx20" valign="top">
|
||
<div>${comment.time}</div>
|
||
</td>
|
||
<td class="p-sx20" style="color: #525252;" valign="top">
|
||
<div class="colcb">${comment.status}</div>
|
||
</td>
|
||
<td class="p-sx10" valign="top">
|
||
<div style="display: flex;align-items: center;">
|
||
<input style="width: 130px;height: 30px;" type="" name="" id="" value="" />
|
||
<button class="cq-cp" type="button" style="color: #00a608;border: 1px solid #00a608;width: 62px;height: 34px;line-height: 34px;border-radius: 3px;background: #FFFFFF;margin: 0 10px;">编辑</button>
|
||
<button class="cq-cp" type="button" style="color: #066ee2;border: 1px solid #066ee2;width: 62px;height: 34px;line-height: 34px;border-radius: 3px;background: #FFFFFF;" >删除</button>
|
||
</div>
|
||
</td>
|
||
</tr>`
|
||
});
|
||
$('#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')//书刊杂志
|
||
} |