import axios from 'axios' Vue.prototype.$http = axios;
actions: { // 获取未读消息 GetunderMessage({ commit }, loginToken) { const formData = new FormData(); formData.append('token', loginToken); formData.append('app', '0'); console.log(formData); this.$http.post('http://192.168.16.221:8090/member_api/unreadMessage', formData).then(response => { var res = response.data.data; console.log(res); commit('SET_unreadMessage', res.length); }).catch(error => { console.log(error); }); } }
提示: Cannot read property 'post' of undefined
MMMHUHU