|
@@ -25,6 +25,8 @@ import ColPopup from '@/components/col-popup'
|
|
|
import StudentInfo from './model/student-info'
|
|
|
import StudentConfirm from './model/student-info/student-confirm'
|
|
|
import { useEventListener, useWindowScroll } from '@vueuse/core'
|
|
|
+import { state } from '@/state'
|
|
|
+import { callbackify } from 'util'
|
|
|
|
|
|
export const getAssetsHomeFile = (fileName: string) => {
|
|
|
const path = `./images/${fileName}`
|
|
@@ -202,6 +204,18 @@ export default defineComponent({
|
|
|
this.onSearch()
|
|
|
}, 1000)
|
|
|
} catch {}
|
|
|
+ },
|
|
|
+ onTeacherAuth(callBack: any) {
|
|
|
+ // 是否老师认证
|
|
|
+ // 老师入驻状态 0、未申请 UNPAALY、未申请 DOING、审核中 PASS、通过 UNPASS、不通过,可用值:UNPAALY,DOING,PASS,UNPASS
|
|
|
+ const data = state.user.data
|
|
|
+ if (data.entryStatus === 'PASS') {
|
|
|
+ callBack && callBack()
|
|
|
+ } else if (data.entryStatus === 'DOING') {
|
|
|
+ Toast('认证审核中,请稍后再试')
|
|
|
+ } else {
|
|
|
+ this.$router.push('/teacherCert')
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
render() {
|
|
@@ -244,8 +258,10 @@ export default defineComponent({
|
|
|
size="small"
|
|
|
class={styles.chargeTimer}
|
|
|
onClick={() => {
|
|
|
- this.$router.push({
|
|
|
- path: '/accountRechargeTimer'
|
|
|
+ this.onTeacherAuth(() => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/accountRechargeTimer'
|
|
|
+ })
|
|
|
})
|
|
|
}}
|
|
|
>
|
|
@@ -269,7 +285,9 @@ export default defineComponent({
|
|
|
round
|
|
|
block
|
|
|
onClick={() => {
|
|
|
- this.shareStatus = true
|
|
|
+ this.onTeacherAuth(() => {
|
|
|
+ this.shareStatus = true
|
|
|
+ })
|
|
|
}}
|
|
|
>
|
|
|
<img src={getAssetsHomeFile('icon_invite_student.png')} />
|
|
@@ -280,7 +298,9 @@ export default defineComponent({
|
|
|
round
|
|
|
block
|
|
|
onClick={() => {
|
|
|
- this.$router.push('/classArrangement')
|
|
|
+ this.onTeacherAuth(() => {
|
|
|
+ this.$router.push('/classArrangement')
|
|
|
+ })
|
|
|
}}
|
|
|
>
|
|
|
<img src={getAssetsHomeFile('icon_class_plan.png')} />
|