封装: 目录结构:src/utils/request.js, 没有就自己建一个 //src/utils/request.jsimport axios from 'axios' import { MessageBox, Message } from 'element-ui' import store from '@/store' import { getToken } from '@/utils/auth' // create an axios instance const service = a
[ionic开源项目教程] 第14讲 使用jsonp解决跨域问题 相信很多朋友在开发中都会遇到以下这个问题. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access. [效果图] 之前开发中都是用google的插件Access-Control-Allow-Origin来实现