|
@@ -2,7 +2,11 @@ import { defineComponent } from 'vue'
|
|
|
import iconTeacher from '@/common/images/icon_teacher.png'
|
|
|
import { ElTag } from 'element-plus'
|
|
|
import { state } from '@/state'
|
|
|
-import { userInfo } from 'os'
|
|
|
+
|
|
|
+import musicDefault from '../../images/music_default.png'
|
|
|
+import musicActive from '../../images/music_active.png'
|
|
|
+import entryDefault from '../../images/entry_default.png'
|
|
|
+import entryActive from '../../images/entry_active.png'
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'users',
|
|
@@ -11,6 +15,19 @@ export default defineComponent({
|
|
|
return state.user.data
|
|
|
}
|
|
|
},
|
|
|
+ methods: {
|
|
|
+ onDetail(type: string) {
|
|
|
+ if (type === 'entry') {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/teacherAuth'
|
|
|
+ })
|
|
|
+ } else if (type === 'music') {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/musicAuth'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
render() {
|
|
|
return (
|
|
|
<div class="bg-white rounded-[6px] text-center pt-[30px] pb-8 flex items-center flex-col">
|
|
@@ -18,20 +35,42 @@ export default defineComponent({
|
|
|
|
|
|
<p class="text-[#1A1A1A] text-lg pt-4">{this.userInfo.username}</p>
|
|
|
|
|
|
- {(this.userInfo.entryFlag == 1 || this.userInfo.musicianFlag) && (
|
|
|
- <div class="pt-3 pb-6">
|
|
|
- {this.userInfo.entryFlag === 1 && (
|
|
|
- <ElTag round color="#fff" class="mx-1 !border-[#2DC7AA]">
|
|
|
- 老师认证
|
|
|
- </ElTag>
|
|
|
- )}
|
|
|
- {this.userInfo.musicianFlag === 1 && (
|
|
|
- <ElTag round color="#fff" class="mx-1 !border-[#2DC7AA]">
|
|
|
- 音乐人认证
|
|
|
- </ElTag>
|
|
|
- )}
|
|
|
- </div>
|
|
|
- )}
|
|
|
+ <div class="pt-3 pb-6 flex">
|
|
|
+ {this.userInfo.entryFlag === 1 ? (
|
|
|
+ <img
|
|
|
+ src={entryActive}
|
|
|
+ class="h-[26px] cursor-pointer pr-2"
|
|
|
+ onClick={() => {
|
|
|
+ this.onDetail('entry')
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ ) : (
|
|
|
+ <img
|
|
|
+ src={entryDefault}
|
|
|
+ class="h-[26px] cursor-pointer pr-2"
|
|
|
+ onClick={() => {
|
|
|
+ this.onDetail('entry')
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+ {this.userInfo.musicianFlag === 1 ? (
|
|
|
+ <img
|
|
|
+ src={musicActive}
|
|
|
+ class="h-[26px] cursor-pointer"
|
|
|
+ onClick={() => {
|
|
|
+ this.onDetail('music')
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ ) : (
|
|
|
+ <img
|
|
|
+ src={musicDefault}
|
|
|
+ class="h-[26px] cursor-pointer"
|
|
|
+ onClick={() => {
|
|
|
+ this.onDetail('music')
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
|
|
|
<div class="text-[14px] text-[#666] flex items-center justify-center">
|
|
|
<span class="flex items-center justify-center leading-6">
|
|
@@ -40,9 +79,9 @@ export default defineComponent({
|
|
|
{this.userInfo.fansNum || 0}
|
|
|
</b>
|
|
|
</span>
|
|
|
- {/* <span class="pl-3 flex items-center justify-center leading-6">
|
|
|
- 帖子<b class="text-black text-xl pl-1 pb-[2px]">124</b>
|
|
|
- </span> */}
|
|
|
+ <span class="pl-3 flex items-center justify-center leading-6">
|
|
|
+ 乐谱<b class="text-black text-xl pl-1 pb-[2px]">134</b>
|
|
|
+ </span>
|
|
|
</div>
|
|
|
</div>
|
|
|
)
|