代码语言:javascript复制
axios.post('signToken', {
"NickName": "xxxx",
"Password": "xxxx",
"RequestSign": "B858C5EEE7FD4D37C635FB55841ACA59"
}).then(res => {
axios.defaults.headers.common['Authorization'] = res.headers.authorization
//实例化Vue
new Vue({
el: '#app',
router,
components: {
App
},
template: '<App/>'
})
})
f获取完token再赋值,异步变为同步