Compare commits

...

7 Commits

Author SHA1 Message Date
xingyy
30a46e6817 Merge branch 'xingyy' into dev 2025-03-17 13:38:26 +08:00
xingyy
9ee59626a5 feat(auth): 新增合同用户信息验证功能
- 在 auth API 中添加了 contractUserinfo 函数,用于验证用户信息
- 在签名协议页面中集成了合同用户信息验证功能
- 优化了验证状态的显示逻辑,增加了"验证中..."状态
- 调整了直播室广播组件的更新频率
2025-03-17 13:37:26 +08:00
xingyy
5fe9645cfb 123 2025-03-14 13:15:53 +08:00
xingyy
9402c8b719 refactor(app): 优化代码和性能
- 在 puzzleComponent 中添加 watch 监听 loading 状态,以重置验证状态
- 修改 personal-Info 页面中路由跳转方式
- 在 nuxt.config.js 中添加 imagemin 插件,优化图片压缩
- 更新 package.json,添加 vite-plugin-imagemin 依赖
2025-03-14 10:57:50 +08:00
xingyy
3b60502ae3 12 2025-03-14 10:08:45 +08:00
xingyy
ff90f4a3a1 1231 2025-03-14 10:07:39 +08:00
xingyy
f01d711d55 1231 2025-03-14 09:48:26 +08:00
11 changed files with 2253 additions and 35 deletions

View File

@ -37,3 +37,10 @@ export async function userCaptchaValidate(data) {
data
})
}
export async function contractUserinfo(data) {
return await request( {
url:'/api/v1/contract/userinfo',
method: 'POST',
data
})
}

View File

