diff --git a/Application/Admin/Controller/ArticleController.class.php b/Application/Admin/Controller/ArticleController.class.php index db410f4bf..234d9497e 100644 --- a/Application/Admin/Controller/ArticleController.class.php +++ b/Application/Admin/Controller/ArticleController.class.php @@ -965,8 +965,12 @@ class ArticleController extends AdminController { $file_name = $savePath.$name; $error=$upfile["error"];//上传后系统返回的值 $data['document_route'] = 'Documents/'.$name; - M('document_pop_rules')->where(['id' => $id])->save($data); - $backData['tmp'] = $file_name; + $updateres = M('document_pop_rules')->where(['id' => $id])->save($data); + if ($updateres) { + $backData['code'] = 10000; + }else { + $backData['code'] = 10001; + } $this->ajaxReturn(json_encode($backData,TRUE)); } } diff --git a/Application/Admin/View/Article/pop_rule_edit.html b/Application/Admin/View/Article/pop_rule_edit.html index 77aeab21d..f7120294f 100644 --- a/Application/Admin/View/Article/pop_rule_edit.html +++ b/Application/Admin/View/Article/pop_rule_edit.html @@ -27,7 +27,8 @@ - +
+