diff --git a/README.md b/README.md
index 1c13340..c8874a0 100644
--- a/README.md
+++ b/README.md
@@ -1,26 +1,27 @@
# jsmindmulti
+jsmind多人协作版
+
#### 介绍
-```
-多人协作脑图,站在巨人的肩膀上:前台是赫赫有名的开源的jsmind(可自己改源码,扩展性强);
-适合只能访问内网、或者不想把数据放外网的公司(现在很多互联网免费的协作脑图产品)
-
-多人协作思维导图主要采用python django框架,如果不熟悉的需要先学下;
-快速入门视频推荐:https://www.bilibili.com/video/BV1JW411i7W1?spm_id_from=333.999.0.0
-
-选择python是因为感觉用django开发一个简单网页会比java更快,但是这里我要吐槽一下python里用缩进区分语句块,稍不注意代码就乱了(感觉还是大括号好)
-
-```
++ 多人协作脑图,站在巨人的肩膀上:前台是赫赫有名的开源的jsmind(可自己改源码,扩展性强),做了小小的改动;
++ 适合只能访问内网、或者不想把数据放外网的公司(现在很多互联网免费的协作脑图产品)
++ 多人协作思维导图主要采用python django框架,如果不熟悉的需要先补一下;
++ 快速入门视频推荐:https://www.bilibili.com/video/BV1JW411i7W1?spm_id_from=333.999.0.0
++ 选择python是因为感觉用django开发一个简单网页会比java更快,但是这里我要吐槽一下python里用缩进区分语句块,稍不注意代码就乱了(感觉还是大括号好)
#### 软件架构
+
+

+
+
#### 安装教程
+ 安装依赖
- - 安装python,我本地是Python 3.7.8rc1,版本比这个大就应该可以
+ - 安装python,我本地是Python 3.7.8rc1,版本比这个大就应该可以
- 安装依赖,在工程根目录执行 pip install -r reuqirements.txt 将项目的依赖安装到python目录(类似java里的maven),如果相关把依赖安装到其他目录进行分类管理可以采用virtualenvwrapper
+ 数据库
@@ -36,3 +37,7 @@ python manage.py makemigrations
python manage.py migrate
```
+
+#### 效果
+
+
\ No newline at end of file
diff --git a/server/views.py b/server/views.py
index bcc4acf..c9d28cf 100644
--- a/server/views.py
+++ b/server/views.py
@@ -59,10 +59,10 @@ class JsMindView(ListAPIView):
mind.save()
return build_response(data=mind.id)
- def delete(self, request, pk):
+ def delete(self, request):
# 删除
- pk = request.GET.get('id')
- CooperationMind.objects.filter(id=pk).delete()
+ pk = request.POST.get('id')
+ res = CooperationMind.objects.filter(id=pk).delete()
return build_response()
diff --git a/static/html/list.html b/static/html/list.html
index a9811fb..ef3373a 100644
--- a/static/html/list.html
+++ b/static/html/list.html
@@ -72,7 +72,7 @@
编辑
复制分享
- 删除
+ 删除
|
`
$('#layui-table tbody').append(tr)
@@ -131,12 +131,26 @@
return null;
}
}
+ },
+ // 删除
+ del_mind: function (id) {
+ const me = this
+ $.ajax({
+ url: 'delete',
+ type: 'DELETE',
+ data: {'id': id},
+ success: function (result) {
+ layer.closeAll()
+ me.fetch_data()
+ }
+ });
}
}
+ let view
$(function () {
// 初始化对象
- const view = new listView({'page_bar_elem': 'page_bar'})
+ view = new listView({'page_bar_elem': 'page_bar'})
view.init()
view.fetch_data()
@@ -233,6 +247,10 @@
//
})
+
+ function delmind(id) {
+ view.del_mind(id)
+ }
diff --git a/z-pic/show.gif b/z-pic/show.gif
new file mode 100644
index 0000000..41875b4
Binary files /dev/null and b/z-pic/show.gif differ