
//弹出层进行回复
function pop_post(){
var contents = $(".replayBox textarea").last().val(); //会出现两个元素,只能用最后一个
contents = contents.replace(new RegExp('\n',"g"),'<br>');
contents = contents.replace(new RegExp(' ',"g"),' ');
if(contents.replace(/\[(face\d+)\]/g,"")==""){
layer.alert('不允许只发表情!');
return false;
}
layer.closeAll();
if(contents==''){
layer.alert('评论内容不能为空!');
return false;
}
//layer.alert('id:' +pid);
//layer.alert('xinxi:' +contents);
haveSendMsg = true;
$.post("{:auto_url('wxapp.post/edit')}?id",{id:pid,huifuneiorng:contents}).success(function (res) {
haveSendMsg = false;
if(res.code==0){
layer.closeAll(); //关闭所有层
layer.msg('消息发送成功!');
$(".replayBox textarea").val('');
}else{
layer.alert(res.msg);
}
}).fail(function () {
layer.open({title: '提示',content: '服务器发生错误'});
layer.alert('id:' +id);
});
}数据库里我建了回复内容
在表qb_guestbook_content1 新增了一个字段huifuneirong
用layer弹出触发修改留言的id,实际上就是增加一个huifuneirong的内容,现在不知道怎么写了
点击修改,没反应,不知道要改哪个方法了

大家帮忙看下,怎么做留言,这个基本功能好像被大家忘记了
大家帮忙看下,多谢了!
有没有好的思路啊
点击修改的action在哪里修改,改了半天都没反应,现在改的眼都绿了
function reply_topic(id) {
pid = id;
if(check_jump_login()!=true) return ;
layer.open({
type: 1,
title:'给TA回复',
area: ['600px','550px'], //宽高,高参数忽略
content: $(".div-replayBox").html(),
});
}
<!--弹层回复表单-->
<div style="display:none;" class="div-replayBox">
<!-- <form name="form2" method="post" action="{:auto_url('wxapp.post/add')}" class="ajax-post2"> -->
<ul class="replayBox" style="text-align:center;">
<ol><textarea onkeydown="keySend(event);" style="width:560px;height:400px;margin:10px;" placeholder="请输入回复内容"></textarea></ol>
<li style="text-align:left;padding-left:18px;margin-bottom:10px;">
表情:{for start="1" end="13"}
<em onclick="choose_face(this,'[face{$i}]')"><img src="__STATIC__/images/qqface/{$i}.gif" width="20" height="20"></em>
{/for}
</li>
<li><button onclick="layer.closeAll();" style="padding:10px;">取消</button> <button style="margin-left:50px;padding:10px;" onclick="pop_post();">确定提交</button></li>
</ul>
<!-- </form> -->
</div> {if ($this->admin)}<A HREF='javascript:;' onclick="reply_topic({$rs.id})" class='replay' title='回复'>回复</A>{/if}点击回复的代码