|
@@ -1,6 +1,10 @@
|
|
|
-import { ElButton, ElCol, ElRow } from 'element-plus'
|
|
|
+import request from '@/helpers/request'
|
|
|
+import { state } from '@/state'
|
|
|
import { defineComponent } from 'vue'
|
|
|
+import Auth from './components/auth'
|
|
|
+import CertInfo from './components/cert-info'
|
|
|
import styles from './index.module.less'
|
|
|
+import { teacherState } from './teacherState'
|
|
|
|
|
|
export const getAssetsHomeFile = (fileName: string) => {
|
|
|
const path = `../images/${fileName}`
|
|
@@ -10,91 +14,58 @@ export const getAssetsHomeFile = (fileName: string) => {
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'teacherAuth',
|
|
|
- data() {
|
|
|
- return {
|
|
|
- list: [
|
|
|
- {
|
|
|
- logo: getAssetsHomeFile('o1.png'),
|
|
|
- num: getAssetsHomeFile('num1.png'),
|
|
|
- title: '线上授课',
|
|
|
- desc: '认证成为酷乐秀老师后,可设置您的空闲时间为平台中的求学者进行1对1的线上课程指导。'
|
|
|
- },
|
|
|
- {
|
|
|
- logo: getAssetsHomeFile('o2.png'),
|
|
|
- num: getAssetsHomeFile('num2.png'),
|
|
|
- title: '个人风采展示',
|
|
|
- desc: '可发布自己的专业经历、获奖记录及音视频资料对求学者展示,让学员更加深入的了解您的专业技能,从而提高约课率。'
|
|
|
- },
|
|
|
- {
|
|
|
- logo: getAssetsHomeFile('o3.png'),
|
|
|
- num: getAssetsHomeFile('num3.png'),
|
|
|
- title: '曲谱上传',
|
|
|
- desc: '可上传您制作的MIDI乐谱为求学者提供学习曲目的途径,并从中获得收益。'
|
|
|
- },
|
|
|
- {
|
|
|
- logo: getAssetsHomeFile('o4.png'),
|
|
|
- num: getAssetsHomeFile('num4.png'),
|
|
|
- title: '收益提现',
|
|
|
- desc: '在您授课及上传曲谱销售后,经过平台核算,将您获得的收益发放至您的个人账户下,您可随时将自己获得的收益提现。'
|
|
|
- }
|
|
|
- ]
|
|
|
+ async mounted() {
|
|
|
+ try {
|
|
|
+ // 判断是否登录
|
|
|
+ if (state.user.status !== 'login') {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 老师入驻状态 0、未申请 UNPAALY、未申请 DOING、审核中 PASS、通过 UNPASS、不通过
|
|
|
+ const entryStatus = state.user.data?.entryStatus || 0
|
|
|
+ teacherState.authStatus =
|
|
|
+ entryStatus === 'DOING' || entryStatus === 'PASS' ? true : false
|
|
|
+ // 如果已经认证,则不用获取声部信息
|
|
|
+ if (teacherState.authStatus) {
|
|
|
+ teacherState.active = teacherState.authStatus ? 4 : 1
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ // if (teacherState.subjectList.length <= 0) {
|
|
|
+ // const res = await request.get('/api-website/subject/subjectSelect')
|
|
|
+ // teacherState.subjectList = res.data || []
|
|
|
+ // }
|
|
|
+
|
|
|
+ const teacherInfo = await request.get(
|
|
|
+ '/api-website/teacherAuthEntryRecord/getLastRecordByUserId'
|
|
|
+ )
|
|
|
+ teacherState.teacherInfo = teacherInfo.data || {}
|
|
|
+ const info = teacherState.teacherInfo
|
|
|
+ teacherState.teacherCert.introduction = info.introduction
|
|
|
+ teacherState.teacherCert.subjectId = info.subjectId
|
|
|
+ teacherState.teacherCert.graduateSchool = info.graduateSchool
|
|
|
+ teacherState.teacherCert.subject = info.subject
|
|
|
+ teacherState.teacherCert.gradCertificate = info.gradCertificate
|
|
|
+ teacherState.teacherCert.degreeCertificate = info.degreeCertificate
|
|
|
+ teacherState.teacherCert.teacherCertificate = info.teacherCertificate
|
|
|
+ } catch {
|
|
|
+ //
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ authStatus(): Boolean {
|
|
|
+ return !!teacherState.authStatus
|
|
|
+ },
|
|
|
+ userAuth() {
|
|
|
+ // 判断是否实名过
|
|
|
+ const users = state.user.data || {}
|
|
|
+ return !!(users.idCardNo && users.realName)
|
|
|
}
|
|
|
},
|
|
|
render() {
|
|
|
return (
|
|
|
- <div
|
|
|
- class={[
|
|
|
- styles.musicAuth,
|
|
|
- 'w-[1200px] mt-[72px] mb-[60px] bg-white min-h-full m-auto px-[138px] text-[#333]'
|
|
|
- ]}
|
|
|
- >
|
|
|
- <div class="w-[388px] pt-24 pb-28">
|
|
|
- <div class="text-[28px] font-semibold pb-5">酷乐秀基本介绍</div>
|
|
|
- <p class={[styles.txt]}>
|
|
|
- 酷乐秀是一款为器乐学习者提供智能陪练及线上授课撮
|
|
|
- </p>
|
|
|
- <p class={[styles.txt]}>
|
|
|
- 合的乐器教学平台,器乐老师可通过自身的专业知识为
|
|
|
- </p>
|
|
|
- <p class={[styles.txt, 'inline-block']}>
|
|
|
- 自己带来<span class="font-medium">授课及曲谱销售收益</span>。
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- <div class="pb-20">
|
|
|
- <h2 class="text-2xl pb-11 text-center font-semibold">认证权益</h2>
|
|
|
-
|
|
|
- <ElRow class="mb-24" gutter={28}>
|
|
|
- {this.list.map((item: any) => (
|
|
|
- <ElCol span={6} class="pr-3 !flex">
|
|
|
- <div class={[styles.col, 'flex items-center flex-col p-4']}>
|
|
|
- <img class="w-[94px] h-[87px]" src={item.logo} />
|
|
|
-
|
|
|
- <div class="flex items-center font-[18px] font-medium pb-3 pt-5">
|
|
|
- <img class="w-[30px] h-[22px] mr-1" src={item.num} />
|
|
|
- {item.title}
|
|
|
- </div>
|
|
|
- <p class="text-[14px] text-[#666] leading-6 text-justify">
|
|
|
- {item.desc}
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- </ElCol>
|
|
|
- ))}
|
|
|
- </ElRow>
|
|
|
-
|
|
|
- <h2 class="text-2xl pb-10 text-center font-semibold">
|
|
|
- 酷乐秀欢迎您的加入
|
|
|
- </h2>
|
|
|
-
|
|
|
- <p class="text-lg text-center mb-10">
|
|
|
- 在艺术的殿堂中,为他人照亮前进的道路,用自己的经验和点拨,传播艺术的种子,获取硕果。
|
|
|
- </p>
|
|
|
-
|
|
|
- <div class="text-center">
|
|
|
- <ElButton type="primary" class="rounded w-40 !h-[38px]">
|
|
|
- 立即认证
|
|
|
- </ElButton>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <div class="w-[1200px] mt-[72px] mb-[60px] bg-white min-h-full m-auto text-[#333]">
|
|
|
+ {/* {!teacherState.authStatus ? <CertInfo /> : <div>2323</div>} */}
|
|
|
+ <Auth />
|
|
|
</div>
|
|
|
)
|
|
|
}
|