|
@@ -1,18 +1,26 @@
|
|
import { defineComponent } from "vue";
|
|
import { defineComponent } from "vue";
|
|
import { Button, Cell, Icon, Image, NavBar, Rate, Sticky } from "vant";
|
|
import { Button, Cell, Icon, Image, NavBar, Rate, Sticky } from "vant";
|
|
|
|
+import ColHeader from "@/components/col-header";
|
|
import styles from './index.module.less';
|
|
import styles from './index.module.less';
|
|
|
|
+import { state } from '@/state';
|
|
|
|
|
|
import tips from './images/icon_tips.png';
|
|
import tips from './images/icon_tips.png';
|
|
import banner1 from './images/1.png';
|
|
import banner1 from './images/1.png';
|
|
import banner2 from './images/2.png';
|
|
import banner2 from './images/2.png';
|
|
import banner3 from './images/3.png';
|
|
import banner3 from './images/3.png';
|
|
-import ColHeader from "@/components/col-header";
|
|
|
|
|
|
+import iconTeacher from '@common/images/icon_teacher.png';
|
|
|
|
+import request from "@/helpers/request";
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
name: 'live-cert',
|
|
name: 'live-cert',
|
|
- data() {
|
|
|
|
- return {
|
|
|
|
- rate: 4
|
|
|
|
|
|
+ computed: {
|
|
|
|
+ users() {
|
|
|
|
+ return state.user.data
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ async onOpenLive() {
|
|
|
|
+ // await request('')
|
|
}
|
|
}
|
|
},
|
|
},
|
|
render() {
|
|
render() {
|
|
@@ -22,7 +30,7 @@ export default defineComponent({
|
|
content: () => (
|
|
content: () => (
|
|
<Sticky>
|
|
<Sticky>
|
|
<div class={styles['header-content']}>
|
|
<div class={styles['header-content']}>
|
|
- <Button round plain size="small" class={styles.openBtn}>开通直播</Button>
|
|
|
|
|
|
+ <Button round plain size="small" class={styles.openBtn} onClick={this.onOpenLive}>开通直播</Button>
|
|
</div>
|
|
</div>
|
|
</Sticky>
|
|
</Sticky>
|
|
)
|
|
)
|
|
@@ -30,21 +38,21 @@ export default defineComponent({
|
|
</ColHeader>
|
|
</ColHeader>
|
|
|
|
|
|
<Cell class={styles['open-teacher-info']} border={false} v-slots={{
|
|
<Cell class={styles['open-teacher-info']} border={false} v-slots={{
|
|
- icon: () => (<Image class={styles.userLogo} src="https://daya.ks3-cn-beijing.ksyun.com/202108/SfbC1JU.jpeg" fit="cover" />)
|
|
|
|
|
|
+ icon: () => (<Image class={styles.userLogo} src={this.users?.headUrl || iconTeacher} fit="cover" />)
|
|
}}>
|
|
}}>
|
|
<div class={styles['teacher-info']}>
|
|
<div class={styles['teacher-info']}>
|
|
- <div class={styles['teacher-name']}>李老师</div>
|
|
|
|
|
|
+ <div class={styles['teacher-name']}>{ this.users?.username }</div>
|
|
<div class={styles.level}>
|
|
<div class={styles.level}>
|
|
- <Rate v-model={this.rate} color="#FFC459" void-icon="star" voidColor="#D6D6D6" size={15} />
|
|
|
|
|
|
+ <Rate modelValue={this.users?.starGrade} color="#FFC459" void-icon="star" voidColor="#D6D6D6" size={15} />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class={styles['teacher-desc']}>
|
|
<div class={styles['teacher-desc']}>
|
|
<div class={styles.teacherItem}>
|
|
<div class={styles.teacherItem}>
|
|
- <div class={styles.title}>12/20</div>
|
|
|
|
|
|
+ <div class={styles.title}>{this.users?.fansNum}/20</div>
|
|
<div class={styles.content}>粉丝</div>
|
|
<div class={styles.content}>粉丝</div>
|
|
</div>
|
|
</div>
|
|
<div class={styles.teacherItem} style={{ textAlign: 'right' }}>
|
|
<div class={styles.teacherItem} style={{ textAlign: 'right' }}>
|
|
- <div class={styles.title}>12/20</div>
|
|
|
|
|
|
+ <div class={styles.title}>{this.users?.expTime}/10</div>
|
|
<div class={styles.content}>已上课时</div>
|
|
<div class={styles.content}>已上课时</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|