|
|
@@ -176,9 +176,12 @@
|
|
|
import { onMounted, reactive, ref } from 'vue'
|
|
|
import { useRouter, useRoute } from 'vue-router'
|
|
|
import { usePlatformAppointApi } from '/@/api/platform/appoint'
|
|
|
+ import { usePlatformApi } from '/@/api/platform/home'
|
|
|
// import EntryAdd from './add.vue'
|
|
|
+ import { showNotify } from 'vant'
|
|
|
|
|
|
const platformAppointApi = usePlatformAppointApi()
|
|
|
+ const platformApi = usePlatformApi()
|
|
|
const router = useRouter()
|
|
|
const route = useRoute()
|
|
|
const offset = ref({ x: -80, y: 450 })
|
|
|
@@ -235,8 +238,18 @@
|
|
|
},
|
|
|
})
|
|
|
}
|
|
|
- const onClick = () => {
|
|
|
- router.push('/entry/add')
|
|
|
+ const onClick = async () => {
|
|
|
+ const [err, res]: ToResponse = await to(platformApi.onCheckUserCertificate({}))
|
|
|
+ if (err) return
|
|
|
+ const { check, message } = res.data
|
|
|
+ if (check) {
|
|
|
+ router.push('/entry/add')
|
|
|
+ } else {
|
|
|
+ showNotify({
|
|
|
+ type: 'warning',
|
|
|
+ message,
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
onMounted(() => {
|
|
|
const type = route.query.type
|