class封装返回值 常见的我们返回值都是{"xx": "xx", },其实我们可以优化返回值,通过class封装。 from django.http import JsonResponse class Response(object): def __init__(self): self.statu Read More
前后端不分离模式,如何取到csrftoken 方式1: 导入一下js文件: // 根据cookie的name获取对应的值 function getCookie(name) { let cookieValue = null; if (document.cookie && document.cookie Read More