import {layuiObj} from './index.js'; let notifyDetailIndex=null; function notifyDetailList(notifyDetail){ if(notifyDetailIndex==null){ notifyDetailIndex=layuiObj["layer"].open({ type: 1, title: false, //不显示标题栏 closeBtn: false, area: ['580px', 'auto'], shade: 0, id: new Date().getTime(), //设定一个id,防止重复弹出 move:'.layui-move', moveType: 1, //拖拽模式,0或者1 content:`
通知详情

通知标题: ${notifyDetail["title"]}

通知内容: ${notifyDetail["content"]}

下发时间: ${notifyDetail["timestamp"]}

接受者: ${notifyDetail["showname"]}

查看时间 ${notifyDetail["readtime"]}

消息状态: ${notifyDetail['img']}

发送者 ${notifyDetail['sender']}

` }) }else{ closeNotifyIndex() taskDetailList(); } //关闭 $(".taskDetailTitle>img").click(function(){ closeNotifyIndex() }) } function closeNotifyIndex(){ layuiObj["layer"].close(notifyDetailIndex); notifyDetailIndex=null; } export {notifyDetailList}