|  |  |  | 
|---|
|  |  |  | <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 codeUrlServices from '@/services/api/codeUrl'; | 
|---|
|  |  |  | import { useQuery } from '@tanstack/vue-query'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //跳转上上签或支付宝信任签的签约地址 | 
|---|
|  |  |  | defineOptions({ | 
|---|
|  |  |  | name: 'SignMiddleware', | 
|---|
|  |  |  | name: 'SignU', | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const route = useRoute(); | 
|---|
|  |  |  | const templateCode = (route.params.code as string) ?? ''; | 
|---|
|  |  |  | const code = (route.params.code as string) ?? ''; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function goSign() {} | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const { data, isLoading } = useQuery({ | 
|---|
|  |  |  | queryKey: ['codeUrlServices/getCodeUrl', code], | 
|---|
|  |  |  | queryFn: () => | 
|---|
|  |  |  | codeUrlServices.getCodeUrl( | 
|---|
|  |  |  | { | 
|---|
|  |  |  | scene: EnumCodeUrlScene.ElectronSignUrl, | 
|---|
|  |  |  | code: code, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { showLoading: false } | 
|---|
|  |  |  | ), | 
|---|
|  |  |  | enabled: computed(() => !!code), | 
|---|
|  |  |  | onSuccess(data) { | 
|---|
|  |  |  | if (data.url) { | 
|---|
|  |  |  | window.location.href = data.url; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <style lang="scss" scoped> | 
|---|