diff --git a/app/api/goods/index.js b/app/api/goods/index.js index 264ba5e..fb25bf1 100644 --- a/app/api/goods/index.js +++ b/app/api/goods/index.js @@ -53,4 +53,12 @@ export async function logSendlog(data) { method: 'POST', data }) +} +export async function signOffline(data) { + + return await request( { + url:'/api/v1/contract/sign-offline', + method: 'POST', + data + }) } \ No newline at end of file diff --git a/app/components/SignaturePad.vue b/app/components/SignaturePad.vue deleted file mode 100644 index afc7404..0000000 --- a/app/components/SignaturePad.vue +++ /dev/null @@ -1,181 +0,0 @@ - - - - - 清除 - 确认 - - - - - - - \ No newline at end of file diff --git a/app/components/drag-window/index.vue b/app/components/drag-window/index.vue deleted file mode 100644 index 458b623..0000000 --- a/app/components/drag-window/index.vue +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/app/pages/home/components/ItemList/index.vue b/app/pages/home/components/ItemList/index.vue index 39880e2..93ffbbe 100644 --- a/app/pages/home/components/ItemList/index.vue +++ b/app/pages/home/components/ItemList/index.vue @@ -2,8 +2,7 @@ import { ref } from 'vue' import { goodStore } from "@/stores/goods" import DetailPopup from '../DetailPopup/index.vue' -import MasonryWall from '@yeger/vue-masonry-wall' -import WaterfallFlow from '@/components/WaterfallFlow.vue' +import WaterfallFlow from '@/components/waterfallFlow/index.vue' const { itemList, pageRef, diff --git a/app/pages/profile/index.vue b/app/pages/profile/index.vue index 645d803..592eada 100644 --- a/app/pages/profile/index.vue +++ b/app/pages/profile/index.vue @@ -51,7 +51,7 @@ const onRefresh = async () => { } // 导航函数 -const goPay = () => router.push('/signature/personal-Info') +const goPay = () => router.push('/signature/protocol') const goDetail = (item) => router.push({ path: '/artDetail', query: { uuid: item.uuid } }) // 初始化 diff --git a/app/pages/signature/panel/index.vue b/app/pages/signature/panel/index.vue index c3f7297..6420047 100644 --- a/app/pages/signature/panel/index.vue +++ b/app/pages/signature/panel/index.vue @@ -1,18 +1,173 @@ - - + + + + + + + 返回 + + + 清空 + + + 确认 + + + + + + + 请将手机横屏使用 + + + + + + \ No newline at end of file diff --git a/app/pages/signature/protocol/index.vue b/app/pages/signature/protocol/index.vue index bdf4c6c..95c9583 100644 --- a/app/pages/signature/protocol/index.vue +++ b/app/pages/signature/protocol/index.vue @@ -4,6 +4,12 @@ definePageMeta({ layout: 'default', title: '签署内容' }) +const router = useRouter(); +const goSignature=()=>{ + router.push({ + path:'/signature/panel' +}) +} @@ -30,7 +36,7 @@ definePageMeta({ - 同意并签字 + 同意并签字 diff --git a/app/stores/live/index.js b/app/stores/live/index.js index da5ac8d..8a85533 100644 --- a/app/stores/live/index.js +++ b/app/stores/live/index.js @@ -109,6 +109,46 @@ export const liveStore = createGlobalState(() => { } +// 定义常量 + const WS_TYPES = { + TIP: 'tip', + STOP_ARTWORK: 'stopArtwor', + OVER: 'over' + } + + const TIP_TYPES = { + FALLING: 'falling', + OTHERS_BID: 'othersBid', + SUCCESS_BID: 'successBid', + ARTWORK_OVER: 'artworkOver', + FAIL_BID: 'failBid' + } + +// 基础消息配置 + const BASE_MESSAGE_STYLE = { + width: '151px', + bottom: '265px' + } + const createMessageConfig = (text, color, subText = '', extraStyle = {}) => ({ + title: { + text, + color, + align: 'center' + }, + icon: false, + ...(subText && { + subTitle: { + text: subText, + color: '#939393', + align: 'center' + } + }), + style: { + ...BASE_MESSAGE_STYLE, + ...extraStyle + } + }) + const getSocketData = async () => { const wsClient = new WebSocketClient( config.public.NUXT_PUBLIC_SOCKET_URL, @@ -118,119 +158,67 @@ export const liveStore = createGlobalState(() => { auctionUuid: auctionDetail.value.uuid, }) + // 处理消息提示 + const handleTipMessage = (tipType) => { + const tipConfigs = { + [TIP_TYPES.FALLING]: () => + message.warning(createMessageConfig(t('live_room.text1'), '#F09F1F')), + + [TIP_TYPES.OTHERS_BID]: () => + message.error(createMessageConfig(t('live_room.text2'), '#CF3050', t('live_room.text3'))), + + [TIP_TYPES.SUCCESS_BID]: () => + message.success(createMessageConfig(t('live_room.text4'), '#18A058', t('live_room.text5'))), + + [TIP_TYPES.ARTWORK_OVER]: () => + message.success(createMessageConfig( + t('live_room.text6'), + '#575757', + t('live_room.text7'), + { backgroundColor: '#fff', borderColor: '#fff' } + )), + + [TIP_TYPES.FAIL_BID]: () => + message.error(createMessageConfig( + t('live_room.text8'), + '#CF3050', + t('live_room.text9'), + { width: '186px' } + )) + } + + const handler = tipConfigs[tipType] + if (handler) handler() + } + + // WebSocket 事件处理 ws.onOpen(() => { console.log('WebSocket connected') }) ws.onMessage((data) => { auctionData.value = data.data - if (data.data?.wsType === 'tip' ) { - if (data.data?.tip?.tipType === 'falling'){ - message.warning({ - title: { - text: t('live_room.text1'), - color: '#F09F1F', - align: 'center', - }, - style: { - width: '151px', - bottom: '230px', - }, - }) - }else if (data.data?.tip?.tipType === 'othersBid'){ - message.error({ - title: { - text: t('live_room.text2'), - color: '#CF3050', - align: 'center', - }, - icon:false, - subTitle:{ - text:t('live_room.text3'), - color: '#939393', - align: 'center', - }, - style: { - width: '151px', - bottom: '230px' - }, - }) - }else if (data.data?.tip?.tipType === 'successBid'){ - message.success({ - title: { - text: t('live_room.text4'), - color: '#18A058', - align: 'center', - }, - icon:false, - subTitle:{ - text:t('live_room.text5'), - color: '#939393', - align: 'center', - }, - style: { - width: '151px', - bottom: '230px' - }, - }) - }else if (data.data?.tip?.tipType === 'artworkOver'){ - message.success({ - title: { - text: t('live_room.text6'), - color: '#575757', - align: 'center', + const { wsType, tip } = data.data || {} - }, - icon:false, - subTitle:{ - text:t('live_room.text7'), - color: '#939393', - align: 'center', - }, - style: { - width: '151px', - bottom: '230px', + switch (wsType) { + case WS_TYPES.TIP: + handleTipMessage(tip?.tipType) + break + case WS_TYPES.STOP_ARTWORK: + quoteStatus.value = false + break + case WS_TYPES.OVER: + message.success(createMessageConfig( + t('live_room.text10'), + '#575757', + '', + { + width: '195px', backgroundColor: '#fff', - borderColor:'#fff' - }, - }) - }else if (data.data?.tip?.tipType === 'failBid'){ - message.error({ - title: { - text: t('live_room.text8'), - color: '#CF3050', - align: 'center', - }, - icon:false, - subTitle:{ - text: t('live_room.text9'), - color: '#939393', - align: 'center', - }, - style: { - width: '186px', - bottom: '230px' - }, - }) - } - - }else if (data.data?.wsType==='stopArtwor'){ - quoteStatus.value=false - }else if (data.data?.wsType==='over'){ - message.success({ - title: { - text: t('live_room.text10'), - color: '#575757', - align: 'center', - }, - icon:false, - style: { - width: '195px', - bottom: '230px', - backgroundColor: '#fff', - borderColor:'#fff' - }, - }) + borderColor: '#fff' + } + )) + break } console.log('onmessage', data) diff --git a/nuxt.config.js b/nuxt.config.js index a64445a..78470f5 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -49,6 +49,7 @@ export default defineNuxtConfig({ rootContainingBlockSelectorList: [ 'van-tabbar', 'van-popup', + 'van-overlay', ], }, }, diff --git a/package.json b/package.json index 9634947..5acc485 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ "@fingerprintjs/fingerprintjs": "^4.5.1", "@nuxtjs/i18n": "^9.1.1", "@vueuse/core": "^12.4.0", - "@yeger/vue-masonry-wall": "^5.0.17", "aliyun-aliplayer": "^2.28.5", "axios": "^1.7.9", "crypto-js": "^4.2.0", @@ -32,10 +31,10 @@ "pinyin": "4.0.0-alpha.2", "qrcode": "^1.5.4", "segmentit": "^2.0.3", + "tslib": "^2.6.0", "vconsole": "^3.15.1", "vue": "^3.5.13", - "vue-router": "^4.5.0", - "tslib": "^2.6.0" + "vue-router": "^4.5.0" }, "devDependencies": { "@iconify-json/carbon": "^1.2.5",
请将手机横屏使用