@ -1,7 +1,7 @@
<script setup>
import { ref, reactive, onMounted, onBeforeUnmount } from 'vue'
import { ref, reactive, onMounted, onBeforeUnmount, watch } from 'vue'
//i18n
import { useI18n } from 'vue-i18n'
const {t} =useI18n()
@ -40,7 +40,15 @@
maxMoveX.value = img.width - blockSize
loaded.value = true
}
watch(()=>{
return props.loading
},(newVal)=>{
if(!newVal){
verifyStatus.show = false
verifyStatus.message = ''
moveX.value = 0
}
})
const onImageError = () => {
console.error('Image failed to load')
maxMoveX.value = 270
@ -84,11 +92,7 @@
verifyStatus.type = success ? 'success' : 'error'
verifyStatus.message = success ? t('components.form.verifySuccess') : t('components.form.verifyFailed')
isVerifying.value = false
setTimeout(() => {
verifyStatus.show = false
verifyStatus.message = ''
moveX.value = 0
}, 1500)
}
//
@ -144,11 +148,13 @@
>
<transition name="fade-slide">
<div
v-if="verifyStatus.show"
class="absolute left-0 bottom-0 w-full h-25px leading-25px text-center text-14px text-white"
:class="verifyStatus.type === 'success' ? 'bg-#52c41a' : 'bg-#ff4d4f'"
v-if="verifyStatus.show || isVerifying"
:class="`absolute left-0 bottom-0 w-full h-25px leading-25px text-center text-14px text-white ${
isVerifying ? 'bg-#3B91FF' :
verifyStatus.type === 'success' ? 'bg-#52c41a' : 'bg-#ff4d4f'
}`"
>
{{ verifyStatus.message }}
{{ isVerifying ? '验证中...' : verifyStatus.message }}
</div>
</transition>
</div>

View File

@ -114,7 +114,7 @@ const initData = async () => {
if (number.value==2){
await getData()
if (qrData.value.payStatus===4){
router.replace('/collectCode/payment')
router.push('/collectCode/payment')
}
}
if(!formData.value.countryCode){

View File

@ -4,14 +4,22 @@ import { contractView, signOffline } from "~/api/goods/index.js"
import { codeAuthStore } from "~/stores-collect-code/auth/index.js"
import { useI18n } from "vue-i18n"
import { fddInfo } from "@/api-collect-code/goods/index.js"
<<<<<<< HEAD
=======
import { showLoadingToast } from 'vant';
>>>>>>> xingyy
definePageMeta({
i18n: 'signature.protocol.title'
})
const { t } = useI18n()
const { formData, number, qrData } = codeAuthStore()
<<<<<<< HEAD
const activeNames = ref([])
=======
const activeNames = ref('')
>>>>>>> xingyy
const router = useRouter()
const pmblUrl = ref('')
@ -74,6 +82,14 @@ const handleCollapseChange = (name) => {
* - 其他用户: 走非大陆签署流程
*/
const confirm = async () => {
<<<<<<< HEAD
=======
const toast= showLoadingToast({
message: '加载中...',
forbidClick: true,
});
>>>>>>> xingyy
try {
const fddResponse = await fddInfo({ phone: formData.value.phone })
@ -100,6 +116,11 @@ const confirm = async () => {
}
} catch (error) {
console.error('签署确认失败:', error)
<<<<<<< HEAD
=======
}finally{
toast.close();
>>>>>>> xingyy
}
}

View File

@ -21,7 +21,7 @@ await getAuctionDetail()
<template>
<div class="grow-1 flex flex-col">
<client-only>
<div class="relative" @click="changeLive">
<div class="relative bg-#000" @click="changeLive">
<liveRoom :class="['changeLive', fullLive ? 'expanded' : 'collapsed']"/>
<div v-if="auctionDetail.isLiving===1" class="absolute h-188px w-screen pt-36px flex flex-col text-#fff top-0 left-0 items-center">
<div class="text-18px mb-5px">{{ auctionDetail.title }}</div>

View File

@ -42,7 +42,7 @@ onMounted(async()=>{
await fetchBuyList()
timer.value = setInterval(async () => {
await fetchBuyList()
}, 10000)
}, 5000)
})
onUnmounted(() => {

View File

@ -5,6 +5,7 @@ import { signOnline } from "~/api/goods/index.js"
import { authStore } from "~/stores/auth/index.js"
import {useI18n} from "vue-i18n";
import { useThrottleFn } from '@vueuse/core'
import { contractUserinfo } from "@/api/auth/index.js"
definePageMeta({
layout: 'default',
i18n: 'signature.protocol.title'
@ -47,7 +48,17 @@ const handleCollapseChange = (name) => {
}
const goSignature =useThrottleFn(async () => {
if(userInfo.value.userExtend.isMainland===1){
//
const res1 = await contractUserinfo({phone:userInfo.value.telNum})
if(res1.status===0){
//
if(res1.data.specialType===1){
router.push({
path: '/signature/panel'
})
}else if(res1.data.specialType===0){
//
if(userInfo.value.userExtend.isMainland===1){
const res = await signOnline({
auctionArtworkUuid:payment.value.auctionArtworkUuid
})
@ -66,6 +77,10 @@ const goSignature =useThrottleFn(async () => {
path: '/signature/panel'
})
}
}
}
},2000)
</script>

View File

@ -27,6 +27,7 @@ export const goodStore = createGlobalState(() => {
// 获取拍卖详情
const getAuctionDetail = async () => {
try {
loading.value = true
const res = await defaultDetail({})

View File

@ -1,5 +1,6 @@
import dotenv from 'dotenv'
import process from 'node:process'
import imagemin from 'vite-plugin-imagemin'
import { currentLocales } from './i18n/i18n'
import fs from 'fs'
import path from 'path'
@ -29,13 +30,8 @@ export default defineNuxtConfig({
modules: [
'@vant/nuxt',
'@unocss/nuxt',
'@nuxtjs/i18n',
'@nuxtjs/i18n'
],
image: {
provider: 'ipx',
format: ['webp'],
quality: 80,
},
runtimeConfig: {
// 私有配置,只有在服务端可用
apiSecret: process.env.NUXT_API_SECRET,
@ -115,6 +111,13 @@ export default defineNuxtConfig({
vite: {
build: {
target: 'esnext',
minify: 'terser',
terserOptions: {
compress: {
drop_console: true, // 移除 console
drop_debugger: true, // 移除 debugger
}
}
},
optimizeDeps: {
include: [
@ -123,6 +126,35 @@ export default defineNuxtConfig({
'is-https',
],
},
plugins: [
imagemin({
gifsicle: {
optimizationLevel: 7,
interlaced: false
},
optipng: {
optimizationLevel: 7
},
mozjpeg: {
quality: 70
},
pngquant: {
quality: [0.8, 0.9],
speed: 4
},
svgo: {
plugins: [
{
name: 'removeViewBox'
},
{
name: 'removeEmptyAttrs',
active: false
}
]
}
})
]
},
experimental: {

View File

@ -53,7 +53,8 @@
"sass-loader": "^16.0.4",
"sharp": "^0.33.5",
"typescript": "~5.7.2",
"vant": "^4.9.15"
"vant": "^4.9.15",
"vite-plugin-imagemin": "^0.6.1"
},
"pnpm": {
"peerDependencyRules": {

File diff suppressed because it is too large Load Diff