feat(goods): 新增在线签名功能并优化相关页面

- 新增 signOnline 函数用于在线签名
- 优化 profile 页面,根据订单状态跳转到不同页面- 更新 realAuth 页面,修复跳转链接问题
- 修改 signature 页面,使用新的在线签名函数
- 更新多语言文案,增加部分支付状态描述
This commit is contained in:
xingyy 2025-02-18 16:33:56 +08:00
parent bfb50546b8
commit 62fb1fd2ff
5 changed files with 33 additions and 13 deletions

View File

@ -54,6 +54,14 @@ export async function logSendlog(data) {
data
})
}
export async function signOnline(data) {
return await request( {
url:'/api/v1/contract/sign-online',
method: 'POST',
data
})
}
export async function signOffline(data) {
return await request( {

View File

@ -8,7 +8,7 @@ definePageMeta({
layout: 'default',
i18n: 'menu.profile',
})
const {t}=useI18n();
const router = useRouter()
const { userInfo } = authStore()
const showMyList = ref([])
@ -47,9 +47,19 @@ const onRefresh = async () => {
localState.value.refreshing = false
}
const goPay = () => router.push('/signature/protocol')
const goPay = (status) => {
if (status===1){
router.push('/signature/protocol')
}else if (status===4){
router.push('/payment')
}
}
const goDetail = (item) => router.push({ path: '/artDetail', query: { uuid: item.uuid } })
const statusLabel={
1:t('payment.text4'),
2:t('payment.text2'),
4:t('payment.text6'),
}
fetchData()
</script>
@ -109,17 +119,17 @@ fetchData()
<div class="flex justify-between">
<div>
<div class="text-#575757 text-14px line-height-none mb-5px">
{{ $t('home.start_price') }}RMB 1,000
{{ $t('home.start_price') }}{{item.auctionArtworkInfo?.soldPriceCurrency}} {{item.auctionArtworkInfo?.soldPrice}}
</div>
<div class="text-#B58047 text-14px line-height-none">
{{ $t('home.close_price') }}RMB 10,000
{{ $t('home.close_price') }}{{item.baseCurrency}} {{item.baseMoney}}
</div>
</div>
<van-button
v-if="[1,3,4].includes(item.status)"
class="w-73px !h-30px"
type="primary"
@click.stop="goPay"
@click.stop="goPay(item.status)"
>
<span class="text-12px">{{ $t('art_detail_page.button') }}</span>
</van-button>

View File

@ -60,8 +60,8 @@ const confirm=async ()=>{
message.success(t('realAuth.success_mess'))
const res1=await fddCheck()
if (res1.status===0){
if (!res1.data.isNeedJump){
window.open(res1.data.h5Url)
if (res1.data.isNeedJump){
window.location.href=res1.data.h5Url
}
}
}
@ -146,7 +146,7 @@ const goLogin=()=>{
<style scoped>
:deep(.van-cell__title.van-field__label){
width: 80px;
width: 80px!important;
}
:deep(.van-tabs__line) {
height: 2px;

View File

@ -1,7 +1,7 @@
<script setup>
import {showToast} from 'vant';
import {onMounted, onUnmounted, ref} from 'vue';
import {signOffline} from "~/api/goods/index.js";
import {signOffline, signOnline} from "~/api/goods/index.js";
const router = useRouter();
definePageMeta({
layout: ''
@ -56,8 +56,9 @@ const handleSignatureSubmit = async (data) => {
}
})
};
const confirm = async () => {
const res = await signOffline({
const res = await signOnline({
signImgFileData: imgUrl.value
})
if (res.status===0){

View File

@ -140,7 +140,7 @@
"text7": "请期待下个拍品",
"text8": "很遗憾,竞拍失败",
"text9": "竞拍结束",
"text10": "竞拍结束,谢谢参与",
"text10": "竞拍结束,谢谢参与"
},
"personal": {
"title": "请填写个人相关信息",
@ -153,6 +153,7 @@
"text3":"支付失败",
"text4":"未支付",
"text5":"支付过期",
"next": "下一步"
"next": "下一步",
"text6": "部分支付"
}
}