diff --git a/api/examination/index.js b/api/examination/index.js
index ef3a46f..8270475 100644
--- a/api/examination/index.js
+++ b/api/examination/index.js
@@ -80,7 +80,7 @@ export const getQuestionOptions = (params) => {
// 伴宠师工作台-添加用户基本考核答案
export const addBaseAnswer = (data) => {
return request({
- url: '/applet/examination/addBaseAnswer',
+ url: '/applet/examination/addBaseAnswerV2',
headers: {
isToken: true
},
@@ -185,3 +185,18 @@ export const retakeExam = (params) => {
})
}
+
+
+// 伴宠师工作台-查询考试结果对象
+export const getAnswerBuildData = (userId) => {
+ return request({
+ url: '/applet/examination/getAnswerBuildData',
+ headers: {
+ isToken: true
+ },
+ method: 'get',
+ params : {
+ userId
+ }
+ }).then(res => res.data)
+}
\ No newline at end of file
diff --git a/components/order/ServiceItems.vue b/components/order/ServiceItems.vue
index 27fb4f7..10b5aa8 100644
--- a/components/order/ServiceItems.vue
+++ b/components/order/ServiceItems.vue
@@ -11,10 +11,10 @@
{{item.day}}
|
- {{ item.itemsText[0] }}
{{ item.itemsText[0] }}+{{ item.itemsText[item.itemsText.length - 1] }}{{ item.itemsText.length }}项
+ {{ item.itemsText[0] }}
¥{{item.price.toFixed(2)}}
diff --git a/otherPages/authentication/examination/base.vue b/otherPages/authentication/examination/base.vue
index b67c281..e07cb71 100644
--- a/otherPages/authentication/examination/base.vue
+++ b/otherPages/authentication/examination/base.vue
@@ -39,7 +39,8 @@
+
+
\ No newline at end of file
diff --git a/otherPages/authentication/examination/errorDetail.vue b/otherPages/authentication/examination/errorDetail.vue
index 4a50de4..b59de19 100644
--- a/otherPages/authentication/examination/errorDetail.vue
+++ b/otherPages/authentication/examination/errorDetail.vue
@@ -3,27 +3,56 @@
-
-
- {{ group.title }}
+
+
+ 选择题
+
+
+ {{ `${question.title}` }}
+
+
+ {{ option.title }}
+
+
+
+
+
+
+
-
-
+
+
+
+
+ 培训题
+
+
+ {{ `${question.title}` }}
+
+
+ {{ question.userAppletAnswerTrain?.answer || '未作答' }}
+ {{ question.answer }}
+
+
+
+
+
+ 驳回原因
+
+ {{ detail.reason }}
@@ -48,15 +51,61 @@
import { ref, computed } from 'vue'
import { useStore } from 'vuex'
import { onLoad } from '@dcloudio/uni-app'
+ import { insertUser, udpateUser, getUserOne } from '@/api/userTeacher'
+ import dayjs from 'dayjs'
const store = useStore()
const petType = ref([])
const restTimes = ref()
+ const lastExamTime = ref('')
+
+ //已考试次数
+ const examNumber = ref(0)
const configList = computed(() => {
return store.getters.configList
})
+ const userId = computed(() => {
+ return store.state.user.userInfo.userId
+ })
+
+ // 计算下次考试时间
+ const nextExamTime = computed(() => {
+ if (!lastExamTime.value) return ''
+ const nextTime = dayjs(lastExamTime.value).add(1, 'year')
+ return nextTime.format('YYYY年MM月DD日')
+ })
+
+ // 判断是否可以参加考试
+ const canTakeExam = computed(() => {
+
+ if((restTimes.value - examNumber.value) > 0){
+ return true
+ }
+
+ if (!lastExamTime.value) return true
+ const nextTime = dayjs(lastExamTime.value).add(1, 'year')
+ return dayjs().isAfter(nextTime)
+ })
+
+ const getInfo = async () => {
+ try {
+ if(!userId.value) {
+ return
+ }
+
+ const data = await getUserOne(userId.value)
+
+ examNumber.value = data.examNumber || 0
+ lastExamTime.value = data.examTime
+
+ petType.value = data.petType.split(',').map(n => parseInt(n))
+
+ } catch (err) {
+ console.log('--err', err)
+ }
+ }
const petTypeImg = computed(() => {
return store.getters.petTypeOptions.
@@ -64,15 +113,19 @@
})
onLoad((option) => {
- store.dispatch('fetchPetTypeOptions')
-
- petType.value = option.petType.split(',').map(n => parseInt(n))
-
- // todo: fetch
+ store.dispatch('fetchPetTypeOptions')
+ getInfo()
restTimes.value = parseInt(configList.value.pet_work_num.paramValueText || 0)
})
const toNext = () => {
+ if (!canTakeExam.value) {
+ uni.showToast({
+ title: `请于${nextExamTime.value}后再来考试`,
+ icon: 'none'
+ })
+ return
+ }
uni.navigateTo({
url: "/otherPages/authentication/examination/base"
})
@@ -138,9 +191,29 @@
}
}
+ .next-exam-time {
+ color: #FF2A2A;
+ }
+
.footer-btn {
height: 163rpx;
box-sizing: border-box;
padding-bottom: 18rpx;
}
+
+ .btn {
+ width: 600rpx;
+ height: 80rpx;
+ line-height: 80rpx;
+ text-align: center;
+ background: #FFBF60;
+ color: #fff;
+ border-radius: 40rpx;
+ font-size: 32rpx;
+
+ &-disabled {
+ background: #CCCCCC;
+ color: #FFFFFF;
+ }
+ }
\ No newline at end of file
diff --git a/otherPages/myOrdersManage/clock/index.vue b/otherPages/myOrdersManage/clock/index.vue
index c050d0e..b45e0a3 100644
--- a/otherPages/myOrdersManage/clock/index.vue
+++ b/otherPages/myOrdersManage/clock/index.vue
@@ -197,7 +197,7 @@
其他补充信息(必填)
- 可记录一下今日趣事、宠物状况、提醒事项等
+ 可记录一下今日趣事、宠物状况、提醒事项等,最少30个字