Delete node
public static deleteNode ( $nodeId ) : boolean | ||
$nodeId | ||
Résultat | boolean |
/** * @JSON */ public function delete() { $result = array('error' => -1, 'message' => '删除失败'); if ($_POST['node_id'] != null) { if (NodeModel::deleteNode($_POST['node_id']) > 0) { $result = array('error' => 0, 'message' => '删除成功'); } } return $result; }
public function delete() { $result = array('error' => -1, 'message' => '删除失败'); if (isset($_POST['id']) || $_POST['id'] != null) { if (NodeModel::deleteNode($_POST['id']) > 0) { $result = array('error' => 0, 'message' => '删除成功'); } } echo json_encode($result); exit; }