您正在使用的浏览器版本过低,将不能正常浏览请升级最新浏览器或更换浏览器访问
{{# if(d.isNotUse){ }}
{{d.noStr}}
{{# } else if(!d.isNotUse) { }}
{{# if(!d.isError){ }}
{{# if((d.currentTab==0|| d.currentTab==2) && !d.showReplyList ){ }}
{{# if(d.messageList.length>0){ }}
{{# layui.each(d.messageList, function(index, message){ }}
{{ message.messageTypeName }}
{{# if(data.style1 == false && data.style2 == false &&data.style3 == true && message.adminReplyStatus == 1){ }}
{{# } }}
用户:{{ message.createName }}
发表时间:{{ message.createDate }}
{{# if(message.auditStatus == 2){ }}
已驳回
{{# } }}
{{# if(message.replyStatus == 0 && message.auditStatus != 2){ }}
未回复
{{# } }}
{{# if(message.replyStatus == 1 && message.auditStatus != 2){ }}
已回复
{{# } }}
{{ message.messageTitle }}
{{- formatHTMLFunc(message.messageContent)}}
{{# if(d.currentTab == 0){ }}
查看全文
{{# }else{ }}
查看全文
{{# } }}
{{# if(d.currentTab == 2){ }}
删除
{{# } }}
{{# }); }}
{{# } }}
{{# if(d.messageList.length==0){ }}
暂无数据
{{# } }}
{{# } }}
{{# if(d.isPaginator&&!d.showReplyList){ }}
{{# } }}
{{# } }}
{{# } }}
{{# if(d.currentTab==1 &&( (d.setting.allowTourist==='Y' && d.ifToken!== 'tourist')||(d.setting.allowTourist==='N'))){ }}
{{# } }}
{{# if(d.showReplyList&&d.currentTab!=1){ }}
{{ d.currentMsg.messageTypeName }}
用户:{{ d.currentMsg.createName }}
发表时间:{{ d.currentMsg.createDate }}
{{# if(d.currentMsg.auditStatus == 2){ }}
已驳回
{{# } }}
{{# if(d.currentMsg.replyStatus == 0 && d.currentMsg.auditStatus != 2){ }}
未回复
{{# } }}
{{# if(d.currentMsg.replyStatus == 1 && d.currentMsg.auditStatus != 2){ }}
已回复
{{# } }}
{{ d.currentMsg.messageTitle }}
{{- formatHTMLFunc(d.currentMsg.messageContent)}}
{{# layui.each(d.replyList, function(index, item){ }}
{{# if(item.replyStyle == 1){ }}
官方回复
{{# } }}
{{# if(item.replyStyle == 0){ }}
网友留言
{{# } }}
{{item.replyStyle == 1?"管理员账号: ":"用户:"}}{{ item.fromName}}
发表时间:{{ item.createDate }}
{{# if(item.replyStatus == 0){ }}
未回复
{{# } }}
{{# if(item.replyStatus == 1){ }}
已回复
{{# } }}
回复内容
{{- formatHTMLFunc(item.replyContent)}}
{{# if(data.setting.replyTimes == 'ONCE'&& data.replayNumber.length<1){ }}
{{# } }}
{{# if((data.setting.replyTimes == 'ALWAYS')&&(data.currentTab == 2) &&(index== data.replyList.length -1&&item.replyStyle == 1)){ }}
{{# } }}
{{# }); }}
{{# if(d.currentMsg.auditStatus == 2){ }}
官方驳回
{{d.currentMsg.auditStatus == 2?"管理员账号: ":"用户:"}}{{ d.currentMsg.auditName }}
驳回时间:{{ d.currentMsg.auditDate }}
驳回内容
{{- formatHTMLFunc(d.currentMsg.rejectReason)}}
{{# } }}
{{# } }}
{{# if((data.currentTab==1 ||data.currentTab==2) && (data.setting.allowTourist==='Y' && data.ifToken=== 'tourist')){ }}
请先登录
{{# } }}
' +'
' +'
' +(item.required == 'Y' ? '*' : '') +(item.fieldName == "" ? "" : item.fieldName) +'
' + '
' +
'
' +'
';
formContainer.append(str)
});
}
});
// 获取xss正则;
getCheckIsXSS()
function getCheckIsXSS() {
$.ajax({
url: '/aop_component//openapp/system/getXssConfig',
crossDomain: false,
headers:data.queryParams,
type: "post",
dataType: "json",
contentType: "application/json",
success: function (res) {
if (res.code == "0000") {
data.xssRule=res.data
}
},
error: function (response) {
layer.msg(response.msg);
}
})
};
/*xss校验函数,返回值:true 表示存在xss漏洞,false:不存在*/
function checkIsXSS(v) {
return (new RegExp(data.xssRule)).test(v);
};
//回复
function replyclickfun(){
data.replyWindow=!data.replyWindow;
renderTemplate(data);
replyEditorRender();
};
//发送回复内容
function reply() {
if(!replyEditor.$txt.text()){
layer.msg("请输入回复内容",{time:1000});
return false;
}
if(checkIsXSS(replyEditor.$txt.html())){
layer.msg("内容存在异常,请修改",{time:1000});
return false;
}
var base64 = new Base64();
var paramsdata = {};
paramsdata.messageId = data.currentMsg.id;
paramsdata.replyContent = base64.encode(replyEditor.$txt.html());
$.ajax({
url: '/aop_component//webber/messageboard/front/reply',
data: JSON.stringify(paramsdata),
crossDomain:false,
headers:data.queryParams ,
type: "post",
dataType: "json",
contentType: "application/json",
success: function(ret) {
data.isError = 0;
if(ret.code == '0000'){
data.replyWindow = false;
data.replyEditor=replyEditor.$txt.html('
');
viewReply(data.currentMsg.id);
}else{
layer.msg(ret.msg,{time:1000});
}
},
error: function (response) {
if(response.msg){
layer.msg(response.msg,{time:1000});
}else{
data.isError = 1;
data.errMsg = '应用维护中!';
}
}
})
};
//返回
function back(){
data.showReplyList = false;
data.current=data.current
data.replyWindow=false
pageClick();
};
//分页
function handleCurrentChange(){
var left=1;
var right=1;
if(data.all <= 7){
left = 1;
right = data.all;
}else{
if (data.current <= 3) {
left = 1;
right = 7;
} else if (data.current + 3 >= data.all){
left = data.all - 7;
right = data.all;
} else {
left = data.current - 3
right = data.current + 3
}
}
var ar = [];
while (left <= right){
ar.push(left)
left ++
}
return ar
} ;
function btnleft(){
data.current--;
setPage();
};
function btnright(){
data.current++;
setPage();
};
function btnClick(index){
data.current=index;
setPage();
};
window.toggle=toggle;
window.renderTemplate=renderTemplate;
window.selectChange=selectChange;
window.viewReply=viewReply;
window.codeRload=codeRload;
window.allTypeClick=allTypeClick;
window.setPage=setPage;
window.btnleft=btnleft;
window.btnright=btnright;
window.btnClick=btnClick;
window.back=back;
window.replyclickfun=replyclickfun;
window.reply=reply;
window.deleteMessage =deleteMessage;
})
}