why.xingtongworld.com项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

117 lines
4.5 KiB

{layout name="user/userlayout" /}
{foreach name="lists" item="vo"}
<div class="informslist {if condition='$vo.is_read eq 0'}not_read_email{/if}" data-id="{$vo.notice_id}" style="cursor: pointer">
<div class="modeub modeac">
<div class="emailicon logobackimg {if condition='$vo.is_read eq 1'}emailiconactive{/if}"></div>
<div class="modef1 informslisttitle">{$vo.notice_title}</div>
<div class="informslistime">{$vo.create_time|date='Y·m·d',###}</div>
</div>
<div class="modeub statustop ">
<div class="iconfont icon-jiantou2 butg modeub modepc"></div>
<div class="modef1 iconstatus"></div>
</div>
</div>
<div class="emaildes" style="display: none;margin-bottom: 30px;">
{$vo.notice}
</div>
{/foreach}
<div class="list-page" align="center">{$page}</div>
<script src="__PUBLIC__/jqprint/jquery.jqprint-0.3.js"></script>
<script src="__PUBLIC__/jqprint/jspdf.debug.js"></script>
<script src="__PUBLIC__/jqprint/html2canvas.js"></script>
<script type="text/javascript">
$(".downPDF").css({
'background-image':'url(/public/img/stamp.png)',
'background-position-x':'-320px',
'background-position-y':'250px',
'background-color':'#fff',
'padding':'20px',
'background-repeat':'no-repeat'
});
var userAgent = navigator.userAgent;
//判断是否Firefox浏览器
if (userAgent.indexOf("Firefox") > -1) {
$(".pb_temp .pb_areaname span").css({"margin-top":"-45px","padding-right":"60px"});
$(".pb_temp .pb_code").css({"margin-top":"-8px"});
$(".pb_temp .pb_code span").css({"margin-left":"48%"});
$(".pb_temp .pb_name").css({"margin-top":"-3px"});
$(".pb_temp .pb_name span").css({"margin-left":"36%"});
$(".downPDF_btn").css("cursor","pointer");
}else{
$(".pb_temp .pb_areaname span").css({"margin-top":"-30px","padding-right":"60px"});
$(".pb_temp .pb_code").css({"margin-top":"-8px"});
$(".pb_temp .pb_code span").css({"margin-left":"48%"});
$(".pb_temp .pb_name").css({"margin-top":"0px"});
$(".pb_temp .pb_name span").css({"margin-left":"36%"});
$(".downPDF_btn").css("cursor","pointer");
}
$(function(){
$(".downPDF_btn").on("click",function(){
var obj = $(this).prev()[0];
var pdfname = $(this).parent(".emaildes").prev().find(".informslisttitle").text();
html2canvas(obj,{
onrendered: function(canvas) {
//通过html2canvas将html渲染成canvas,然后获取图片数据
var imgData = canvas.toDataURL('image/jpeg');
//初始化pdf,设置相应格式
var doc = new jsPDF("p", "mm", "a4");
//这里设置的是a4纸张尺寸
doc.addImage(imgData, 'JPEG', 0, 0,(canvas.width/4), (canvas.height/4));
//输出保存命名为content的pdf
doc.save(pdfname+'.pdf');
}
});
});
$(".informslist").click(function(){
$(this).find(".emailicon").addClass("emailiconactive");
$(this).next(".emaildes").slideToggle(300);
$(this).find(".iconfont").toggleClass("icon-jiantou2 icon-jiantou2-copy")
if($(this).attr("class").indexOf("not_read_email")>0){
$.ajax({
type: "POST",
url: '{:url(\'home/Center/notice_r\')}',
data: {"notice_id":$(this).attr("data-id")},
async: false,
success: function (data) {
}
})
}
})
});
function to_tgdeit(tg_id){
$.ajax({type:"POST",
url:'{:url(\'home/Listn/tg_upcheck\')}',
data:{"tg_id":tg_id},
async: false,
success:function (data) {
if (data.code == 1) {
window.location.href = data.url;
}else{
layer.alert(data.msg, {icon: 5}, function (index) {
layer.close(index);
});
}
}
})
}
function to_edit(id){
$.ajax({type:"POST",
url:'{:url(\'home/Listn/org_upcheck\')}',
data:{"id":id},
async: false,
success:function (data) {
if (data.code == 1) {
window.location.href = data.url;
}else{
layer.alert(data.msg, {icon: 5}, function (index) {
layer.close(index);
});
}
}
})
}
</script>