|
@@ -1,8 +1,10 @@
|
|
import { defineComponent } from 'vue'
|
|
import { defineComponent } from 'vue'
|
|
import iconTeacher from '@/common/images/icon_teacher.png'
|
|
import iconTeacher from '@/common/images/icon_teacher.png'
|
|
-import { ElButton, ElTag } from 'element-plus'
|
|
|
|
|
|
+import { ElButton, ElDialog, ElTag } from 'element-plus'
|
|
import { state } from '@/state'
|
|
import { state } from '@/state'
|
|
import { getUserType } from '@/helpers/utils'
|
|
import { getUserType } from '@/helpers/utils'
|
|
|
|
+import styles from './index.module.less'
|
|
|
|
+import OpenMember from '@/views/user-info/components/open-member'
|
|
|
|
|
|
export const getAssetsHomeFile = (fileName: string) => {
|
|
export const getAssetsHomeFile = (fileName: string) => {
|
|
const path = `../../../user-info/images/${fileName}`
|
|
const path = `../../../user-info/images/${fileName}`
|
|
@@ -17,16 +19,21 @@ export default defineComponent({
|
|
return state.user.data
|
|
return state.user.data
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ memberStatus: false
|
|
|
|
+ }
|
|
|
|
+ },
|
|
render() {
|
|
render() {
|
|
return (
|
|
return (
|
|
- <div class=" text-center pb-8 relative overflow-hidden">
|
|
|
|
|
|
+ <div class={['text-center pb-8 relative overflow-hidden', styles.users]}>
|
|
<div class="bg-[#FFE7CF] absolute left-6 top-0 text-[#AB5400] text-xs py-0.5 px-2 rounded-[10px]">
|
|
<div class="bg-[#FFE7CF] absolute left-6 top-0 text-[#AB5400] text-xs py-0.5 px-2 rounded-[10px]">
|
|
学生
|
|
学生
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<img
|
|
<img
|
|
src={this.userInfo.heardUrl || iconTeacher}
|
|
src={this.userInfo.heardUrl || iconTeacher}
|
|
- class="w-[68px] h-[68px] rounded-full border-2 border-[#2DC7AA] border-solid mt-6 mx-auto"
|
|
|
|
|
|
+ class="w-[68px] h-[68px] rounded-full border-2 border-[#2DC7AA] border-solid mt-6 mx-auto object-cover"
|
|
/>
|
|
/>
|
|
|
|
|
|
<p class="text-[#333] text-lg font-medium pt-4 flex items-center justify-center">
|
|
<p class="text-[#333] text-lg font-medium pt-4 flex items-center justify-center">
|
|
@@ -44,7 +51,15 @@ export default defineComponent({
|
|
|
|
|
|
<div class={this.userInfo.isVip !== 1 ? 'mt-5' : ''}>
|
|
<div class={this.userInfo.isVip !== 1 ? 'mt-5' : ''}>
|
|
{this.userInfo.isVip !== 1 && (
|
|
{this.userInfo.isVip !== 1 && (
|
|
- <ElButton round type="primary" size="large" class="!px-4">
|
|
|
|
|
|
+ <ElButton
|
|
|
|
+ round
|
|
|
|
+ type="primary"
|
|
|
|
+ size="large"
|
|
|
|
+ class="!px-4"
|
|
|
|
+ onClick={() => {
|
|
|
|
+ this.memberStatus = true
|
|
|
|
+ }}
|
|
|
|
+ >
|
|
开通会员
|
|
开通会员
|
|
</ElButton>
|
|
</ElButton>
|
|
)}
|
|
)}
|
|
@@ -65,6 +80,15 @@ export default defineComponent({
|
|
关注
|
|
关注
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
|
|
+ <ElDialog
|
|
|
|
+ modelValue={this.memberStatus}
|
|
|
|
+ onUpdate:modelValue={val => (this.memberStatus = val)}
|
|
|
|
+ closeOnClickModal={false}
|
|
|
|
+ closeOnPressEscape={false}
|
|
|
|
+ >
|
|
|
|
+ <OpenMember />
|
|
|
|
+ </ElDialog>
|
|
</div>
|
|
</div>
|
|
)
|
|
)
|
|
}
|
|
}
|