diff --git a/components/dForm/index.vue b/components/dForm/index.vue index 8db56cf..5e36cea 100644 --- a/components/dForm/index.vue +++ b/components/dForm/index.vue @@ -10,34 +10,36 @@ class="ml10">{{item.unit?item.unit:""}} - - + - + + v-for="option in item.options" :key="option.value" :label="option.name" :name="option.value"> - + - + - + + + 提交 @@ -50,7 +52,8 @@ import { reactive, ref, - computed + computed, + watch, } from "vue" const { list, @@ -66,12 +69,18 @@ }, isFooter: true }) - const emit = defineEmits(['submit']) + const emit = defineEmits(['submit', 'input']) const formData = reactive({ name: "" }) + + watch(formData, (val) => { + emit('input', val) + }) + const sheet = reactive({ show: false, + key: null, actions: [], title: "", description: "" @@ -89,6 +98,7 @@ // 开启弹框 const open = (item) => { sheet.show = true + sheet.key = item.key sheet.actions = item.options sheet.title = item.placeholder sheet.description = item.description || "" @@ -100,8 +110,13 @@ // 选择 const handleSelect = (val) => { - console.log(val) + formData[sheet.key] = val?.value } + + const getDesc = (val, options) => { + return options.find(item => item.value === val)?.name + } + // 上传 const afterRead = () => {} // 删除上传文件 @@ -115,11 +130,17 @@ } }) } + + const validate = () => { + return dFormRef.value.validate() + } + + defineExpose({ validate }) \ No newline at end of file diff --git a/otherPages/authentication/components/questionCard.vue b/otherPages/authentication/components/questionCard.vue new file mode 100644 index 0000000..c691d27 --- /dev/null +++ b/otherPages/authentication/components/questionCard.vue @@ -0,0 +1,71 @@ + + + + {{ `${props.index + 1}、${props.data.question}` }} + + + {{ `${String.fromCharCode(65 + oIdx)}、${option.label}` }} + + + + + + + \ No newline at end of file diff --git a/otherPages/authentication/components/stepProgress.vue b/otherPages/authentication/components/stepProgress.vue new file mode 100644 index 0000000..509e813 --- /dev/null +++ b/otherPages/authentication/components/stepProgress.vue @@ -0,0 +1,94 @@ + + + + + + 伴宠师认证 + + + + 查看认证要求,工作详情,服务酬劳扥信息 + + + + + + + + + {{ index + 1 }} + + {{ item }} + + + + + 为保证喂养员认证顺利进行,请认真填写并确保信息的真实性 + + + + + + + + \ No newline at end of file diff --git a/otherPages/authentication/examination/base.vue b/otherPages/authentication/examination/base.vue index 41556ce..6204457 100644 --- a/otherPages/authentication/examination/base.vue +++ b/otherPages/authentication/examination/base.vue @@ -1,85 +1,201 @@ - - - - 答题进度 10/23 - - - + - + + + {{ `答题进度 ${answered}/${total}` }} + - - - 选择题 - - - - 1、猫咪每天在地上走路,时不时还会打滚, 身上是很不干净的,最好每个星期洗次澡 - - - A、对 + + + + + 选择题 + - - B、错 + + - - - - 提交 + + + 提交 + + - \ No newline at end of file diff --git a/otherPages/authentication/examination/baseCompleted.vue b/otherPages/authentication/examination/baseCompleted.vue new file mode 100644 index 0000000..02b8d50 --- /dev/null +++ b/otherPages/authentication/examination/baseCompleted.vue @@ -0,0 +1,139 @@ + + + + + + + + + + + + 基本考核答题已完成 + + + + 进行培训考核的答题前请认真观看下面的视频和资料! + + + + + 平台&服务介绍 + + + + + 猫妈狗爸平台介绍 + + + + 喂养学习视频 + + + + + + 服务培训 + + + + + 进入培训考核 + + + + + + + + + + \ No newline at end of file diff --git a/otherPages/authentication/examination/detail.vue b/otherPages/authentication/examination/detail.vue deleted file mode 100644 index 272d5f6..0000000 --- a/otherPages/authentication/examination/detail.vue +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - 选择题 - - - - 1、猫咪每天在地上走路,时不时还会打滚, 身上是很不干净的,最好每个星期洗次澡 - - - A、对 - - - B、错 - - - - - - 主观题 - - - - 1、喂养服务流程:如果您收到一笔喂养猫咪的订单,备注猫咪性格怕生,请问您会如何进行服务?请详细描述您的全部服务流程(若服务宠物不包含猫咪可回答“略”) - - - - 字数低于700字,不予合格 - - - - - - - - 剩余考试机会:3次 - - - 重新考试 - - - - - - - \ No newline at end of file diff --git a/otherPages/authentication/examination/end.vue b/otherPages/authentication/examination/end.vue index 2d6449d..523e00d 100644 --- a/otherPages/authentication/examination/end.vue +++ b/otherPages/authentication/examination/end.vue @@ -1,169 +1,134 @@ - - - - - - - 伴宠师认证 - - - - 查看认证要求,工作详情,服务酬劳扥信息 - - - - - - + + + + + + + + + + 1 - 基本考核 - - - - - 2 - - 基本考核 - - - - - 3 + + + + + 实名认证 + + + 已完成 + + + + + 真实姓名:刘思恩 + + + 身份证号码:48234792837458923 + + - 基本考核 - - - 为保证喂养员认证顺利进行,请认真填写并确保信息的真实性 - - - - - - - 1 - - - - - - 实名认证 - - - 已完成 - + + + + + 2 - - - 真实姓名:刘思恩 + + + + + 履约保证金缴纳 + + + 去缴纳 + - - 身份证号码:48234792837458923 + + 请缴纳履约保证金,保证金注销时可申请退还 - - - - - - 2 - - - - - - 履约保证金缴纳 - - - 去缴纳 - + + - - 请缴纳履约保证金,保证金注销时可申请退还 + + 3 - - - - - - - - 3 - - - - - - 添加客服微信 + + + + + 添加客服微信 + + + 去缴纳 + - - 去缴纳 + + 微信二维码 + - - 微信二维码 - - - - - - - - 4 - - - - - - 服务工具准备 - - - 查看工具包 - + + - - - 所在地区: - - + + 4 - - - 详细地址: - + + + + + 服务工具准备 + + + 查看工具包 + + + + + 所在地区: + + + + + + 详细地址: + + - + - - - - - - 下一步 + + + 提交审核 + - + + - diff --git a/otherPages/authentication/examination/errorDetail.vue b/otherPages/authentication/examination/errorDetail.vue new file mode 100644 index 0000000..d805733 --- /dev/null +++ b/otherPages/authentication/examination/errorDetail.vue @@ -0,0 +1,142 @@ + + + + + + + + 选择题 + + + + 1、猫咪每天在地上走路,时不时还会打滚, 身上是很不干净的,最好每个星期洗次澡 + + + A、对 + + + B、错 + + + + + + 主观题 + + + + 1、喂养服务流程:如果您收到一笔喂养猫咪的订单,备注猫咪性格怕生,请问您会如何进行服务?请详细描述您的全部服务流程(若服务宠物不包含猫咪可回答“略”) + + + + 字数低于700字,不予合格 + + + + + + + + + 剩余考试机会:{{ restTimes }}次 + + + 重新考试 + + + + + + + + + \ No newline at end of file diff --git a/otherPages/authentication/examination/start.vue b/otherPages/authentication/examination/start.vue index 237dc59..4fc9131 100644 --- a/otherPages/authentication/examination/start.vue +++ b/otherPages/authentication/examination/start.vue @@ -6,7 +6,9 @@ 您选择的宠物类型 - + + + @@ -30,8 +32,9 @@ - - 剩余考试次数:3次 + + + 剩余考试机会:{{ restTimes }}次 开始考试 @@ -41,6 +44,18 @@ + + \ No newline at end of file diff --git a/otherPages/authentication/examination/trainCompleted/fail.vue b/otherPages/authentication/examination/trainCompleted/fail.vue new file mode 100644 index 0000000..be82dbd --- /dev/null +++ b/otherPages/authentication/examination/trainCompleted/fail.vue @@ -0,0 +1,57 @@ + + + + + + + 查看错题原因 + + + + + + + + \ No newline at end of file diff --git a/otherPages/authentication/training/detail.scss b/otherPages/authentication/examination/trainCompleted/index.vue similarity index 74% rename from otherPages/authentication/training/detail.scss rename to otherPages/authentication/examination/trainCompleted/index.vue index 7a5e3cf..5817ba9 100644 --- a/otherPages/authentication/training/detail.scss +++ b/otherPages/authentication/examination/trainCompleted/index.vue @@ -1,3 +1,38 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/otherPages/authentication/examination/trainCompleted/pass.vue b/otherPages/authentication/examination/trainCompleted/pass.vue new file mode 100644 index 0000000..c3e1abe --- /dev/null +++ b/otherPages/authentication/examination/trainCompleted/pass.vue @@ -0,0 +1,62 @@ + + + + + + + 审核留言:-您好呀,感谢您的认真作答~从您的回答中我们感受到了您对宠物的用心,相信您可以胜任宠物喂养员这份小小的工作!希望您能在猫妈狗爸给更多毛孩子带去您的关爱! + + + 下一步 + + + + + + + \ No newline at end of file diff --git a/otherPages/authentication/examination/trainCompleted/waiting.vue b/otherPages/authentication/examination/trainCompleted/waiting.vue new file mode 100644 index 0000000..1b81d62 --- /dev/null +++ b/otherPages/authentication/examination/trainCompleted/waiting.vue @@ -0,0 +1,60 @@ + + + + + + + + 平台会在三个工作日内完成审核,请及时查看审核结果! + + + 我知道了 + + + + + + + \ No newline at end of file diff --git a/otherPages/authentication/list/index.vue b/otherPages/authentication/list/index.vue index 5410374..345d42c 100644 --- a/otherPages/authentication/list/index.vue +++ b/otherPages/authentication/list/index.vue @@ -1,50 +1,49 @@ + - - - - 伴宠师认证 - - - - 查看认证要求,工作详情,服务酬劳扥信息 - - - - - - - 1 - - 基本考核 - - - - - 2 - - 培训考核 - - - - - 3 - - 最终准备 - - - - 为保证喂养员认证顺利进行,请认真填写并确保信息的真实性 - - + + 基本信息 - + + + + + + + + + + + + + 温馨提示:上传专业执照将大大增加通过概率,且会快速晋升为高级伴宠师获取更高报酬 + + + + + @@ -52,12 +51,24 @@ 个人宠物类型 - - - - - - + + + + + + + + + + + + + + + + + + @@ -72,10 +83,9 @@ - - \ No newline at end of file diff --git a/otherPages/authentication/training/detail.vue b/otherPages/authentication/training/detail.vue deleted file mode 100644 index b1a93b4..0000000 --- a/otherPages/authentication/training/detail.vue +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - 伴宠师认证 - - - - 查看认证要求,工作详情,服务酬劳扥信息 - - - - - - - 1 - - 基本考核 - - - - - 2 - - 培训考核 - - - - - 3 - - 最终准备 - - - - 为保证喂养员认证顺利进行,请认真填写并确保信息的真实性 - - - - - - - - - - 平台会在三个工作日内完成审核,请及时查看审核结果! - - - 我知道了 - - - - - - - - \ No newline at end of file diff --git a/otherPages/authentication/training/index.scss b/otherPages/authentication/training/index.scss deleted file mode 100644 index 4f8d161..0000000 --- a/otherPages/authentication/training/index.scss +++ /dev/null @@ -1,54 +0,0 @@ -.active { - color: #FFBF60; - background-color: rgb(255, 241, 240); - } - - .daan { - background-color: #F3F3F3; - border-radius: 50rpx; - } - - .p20 { - padding: 20px; - } - - .box { - height: 180rpx; - background-image: linear-gradient(to bottom, #ffbf60, #f2f2f2); - padding: 16rpx; - position: absolute; - - .step { - width: 720rpx; - height: 15rpx; - border-radius: 32rpx; - background-color: #D9D9D9; - - .in { - width: 50%; - height: 15rpx; - background-color: #ffbf60; - border-radius: 32rpx; - } - } - } - - .content { - border-radius: 20rpx; - padding: 15rpx 20rpx; - position: relative; - bottom: 0; - left: 0; - - .label { - width: 80rpx; - justify-content: center; - padding: 5rpx 15rpx; - color: #fff; - background-color: #FFBF60; - } - } - - .level{ - display: flex; - } \ No newline at end of file diff --git a/otherPages/authentication/training/index.vue b/otherPages/authentication/training/index.vue deleted file mode 100644 index b77f24f..0000000 --- a/otherPages/authentication/training/index.vue +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - 答题进度 2/5 - - - - - - - - - 主观题 - - - - 1、喂养服务流程:如果您收到一笔喂养猫咪的订单,备注猫咪性格怕生,请问您会如何进行服务?请详细描述您的全部服务流程(若服务宠物不包含猫咪可回答“略” - - - - - - - - - - - 提交 - - - - - - - \ No newline at end of file diff --git a/pages.json b/pages.json index b9749f3..d2fe40e 100644 --- a/pages.json +++ b/pages.json @@ -49,7 +49,6 @@ ], "subPackages": [{ "root": "otherPages/authentication", - // 绑定用户 "pages": [{ "path": "list/index", "style": { @@ -66,12 +65,28 @@ "navigationBarTitleText": "基础考核" } }, { - "path": "examination/end", + "path": "examination/baseCompleted", + "style": { + "navigationBarTitleText": "伴宠师认证" + } + }, + { + "path": "examination/train", + "style": { + "navigationBarTitleText": "培训考核" + } + }, { + "path": "examination/trainCompleted/index", + "style": { + "navigationBarTitleText": "伴宠师认证" + } + }, { + "path": "examination/errorDetail", "style": { "navigationBarTitleText": "伴宠师认证" } }, { - "path": "examination/detail", + "path": "examination/end", "style": { "navigationBarTitleText": "伴宠师认证" } @@ -95,26 +110,6 @@ "style": { "navigationBarTitleText": "接单地址" } - }, { - "path": "completed/index", - "style": { - "navigationBarTitleText": "伴宠师认证" - } - }, { - "path": "training/index", - "style": { - "navigationBarTitleText": "培训考核" - } - }, { - "path": "training/detail", - "style": { - "navigationBarTitleText": "伴宠师认证" - } - }, { - "path": "training/base", - "style": { - "navigationBarTitleText": "伴宠师认证" - } }] }, { diff --git a/pages/myOrdersManage/components/orderListByData.vue b/pages/myOrdersManage/components/orderListByData.vue index ea62e40..a5e44c8 100644 --- a/pages/myOrdersManage/components/orderListByData.vue +++ b/pages/myOrdersManage/components/orderListByData.vue @@ -82,7 +82,6 @@ import { ref, reactive, - defineProps } from 'vue'; const { diff --git a/pages/myOrdersManage/components/systemOrder.vue b/pages/myOrdersManage/components/systemOrder.vue index e224933..cabe248 100644 --- a/pages/myOrdersManage/components/systemOrder.vue +++ b/pages/myOrdersManage/components/systemOrder.vue @@ -49,10 +49,6 @@ } - import { - defineProps - } from 'vue'; - const { list } = defineProps({ list: { type: Array, diff --git a/project.config.json b/project.config.json index 0d69ed6..8c7aa2f 100644 --- a/project.config.json +++ b/project.config.json @@ -1,5 +1,5 @@ { - "appid": "wx90d494bba15f99c3", + "appid": "wx01f0f43759922fda", "compileType": "miniprogram", "libVersion": "3.7.8", "packOptions": { diff --git a/static/images/ydd/img3.png b/static/images/ydd/img3.png deleted file mode 100644 index 185936c..0000000 Binary files a/static/images/ydd/img3.png and /dev/null differ diff --git a/utils/pageList.js b/utils/pageList.js new file mode 100644 index 0000000..59b2ef0 --- /dev/null +++ b/utils/pageList.js @@ -0,0 +1,72 @@ +import { ref, reactive } from 'vue' +import { onShow, onReachBottom } from '@dcloudio/uni-app' + +export const usePageList = (apiFun, defaultQueryParams) => { + + const queryParams = reactive({ + pageNo: 1, + pageSize: 10, + ...defaultQueryParams + }) + + const list = ref([]) + const total = ref(0) + + const fetchData = async () => { + try { + const res = await apiFun(queryParams) + + if (res.code === 200) { + return res.data + } + + return { list: [], total: 0 } + } catch (err) { + return { list: [], total: 0 } + } + } + + const getData = async () => { + queryParams.pageNo = 1 + const { list: _list, total: _total } = await fetchData() + + list.value = _list + total.value = _total + } + + const getMore = async () => { + if (list.value.length >= total.value) { + return + } + + queryParams.pageNo++ + const { list: _list } = await fetchData() + + list.value = list.value.concat(_list) + } + + onShow(() => { + // todo fetch + console.log('--onShow') + return + + getData() + }) + + onReachBottom(() => { + // todo fetch + console.log('--onReachBottom') + return + + getMore() + }) + + return { + queryParams, + list, + total, + getData, + getMore, + } + +}