| | |
| | | <MineServiceDetailView /> |
| | | </ContentScrollView> |
| | | <PageFooter class="order-settle-bar"> |
| | | <div class="order-settle-price-wrapper"> |
| | | <div class="order-settle-price-label">支付:</div> |
| | | <nut-price :price="155" size="large" /> |
| | | </div> |
| | | <PageFooterBtn type="primary" class="business-card-btn">立即下单</PageFooterBtn> |
| | | <PageFooterBtn class="business-card-btn" @click="cancelStandardOrderAppointment" |
| | | >取消预约</PageFooterBtn |
| | | > |
| | | <PageFooterBtn type="primary" class="business-card-btn" @click="handleSubmit" |
| | | >确认预约</PageFooterBtn |
| | | > |
| | | </PageFooter> |
| | | <!-- </LoadingLayout> --> |
| | | </template> |
| | |
| | | <script setup lang="ts"> |
| | | import { MineServiceDetailView } from '@12333/components'; |
| | | import Taro from '@tarojs/taro'; |
| | | import * as standardServiceServices from '@12333/services/apiV2/standardService'; |
| | | import { useCheckReceiveTaskUserSubmit } from '@12333/hooks'; |
| | | import * as standardOrderServices from '@12333/services/apiV2/standardOrder'; |
| | | import { Message } from '@12333/utils'; |
| | | import { goBack } from '@/utils'; |
| | | import { useStandardOrder } from '@12333/hooks'; |
| | | |
| | | defineOptions({ |
| | | name: 'InnerPage', |
| | |
| | | |
| | | const route = Taro.useRouter(); |
| | | const id = route.params?.id as string; |
| | | |
| | | const { detail } = useStandardOrder({ |
| | | id: id, |
| | | }); |
| | | |
| | | async function cancelStandardOrderAppointment() { |
| | | try { |
| | | await Message.confirm({ message: '确认要取消预约吗?' }); |
| | | let params: API.CancelStandardOrderAppointmentCommand = { |
| | | id: id, |
| | | }; |
| | | let res = await standardOrderServices.cancelStandardOrderAppointment(params); |
| | | if (res) { |
| | | Message.success('操作成功'); |
| | | goBack(); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function handleSubmit() { |
| | | try { |
| | | let params: API.SureStandardOrderAppointmentCommand = { |
| | | id: id, |
| | | }; |
| | | let res = await standardOrderServices.sureStandardOrderAppointment(params); |
| | | if (res) { |
| | | Message.success('操作成功'); |
| | | goBack(); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |