优化签名流程,移除支付成功后的提示框,并在协议页面中添加加载提示功能

This commit is contained in:
Phoenix 2025-04-19 12:53:30 +08:00
parent 6d6c50292f
commit 2cdcb1394c
2 changed files with 13 additions and 5 deletions

View File

@ -38,7 +38,6 @@ const confirm = async () => {
}) })
if (res.status===0){ if (res.status===0){
await router.push('/payment') await router.push('/payment')
toast.value?.close()
} }
} }
const goBack = () => { const goBack = () => {

View File

@ -1,4 +1,5 @@
<script setup> <script setup>
import {showToast,showLoadingToast } from 'vant';
import pdfView from './pdfView' import pdfView from './pdfView'
import { contractView } from "~/api/goods/index.js" import { contractView } from "~/api/goods/index.js"
import { signOnline } from "~/api/goods/index.js" import { signOnline } from "~/api/goods/index.js"
@ -26,7 +27,7 @@ const protocolList = computed(() => [
{ id: '5', title: $t('signature.agreement.record'), pdfName: pmblUrl.value, type: 'remote' }, { id: '5', title: $t('signature.agreement.record'), pdfName: pmblUrl.value, type: 'remote' },
{ id: '6', title: $t('signature.agreement.transfer'), pdfName: 'pmyjqrs', type: 'local' } { id: '6', title: $t('signature.agreement.transfer'), pdfName: 'pmyjqrs', type: 'local' }
]) ])
const toast=ref(false)
// PDF // PDF
const fetchPmblPdf = async () => { const fetchPmblPdf = async () => {
try { try {
@ -48,12 +49,17 @@ const handleCollapseChange = (name) => {
} }
const goSignature =useThrottleFn(async () => { const goSignature =useThrottleFn(async () => {
try{
toast.value=showLoadingToast({
message: $t('common.loading'),
forbidClick: true,
});
// //
const res1 = await contractUserinfo({phone:userInfo.value.telNum}) const res1 = await contractUserinfo({phone:userInfo.value.telNum})
if(res1.status===0){ if(res1.status===0){
// //
if(res1.data.specialType===1){ if(res1.data.specialType===1){
router.push({ await router.push({
path: '/signature/panel' path: '/signature/panel'
}) })
}else if(res1.data.specialType===0){ }else if(res1.data.specialType===0){
@ -66,19 +72,22 @@ const goSignature =useThrottleFn(async () => {
if(res.data.signType==='fdd'){ if(res.data.signType==='fdd'){
window.location.href = res.data.fddVerifyUrl window.location.href = res.data.fddVerifyUrl
}else{ }else{
router.push({ await router.push({
path: '/signature/panel' path: '/signature/panel'
}) })
} }
} }
}else if(userInfo.value.userExtend.isMainland===0){ }else if(userInfo.value.userExtend.isMainland===0){
router.push({ await router.push({
path: '/signature/panel' path: '/signature/panel'
}) })
} }
} }
} }
}finally{
}