12 2018 档案
摘要://设置默认全局baseURL axios.defaults.baseURL=process.env.BASE_API; //设置默认全局携带浏览器cookie axios.defaults.withCredentials=true; Vue.prototype.$http = axios;
阅读全文
摘要:proxyTable: { '/zabbix_api': { target: 'http://10.88.22.8',//设置你调用的接口域名和端口号 别忘了加http changeOrigin: true, pathRewrite: { '^/zabbix_api/': '/zabbix_api/', ...
阅读全文
摘要:// The Vue build version to load with the `import` command // (runtime-only or standalone) has been set in webpack.base.conf with an alias. //main.js在渲染的时候会被webpack引入变成app.js文件 app.js文件在index.html中会被...
阅读全文
摘要:关于每次点击链接都要刷新页面的问题众所周知,开发单页应用就是因为那丝般顺滑的体验效果,如果每次点击都会刷新页面… 出现这个的原因是因为使用了window.location来跳转,只需要使用使用router提供的方法,就能够解决这个问题: 在main.js中配置中将router绑定到全局 Vue.pr
阅读全文
摘要:var token = localStorage.getItem("token"); $.ajaxSetup({ dataType: "json", cache: false, headers: { "token": token }, xhrFields: { withCredentials: true }, complet...
阅读全文
摘要:Django中使用ajax post向後臺傳送資料時403 Forbidden (CSRF token missing or incorrect.):的解決辦法 在Django中使用ajax post向後臺傳送資料時會出現403 Forbidden (CSRF token missing or incorrect.): 的報錯。 第一種解決方法: 先看一下ajax的使用方法: $.a...
阅读全文
摘要:var t = $('#passwdHOST').DataTable({ 'searching': true, 'ordering': false, 'autoWidth': false, dom: 'Bfrtip', buttons: [{ text: "导出到Execl", extend: 'excelHtml5', ...
阅读全文

浙公网安备 33010602011771号