提交 2b057265 authored 作者: matian's avatar matian

updates

上级 93e40a68
......@@ -31,6 +31,7 @@
</div>
</el-popover>
</div>
</div>
<div class="banner_homeList">
<div v-for="(itemRoad, indexRoad) in homeList" :key="indexRoad">
<el-popover trigger="hover" popper-class="popover" :placement="itemRoad.position" v-model="itemRoad.isShow">
......@@ -48,7 +49,6 @@
</el-popover>
</div>
</div>
</div>
<div class="w1200">
<ProjectCard
title="在线国际学位"
......@@ -68,11 +68,11 @@ import AppLink from '@/components/Link.vue'
export default {
components: { ProjectCard, AppLink },
computed: {
learning() {
return this.$store.state.user.learning_info.filter(item => item.status === '1')
learningInfo() {
return this.learning.filter(item => item.status === '1')
},
list() {
if (this.learning.length > 0) {
if (this.learningInfo.length > 0) {
this.roadList.forEach(item => {
if (item.projectList.find(it => it.tenant === this.learning[0].tenant)) {
item.isShow = true
......@@ -88,6 +88,7 @@ export default {
},
data() {
return {
learning: [],
roadList: roadMapList,
homeList: homeList,
// 热门专业
......@@ -130,6 +131,9 @@ export default {
}
})
}
},
mounted() {
console.log(JSON.parse(window.localStorage.getItem('learning')))
}
}
</script>
......
import { getUser, logout } from '@/api/my'
export const state = () => ({
learning: [],
user: {},
isMobile: false,
searchVisible: false,
......@@ -10,6 +11,9 @@ export const state = () => ({
})
export const mutations = {
setLearning() {
state.learning = learning
},
setUser(state, user) {
state.user = user
},
......@@ -36,6 +40,9 @@ export const actions = {
getUser({ commit }) {
getUser().then(response => {
commit('setUser', response.data)
commit('setLearning', response.data.learning_info)
this.$store.commit('setUserId', item.id)
window.localStorage.setItem('learning', JSON.stringify(response.data.learning_info))
})
},
// 退出登录
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论