hookehuyr

fix API返回结构调整

...@@ -41,7 +41,8 @@ import { kgListAPI } from '@/api/C/kg.js' ...@@ -41,7 +41,8 @@ import { kgListAPI } from '@/api/C/kg.js'
41 export default { 41 export default {
42 beforeRouteEnter (to, from, next) { 42 beforeRouteEnter (to, from, next) {
43 (async () => { 43 (async () => {
44 - to.params.schoolList = await kgListAPI(); 44 + const { data } = await kgListAPI();
45 + to.params.schoolList = data;
45 next(); 46 next();
46 })() 47 })()
47 }, 48 },
......
...@@ -157,14 +157,16 @@ const itemList = [ ...@@ -157,14 +157,16 @@ const itemList = [
157 157
158 // 异步获取我的列表数量信息 158 // 异步获取我的列表数量信息
159 async function getMySum() { 159 async function getMySum() {
160 - userInfo.value = await myInfoAPI(); 160 + const { data } = await myInfoAPI();
161 + userInfo.value = data;
161 _.each(itemList, item => { 162 _.each(itemList, item => {
162 item.sum = userInfo.value[item.key] 163 item.sum = userInfo.value[item.key]
163 }); 164 });
164 } 165 }
165 166
166 onMounted(async () => { 167 onMounted(async () => {
167 - actions.value = await myPerformerAPI(); 168 + const { data } = await myPerformerAPI();
169 + actions.value = data;
168 getMySum(); 170 getMySum();
169 }); 171 });
170 172
......