diff --git a/server/views/mind_map.py b/server/views/mind_map.py index d08eba7..b18562e 100644 --- a/server/views/mind_map.py +++ b/server/views/mind_map.py @@ -34,6 +34,8 @@ class JsMindView(LoginRequiredJSONMixin, ListAPIView): if pk is not None: # 查询导图详细 查看用户是否有权限(创建者) mind = CooperationMind.objects.filter(id=pk, creator_user_id=user.id).first() + if mind is None: + return build_response(code=CODE_FAILED, msg="无权限") # 序列化 serializer = CooperationMindSerializer(mind) return build_response(data=serializer.data) diff --git a/static/html/dashboard.html b/static/html/dashboard.html index efa401e..0e3ba26 100644 --- a/static/html/dashboard.html +++ b/static/html/dashboard.html @@ -31,7 +31,9 @@ // 未登录 if (!uid || isNaN(uid)) { $('#login_register').show() - $('#login_register').click() + setTimeout(function () { + $('#login_register').click() + }, 500) $('#logout_a').hide() $('#newMindModal_btn').hide() } else { @@ -217,7 +219,9 @@ }); $('#exampleModal').on('hidden.bs.modal', function (event) { // console.log('关闭'); - me.websocket.close() + if (me.websocket) { + me.websocket.close() + } }); /**点击 扫码登录 */ diff --git a/static/html/detail.html b/static/html/detail.html index 2f2b712..c2636ad 100644 --- a/static/html/detail.html +++ b/static/html/detail.html @@ -5,6 +5,7 @@ Jsmind +