11 2017 档案

vue prod 环境 怎么去掉#!
摘要:众所周知,vue-router有两种模式,hash模式和history模式。 hash模式 hash模式背后的原理是onhashchange事件,可以在window对象上监听这个事件: window.onhashchange = function(event){ console.log(event. 阅读全文

posted @ 2017-11-27 10:36 漫路 阅读(3245) 评论(0) 推荐(0)

解决ajax 发送post 请求时csrf_token 问题
摘要:1, 前端 ajax 解决 $.ajax({ data: {csrfmiddlewaretoken: '{{ csrf_token }}' }, }) 2, 后端代码解决 view.py 2.1 文档来源 阅读全文

posted @ 2017-11-07 17:24 漫路 阅读(3355) 评论(0) 推荐(1)