分享
  • 收藏
  • 举报
    X
    怎么做留言,我自己改不成功,现在怎么办?好心人帮看下,谢谢!
    • 崔国瑞专业做网站18169787839 消费552.09元 2018-12-03 18:18 18:18
    1015
    8
    //弹出层进行回复
    function pop_post(){
    	
    	var contents = $(".replayBox textarea").last().val();	//会出现两个元素,只能用最后一个
    	contents = contents.replace(new RegExp('\n',"g"),'<br>');
    	contents = contents.replace(new RegExp(' ',"g"),'&nbsp;');
    	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的内容,现在不知道怎么写了

    点击修改,没反应,不知道要改哪个方法了


    8
    赏礼
    赏钱
    收藏
    点击回复
        全部留言
    • 8
    • 菜鸟先飞 普通粉丝 消费:0元 2018-12-19 16:28 16:286楼

      一点一点的修改.一点一点的调试吧.

    0 赏钱 赏礼回复
    • 中心 黑名单 消费:0元 2018-12-19 16:26 16:266楼

      因为你不是专业的,哈哈,还说专业做网站

    0 赏钱 赏礼回复
    0 赏钱 赏礼回复
    0 赏钱 赏礼回复
    0 赏钱 赏礼回复
    • 崔国瑞专业做网站18169787839 普通粉丝 消费:552.09元 2018-12-03 18:22 18:226楼

      点击修改的action在哪里修改,改了半天都没反应,现在改的眼都绿了

    0 赏钱 赏礼回复
    • 崔国瑞专业做网站18169787839 普通粉丝 消费:552.09元 2018-12-03 18:20 18:206楼
      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>


    0 赏钱 赏礼回复
    • 崔国瑞专业做网站18169787839 普通粉丝 消费:552.09元 2018-12-03 18:19 18:196楼
       {if ($this->admin)}<A HREF='javascript:;' onclick="reply_topic({$rs.id})" class='replay' title='回复'>回复</A>{/if}

      点击回复的代码

    0 赏钱 赏礼回复
    更多回复
    恢复多功能编辑器
  • 3 1
  • 推荐内容
    扫一扫访问手机版
    请选择要切换的马甲:

     
    网页即时交流
    QQ咨询
    咨询热线
    020-28998648