ต่อ api ประวัติการศึกษา

This commit is contained in:
Kittapath 2023-03-24 20:47:01 +07:00
parent 8d2b93b6a3
commit 0760ae1981
9 changed files with 357 additions and 222 deletions

View file

@ -73,35 +73,37 @@ import ExamPayment from '@/modules/01_exam/components/ExamPayment.vue'
import ExamFinished from '@/modules/01_exam/components/ExamFinished.vue'
import keycloak from '@/plugins/keycloak'
import { useQuasar } from 'quasar'
import { useExamDataStore } from '@/modules/01_exam/store'
import http from '@/plugins/http'
import config from '@/app.config'
const $q = useQuasar()
const store = useExamDataStore()
const examId = ref<string>('zxc')
const step = ref<number>(2)
const stepRaw = ref<number>(2)
const examPost = ref<any>()
const test = ref<any>()
const loading = ref<boolean>(false)
const tittle = ref<string>('การสอบภาค ข. พิเศษ สำหรับผู้สอบผ่านของส่วนราชการแล้ว ทดสอบ')
const candidateId = ref<string>('2223ba53-2fb2-470b-8dc1-27e5471b0331')
const loader = ref<boolean>(false)
onMounted(() => {
loadCandidate()
candidateCheck()
fetchExams()
})
const loadCandidate = () => {
// this.loader = true
// this.$http
// .get(this.$config.API.getCandidateCurrentStep(this.examId, this.$keycloak.tokenParsed.sub))
// .then((res) => {
// this.step = res.data.items
// this.stepRaw = res.data.items
// })
// .catch((e) => {
// this.step = 1
// })
// .finally(() => {
// this.loader = false
// })
const candidateCheck = async () => {
loader.value = true
await http
.get(config.API.candidateCheckCreate(candidateId.value))
.then((res) => {
const data = res.data.result
store.consend = data
})
.catch(() => {})
.finally(() => {
loader.value = false
})
}
const fetchExams = () => {