|
@@ -319,7 +319,21 @@
|
|
|
function addProject(){
|
|
|
layer.prompt({title: '请输入工程名称', formType: 3}, function(text, index){
|
|
|
layer.close(index);
|
|
|
- layer.msg('添加成功'+text, {icon: 1});
|
|
|
+ $.ajax({
|
|
|
+ type: "post",
|
|
|
+ url: "#",
|
|
|
+ data:{name:text},
|
|
|
+ dataType: "json",
|
|
|
+ success: function(data){
|
|
|
+ if(data.result!=null){
|
|
|
+ layer.msg(data.result, {icon: 1});
|
|
|
+ window.location.reload();
|
|
|
+ }else{
|
|
|
+ layer.msg('添加失败', {icon: 1});
|
|
|
+ },
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
</script>
|