Commit 5ad64035c20f224835899294217bc69902dd8755

Authored by pengye
1 parent b9ddfc9d

no message

@@ -46,7 +46,6 @@ class Comment extends Common @@ -46,7 +46,6 @@ class Comment extends Common
46 $data['soucre'] = 'pc'; 46 $data['soucre'] = 'pc';
47 47
48 $data['author_openid'] = 'oB-xJ5DIWrC6MECaXfql2GvTmQTU';#红旗 48 $data['author_openid'] = 'oB-xJ5DIWrC6MECaXfql2GvTmQTU';#红旗
49 - return $result = ['code'=>1,'msg'=>'评论成功!','data'=>$data,'rel'=>1];#  
50 $succ = httpRequest(ON_LINE.'App.User.SetComment', 'post', $data); 49 $succ = httpRequest(ON_LINE.'App.User.SetComment', 'post', $data);
51 #return $result = ['code'=>0,'msg'=>'评论失败!','data'=>$data,'fail'=>$succ];# 50 #return $result = ['code'=>0,'msg'=>'评论失败!','data'=>$data,'fail'=>$succ];#
52 $succ = json_decode($succ,true); 51 $succ = json_decode($succ,true);
@@ -224,29 +224,17 @@ @@ -224,29 +224,17 @@
224 224
225 //根据菜品ID 修改对应菜品的GIF、视频url 225 //根据菜品ID 修改对应菜品的GIF、视频url
226 form.on('submit(submit)', function (data) { 226 form.on('submit(submit)', function (data) {
227 - for (i=0; i<=5;i++) {  
228 - var isExits_pic = $("#pic"+i).val();  
229 - var isExits_url = $("#url"+i).val();  
230 - if(isExits_pic==""){  
231 - $("#pic"+i).remove();  
232 - }  
233 -  
234 - if(isExits_url==""){  
235 - $("#url"+i).remove();  
236 - }  
237 - }  
238 //校验 227 //校验
239 var loading = layer.load(1, {shade: [0.1, '#fff']}); 228 var loading = layer.load(1, {shade: [0.1, '#fff']});
240 $.post("{:url('Comment/addcommit')}", data.field, function (res) { 229 $.post("{:url('Comment/addcommit')}", data.field, function (res) {
241 layer.close(loading); 230 layer.close(loading);
242 -  
243 - alert(JSON.stringify(res));  
244 - /*if (res.code == 1) { 231 + //alert(JSON.stringify(res));
  232 + if(res.code == 1) {
245 layer.msg(res.msg, {time: 1000, icon: 1}); 233 layer.msg(res.msg, {time: 1000, icon: 1});
246 } else { 234 } else {
247 alert(res.msg); 235 alert(res.msg);
248 layer.msg(res.msg, {time: 1000, icon: 2}); 236 layer.msg(res.msg, {time: 1000, icon: 2});
249 - }*/ 237 + }
250 }); 238 });
251 }) 239 })
252 }); 240 });