猫妈狗爸伴宠师小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

114 lines
2.4 KiB

// 伴宠师-伴宠师考核
import request from '@/utils/request'
// 伴宠师工作台-查询专业执照列表
export const getLicenseList = () => {
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",
params
}).then(res => {
return res.data?.map?.(item => {
const { id, title, video } = item
return { id, title, video }
}) || []
})
}
export const getTrainList = (params) => {
return request({
url: '/applet/config/trainList',
method: "get",
params
}).then(res => {
return res.data?.map?.(item => {
const { id, title, content } = item
return { id, title, content }
}) || []
})
}
// 伴宠师工作台-题目列表数据查询
export const getQuestionList = (params) => {
return request({
url: '/applet/examination/questionList',
method: "get",
params
}).then(res => {
return res.data
})
}
// 伴宠师工作台-根据题目id查询题目答案
export const getQuestionOptions = (params) => {
return request({
url: '/applet/examination/insertUser',
method: "get",
params
}).then(res => {
return res.data
})
}
// 伴宠师工作台-添加用户基本考核答案
export const addBaseAnswer = (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",
params
}).then(res => {
return res.data?.pop() || {}
})
}
// 伴宠师工作台-添加用户培训考核答案
export const addTrainAnswer = (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",
params
}).then(res => {
return res.data?.pop() || {}
})
}