hookehuyr

fix API返回结构调整

......@@ -41,7 +41,8 @@ import { kgListAPI } from '@/api/C/kg.js'
export default {
beforeRouteEnter (to, from, next) {
(async () => {
to.params.schoolList = await kgListAPI();
const { data } = await kgListAPI();
to.params.schoolList = data;
next();
})()
},
......
......@@ -157,14 +157,16 @@ const itemList = [
// 异步获取我的列表数量信息
async function getMySum() {
userInfo.value = await myInfoAPI();
const { data } = await myInfoAPI();
userInfo.value = data;
_.each(itemList, item => {
item.sum = userInfo.value[item.key]
});
}
onMounted(async () => {
actions.value = await myPerformerAPI();
const { data } = await myPerformerAPI();
actions.value = data;
getMySum();
});
......