| | |
| | | <PageLayoutWithBg class="mineHire-page-wrapper" :title="'服务名'" :need-auth="false"> |
| | | <LoadingLayout :loading="isLoading" :error="isError" :loadError="refetch"> |
| | | <ContentScrollView style="background-color: transparent"> serciceDetail </ContentScrollView> |
| | | <PageFooter> |
| | | <!-- <PageFooterAction |
| | | :icon="IconShare" |
| | | text="分享" |
| | | :isFlex="false" |
| | | openType="share" |
| | | ></PageFooterAction> |
| | | <PageFooterAction |
| | | :icon="userResumeInfo.isCollected ? IconAttentionActive : IconAttention" |
| | | text="收藏" |
| | | :isFlex="false" |
| | | @click="handleAttention" |
| | | ></PageFooterAction> --> |
| | | <PageFooterBtn type="primary" @click="pay">预约下单</PageFooterBtn> |
| | | <PageFooterBtn type="primary" @click="pay">预约下单</PageFooterBtn> |
| | | </PageFooter> |
| | | </LoadingLayout> |
| | | </PageLayoutWithBg> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { useTaskInfo } from '@12333/hooks'; |
| | | import InnerPage from './InnerPage.vue'; |
| | | import { useStandardServiceDetail } from '@12333/hooks'; |
| | | import Taro from '@tarojs/taro'; |
| | | import * as standardOrderServices from '@12333/services/apiV2/standardOrder'; |
| | | |
| | | defineOptions({ |
| | | name: 'serciceDetail', |
| | |
| | | const router = Taro.useRouter(); |
| | | const id = router.params?.id ?? ''; |
| | | |
| | | const { isLoading, isError, detail, refetch } = useTaskInfo({ |
| | | const { isLoading, isError, detail, refetch } = useStandardServiceDetail({ |
| | | id, |
| | | }); |
| | | |
| | | async function addStandardOrder() { |
| | | try { |
| | | let params: API.AddStandardOrderCommand = { |
| | | serviceId: '3fa85f64-5717-4562-b3fc-2c963f66afa6', |
| | | serviceName: 'string', |
| | | specId: '3fa85f64-5717-4562-b3fc-2c963f66afa6', |
| | | specName: 'string', |
| | | specPrice: 0, |
| | | specNumber: 0, |
| | | addressId: '3fa85f64-5717-4562-b3fc-2c963f66afa6', |
| | | beginTime: '2025-12-24T06:44:24.840Z', |
| | | endTime: '2025-12-24T06:44:24.840Z', |
| | | supplierEnterpriseId: '3fa85f64-5717-4562-b3fc-2c963f66afa6', |
| | | enterpriseEmployeeIds: ['3fa85f64-5717-4562-b3fc-2c963f66afa6'], |
| | | remark: 'string', |
| | | payAccess: 1, |
| | | payAmount: 0, |
| | | }; |
| | | let res = await standardOrderServices.addStandardOrder(params); |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function pay() { |
| | | try { |
| | | let params: API.PayStandardOrderCommand = { |
| | | id: '9e919af2-3d33-4eac-f6dc-08de429676b3', |
| | | }; |
| | | let res = await standardOrderServices.payStandardOrder(params); |
| | | if (res) { |
| | | Taro.requestPayment({ |
| | | timeStamp: res.timestamp, |
| | | nonceStr: res.nonceStr, |
| | | package: res.package, |
| | | signType: res.signType as any, |
| | | paySign: res.paySign, |
| | | }); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |