|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <div class="sign-middleware-wrapper"> | 
|---|
|  |  |  | <el-button type="primary" @click="goSign">前往签约</el-button> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <LoadingLayout :loading="isLoading"> | 
|---|
|  |  |  | <div class="sign-middleware-wrapper"> | 
|---|
|  |  |  | <!-- <el-button type="primary" @click="goSign">前往签约</el-button> --> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </LoadingLayout> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script setup lang="ts"> | 
|---|
|  |  |  | // import { AppContainer } from '@bole-core/components'; | 
|---|
|  |  |  | import { LoadingLayout } from '@bole-core/components'; | 
|---|
|  |  |  | import * as enterpriseEmployeeServices from '@/services/api/enterpriseEmployee'; | 
|---|
|  |  |  | import { useQuery } from '@tanstack/vue-query'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //跳转到c端小程序签约详情 | 
|---|
|  |  |  | defineOptions({ | 
|---|
|  |  |  | name: 'SignMiddleware', | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const route = useRoute(); | 
|---|
|  |  |  | const templateCode = (route.params.code as string) ?? ''; | 
|---|
|  |  |  | const smsCode = (route.params.code as string) ?? ''; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function goSign() {} | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const { data, isLoading } = useQuery({ | 
|---|
|  |  |  | 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> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <style lang="scss" scoped> | 
|---|