|
|
@@ -25,17 +25,24 @@
|
|
|
<script setup lang="ts">
|
|
|
import StepProgress from '@/components/StepProgress.vue'
|
|
|
import { getFaceAuthInfoApi, getFaceAuthResultApi } from '@/services/modules/faceRecognition'
|
|
|
-import { ref, onBeforeMount, onMounted, onUnmounted } from 'vue'
|
|
|
+import { ref, reactive, onBeforeMount, onMounted, onUnmounted } from 'vue'
|
|
|
import { showToast } from 'vant'
|
|
|
import { useInvoice } from '@/hooks/useInvoice'
|
|
|
+import { useUserStore } from '@/stores/modules/user'
|
|
|
+import type { PushRecordIdRequest } from '@/services/modules/invoiceInformation/type.d.ts'
|
|
|
|
|
|
+const userStore = useUserStore()
|
|
|
const etsUrl = ref('')
|
|
|
|
|
|
+const params = reactive<PushRecordIdRequest>({
|
|
|
+ pushRecordId: userStore.pushRecordId,
|
|
|
+})
|
|
|
+
|
|
|
// --- 初始化 Hooks ---
|
|
|
const { submitInvoiceApply } = useInvoice()
|
|
|
// 获取认证链接
|
|
|
const getConfirmInvoiceInfo = async () => {
|
|
|
- const res = await getFaceAuthInfoApi()
|
|
|
+ const res = await getFaceAuthInfoApi(params)
|
|
|
if (res.code === 0 && res.data?.faceAuthUrl) {
|
|
|
etsUrl.value = res.data.faceAuthUrl
|
|
|
} else {
|
|
|
@@ -46,7 +53,7 @@ const getConfirmInvoiceInfo = async () => {
|
|
|
// 获取认证结果
|
|
|
const getFaceAuthResult = async () => {
|
|
|
try {
|
|
|
- const res = await getFaceAuthResultApi()
|
|
|
+ const res = await getFaceAuthResultApi(params)
|
|
|
if (res.code === 0 && res.data?.success) {
|
|
|
submitInvoiceApply()
|
|
|
} else {
|