diff --git a/api/examination/index.js b/api/examination/index.js index 8779b70..6be61fe 100644 --- a/api/examination/index.js +++ b/api/examination/index.js @@ -3,112 +3,128 @@ import request from '@/utils/request' // 伴宠师工作台-查询专业执照列表 export const getLicenseList = () => { - return request({ - url: '/applet/examination/licenseList', - method: "get" - }).then(res => { - return res.data - }) + return request({ + url: '/applet/examination/licenseList', + method: "get" + }).then(res => { + return res.data + }) } export const getServiceList = (params) => { - return request({ - url: '/applet/config/serviceList', - method: "get", + return request({ + url: '/applet/config/serviceList', + method: "get", params - }).then(res => { - return res.data?.map?.(item => { - const { id, title, video } = item + }).then(res => { + return res.data?.map?.(item => { + const { + id, + title, + video + } = item - return { id, title, video } - }) || [] - }) + return { + id, + title, + video + } + }) || [] + }) } export const getTrainList = (params) => { - return request({ - url: '/applet/config/trainList', - method: "get", + return request({ + url: '/applet/config/trainList', + method: "get", params - }).then(res => { - return res.data?.map?.(item => { - const { id, title, content } = item + }).then(res => { + return res.data?.map?.(item => { + const { + id, + title, + content + } = item - return { id, title, content } - }) || [] - }) + return { + id, + title, + content + } + }) || [] + }) } // 伴宠师工作台-题目列表数据查询 export const getQuestionList = (params) => { - return request({ - url: '/applet/examination/questionList', - method: "get", + return request({ + url: '/applet/examination/questionList', + method: "get", params - }).then(res => { - return res.data - }) + }).then(res => { + return res.data + }) } // 伴宠师工作台-根据题目id查询题目答案 export const getQuestionOptions = (params) => { - return request({ - url: '/applet/examination/insertUser', - method: "get", + return request({ + url: '/applet/examination/insertUser', + method: "get", params - }).then(res => { - return res.data - }) + }).then(res => { + return res.data + }) } // 伴宠师工作台-添加用户基本考核答案 export const addBaseAnswer = (data) => { - return request({ - url: '/applet/examination/addBaseAnswer', - headers: { - isToken: true - }, - method: 'post', - data - }) + return request({ + url: '/applet/examination/addBaseAnswer', + headers: { + isToken: true + }, + method: 'post', + data + }) } // 伴宠师工作台-根据题目id查询基本考核答案 export const answeBaseByQuestionId = (params) => { - return request({ - url: '/applet/examination/answeBaseByQuestionId', - headers: { - isToken: true - }, - method: "get", + return request({ + url: '/applet/examination/answeBaseByQuestionId', + headers: { + isToken: true + }, + method: "get", params - }).then(res => { - return res.data?.pop() || {} - }) + }).then(res => { + return res.data?.pop() || {} + }) } // 伴宠师工作台-添加用户培训考核答案 export const addTrainAnswer = (data) => { - return request({ - url: '/applet/examination/addTrainAnswer', - headers: { - isToken: true - }, - method: 'post', - data - }) + return request({ + url: '/applet/examination/addTrainAnswer', + headers: { + isToken: true + }, + method: 'post', + data + }) } // 伴宠师工作台-根据题目id查询培训考核答案 export const answeTrainByQuestionId = (params) => { - return request({ - url: '/applet/examination/answeTrainByQuestionId', - headers: { - isToken: true - }, - method: "get", + return request({ + url: '/applet/examination/answeTrainByQuestionId', + headers: { + isToken: true + }, + method: "get", params - }).then(res => { - return res.data?.pop() || {} - }) -} + }).then(res => { + return res.data?.pop() || {} + }) +} \ No newline at end of file diff --git a/otherPages/authentication/components/questionCard.vue b/otherPages/authentication/components/questionCard.vue index 4010703..1b18a27 100644 --- a/otherPages/authentication/components/questionCard.vue +++ b/otherPages/authentication/components/questionCard.vue @@ -1,187 +1,185 @@ \ No newline at end of file