Commit 06e5a750dcc6e5b7e8514872560a67a6e1a503c2

Authored by pengye
1 parent 060bbab2

no message

@@ -35,8 +35,8 @@ class Comment extends Common @@ -35,8 +35,8 @@ class Comment extends Common
35 $data['status'] = 1; 35 $data['status'] = 1;
36 36
37 $succ = httpRequest(ON_LINE.'App.User.SetComment', 'post', $data); 37 $succ = httpRequest(ON_LINE.'App.User.SetComment', 'post', $data);
38 - return $data;  
39 - return $result = ['code'=>1,'msg'=>'评论成功!','data'=>1,'rel'=>1];# 38 + #return $data;
  39 + return $result = ['code'=>1,'msg'=>'评论成功!','data'=>$data,'rel'=>1];#
40 } 40 }
41 return $this->fetch(); 41 return $this->fetch();
42 } 42 }
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 </div> 32 </div>
33 <div class="layui-form-item"> 33 <div class="layui-form-item">
34 <label class="layui-form-label">图片/视频</label> 34 <label class="layui-form-label">图片/视频</label>
35 - <input type="hidden" name="enclosure[]['key']" id="pic" value=''> 35 + <input type="hidden" name="enclosure[][key]" id="pic" value=''>
36 <div class="layui-input-block"> 36 <div class="layui-input-block">
37 <div class="layui-upload"> 37 <div class="layui-upload">
38 <button type="button" class="layui-btn layui-btn-primary" id="adBtn"><i class="icon icon-upload3"></i>点击上传</button> 38 <button type="button" class="layui-btn layui-btn-primary" id="adBtn"><i class="icon icon-upload3"></i>点击上传</button>
@@ -148,14 +148,14 @@ @@ -148,14 +148,14 @@
148 $.post("{:url('Comment/addcommit')}", data.field, function (res) { 148 $.post("{:url('Comment/addcommit')}", data.field, function (res) {
149 layer.close(loading); 149 layer.close(loading);
150 alert(JSON.stringify(res)); 150 alert(JSON.stringify(res));
151 - /*if (res.code == 1) { 151 + if (res.code == 1) {
152 layer.msg(res.msg, {time: 1000, icon: 1}, function () { 152 layer.msg(res.msg, {time: 1000, icon: 1}, function () {
153 location.href = "{:url('CommentList')}"; 153 location.href = "{:url('CommentList')}";
154 }); 154 });
155 } else { 155 } else {
156 alert(res.msg); 156 alert(res.msg);
157 layer.msg(res.msg, {time: 1000, icon: 2}); 157 layer.msg(res.msg, {time: 1000, icon: 2});
158 - }*/ 158 + }
159 }); 159 });
160 }) 160 })
161 }); 161 });