@@ -82,6 +82,9 @@ export default {
}
handler()
this.$watch('$route.query', handler)
+ getUserInfo().then(res => {
+ this.$store.commit(SET_USER_INFO, { userInfo: res })
+ })
},
methods: {
fetchUserInfo () {
@@ -3,7 +3,6 @@
<div>
<c-button v-if="isTeacher && !topNumber" @click="handleToTop" theme="green" text icon="publish">置顶</c-button>
<c-button v-if="isTeacher && topNumber" @click="handleCancelToTop" theme="green" text icon="close">取消置顶</c-button>
-
<c-button v-if="isOwn" @click="handleChangeShow" theme="orange" text :icon="personal ? 'lock_open' : 'lock'">
{{personal ? '公开' : '设为私有'}}
</c-button>
@@ -49,7 +49,7 @@ export default {
slide: {}
- created () {
+ mounted () {
this.$store.commit(RESET)
let { page } = this.$route.params
if (page) {