|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script setup lang="ts"> | 
|---|
|  |  |  | import { LoadingLayout } from '@bole-core/components'; | 
|---|
|  |  |  | import * as codeUrlServices from '@/services/api/codeUrl'; | 
|---|
|  |  |  | import * as enterpriseEmployeeServices from '@/services/api/enterpriseEmployee'; | 
|---|
|  |  |  | import { useQuery } from '@tanstack/vue-query'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //跳转到c端小程序签约详情 | 
|---|
|  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const route = useRoute(); | 
|---|
|  |  |  | const templateCode = (route.params.code as string) ?? ''; | 
|---|
|  |  |  | const smsCode = (route.params.code as string) ?? ''; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function goSign() {} | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const { data, isLoading } = useQuery({ | 
|---|
|  |  |  | queryKey: ['codeUrlServices/getCodeUrl', templateCode], | 
|---|
|  |  |  | queryFn: () => | 
|---|
|  |  |  | codeUrlServices.getCodeUrl( | 
|---|
|  |  |  | { | 
|---|
|  |  |  | scene: EnumCodeUrlScene.ElectronSignUrl, | 
|---|
|  |  |  | code: templateCode, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { showLoading: false } | 
|---|
|  |  |  | ), | 
|---|
|  |  |  | enabled: computed(() => !!templateCode), | 
|---|
|  |  |  | queryKey: ['enterpriseEmployeeServices/personalUserElectronSign', smsCode], | 
|---|
|  |  |  | queryFn: () => { | 
|---|
|  |  |  | let params: API.PersonalUserElectronSignCommand = { | 
|---|
|  |  |  | smsCode: smsCode, | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | return enterpriseEmployeeServices.personalUserElectronSign(params, { showLoading: false }); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | enabled: computed(() => !!smsCode), | 
|---|
|  |  |  | onSuccess(data) { | 
|---|
|  |  |  | if (data?.signContractLongUrl) { | 
|---|
|  |  |  | window.location.href = data.signContractLongUrl; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|