diff --git a/client/src/utils/index.js b/client/src/utils/index.js index cfdf23c..5c35ba4 100644 --- a/client/src/utils/index.js +++ b/client/src/utils/index.js @@ -361,7 +361,7 @@ export function genTree(data) { map[item.id] = item }) data.forEach(item => { - const parent = map[item.pid] + const parent = map[item.parent] if (parent) { (parent.children || (parent.children = [])).push(item) } else { diff --git a/client/src/utils/request.js b/client/src/utils/request.js index a8533cb..484e177 100644 --- a/client/src/utils/request.js +++ b/client/src/utils/request.js @@ -60,8 +60,7 @@ service.interceptors.response.use( type: 'error', duration: 5 * 1000 }) - - // return Promise.reject(new Error(res.error || '请求出错')) + return Promise.reject(new Error(res.msg || '请求出错')) } else { return res } diff --git a/client/src/views/system/dict.vue b/client/src/views/system/dict.vue index 2c56ee5..f3b5926 100644 --- a/client/src/views/system/dict.vue +++ b/client/src/views/system/dict.vue @@ -63,7 +63,7 @@ - +