token+按接口参数顺序(参数值拼接base64)-> MD5)
请教于“喵咪”,再此特别鸣谢!~
特别强调:import qs from qs; 这个内部方法一定要用哦。参数签名+base64+md5都成功的情况华。接口还是爆500,就是和这个有关系啦。
我也是第一次用vue的axios大家可以多交流哦,加我qq,给我更好的建议吧
/*main.js*/
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import $ from 'jquery'
import qs from 'qs' //相当于JSON.stringify(),跨域?
import axiosServer from './assets/axiosFilter/axiosFilter'
import './assets/mui/css/mui.min.css'
import mui from './assets/mui/js/mui.min.js'
Vue.prototype.mui=mui;
Vue.prototype.$qs=qs;
Vue.prototype.$http = axiosServer;
Vue.config.productionTip = false;
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
components: { App },
template: '<App/>'
})