Browse Source

消息请求处理

yangc 6 years ago
parent
commit
75300eca9d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      store/messageShow.js

+ 2 - 1
store/messageShow.js

@@ -1,4 +1,5 @@
 import axios from '~plugins/axios'
+import config from '../nuxt.config'
 
 export const actions = {
   // 获取未读消息数量
@@ -14,7 +15,7 @@ export const actions = {
   // 获取全部消息
   getAllMessage({ commit }, params = {}) {
     commit('messageList/REQUEST_MESSAGE_LIST')
-    return axios.get(`${process.env.MESSAGE_URL}/messages`, {params})
+    return axios.get(`${config.env.messageUrl}/messages`, {params})
       .then(response => {
         commit('messageList/GET_MESSAGE_LIST_SUCCESS', response.data)
       }, err => {