|
@@ -161,16 +161,18 @@ export default defineComponent({
|
|
}
|
|
}
|
|
const logout = async () => {
|
|
const logout = async () => {
|
|
try {
|
|
try {
|
|
- const res = await request.get('/api-auth/exit', {})
|
|
|
|
|
|
+ await request.get('/api-auth/exit', {})
|
|
router.push({ path: '/' })
|
|
router.push({ path: '/' })
|
|
removeAuth()
|
|
removeAuth()
|
|
- window.location.reload()
|
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ window.location.reload()
|
|
|
|
+ }, 100)
|
|
} catch (e) {
|
|
} catch (e) {
|
|
console.log(e)
|
|
console.log(e)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- const gotoFans = (nowPath:string)=>{
|
|
|
|
- router.push({ path: nowPath, })
|
|
|
|
|
|
+ const gotoFans = (nowPath: string) => {
|
|
|
|
+ router.push({ path: nowPath })
|
|
}
|
|
}
|
|
const changeState = (val: string) => {
|
|
const changeState = (val: string) => {
|
|
if (val == 'strudent') {
|
|
if (val == 'strudent') {
|
|
@@ -240,13 +242,19 @@ export default defineComponent({
|
|
|
|
|
|
{this.userType == 'TEACHER' ? (
|
|
{this.userType == 'TEACHER' ? (
|
|
<div class={classes.dropdownInfo}>
|
|
<div class={classes.dropdownInfo}>
|
|
- <div class={classes.dropdownItem} onClick={()=>this.gotoFans('/userInfo/myFans')}>
|
|
|
|
|
|
+ <div
|
|
|
|
+ class={classes.dropdownItem}
|
|
|
|
+ onClick={() => this.gotoFans('/userInfo/myFans')}
|
|
|
|
+ >
|
|
<p class={classes.dropdownItemTitle}>
|
|
<p class={classes.dropdownItemTitle}>
|
|
{this.user.fansNum || 0}
|
|
{this.user.fansNum || 0}
|
|
</p>
|
|
</p>
|
|
<p class={classes.dropdownItemsubTitle}>粉丝</p>
|
|
<p class={classes.dropdownItemsubTitle}>粉丝</p>
|
|
</div>
|
|
</div>
|
|
- <div class={classes.dropdownItem} onClick={()=>this.gotoFans('/userInfo/musicClass')}>
|
|
|
|
|
|
+ <div
|
|
|
|
+ class={classes.dropdownItem}
|
|
|
|
+ onClick={() => this.gotoFans('/userInfo/musicClass')}
|
|
|
|
+ >
|
|
<p class={classes.dropdownItemTitle}>
|
|
<p class={classes.dropdownItemTitle}>
|
|
{this.user.musicSheetNum || 0}
|
|
{this.user.musicSheetNum || 0}
|
|
</p>
|
|
</p>
|