diff --git a/app/components/floatingBubble/floating.js b/app/components/floatingBubble/floating.js
index d28f994..110e965 100644
--- a/app/components/floatingBubble/floating.js
+++ b/app/components/floatingBubble/floating.js
@@ -2,33 +2,63 @@ import { createApp } from 'vue'
import MinWindow from '@/components/floatingBubble/index.vue'
let minWindowInstance = null
-let minWindowApp = null // 新增:保存应用实例
+let minWindowApp = null
+let container = null
// 创建悬浮窗
-export const showMinWindow1 = ( props = {}) => {
- if (process.client){
- const container = document.createElement('div')
- container.className = 'floating-bubble-container' // 添加类名
- document.body.appendChild(container)
- const app = createApp(MinWindow, {
- ...props
- })
+export const showMinWindow1 = (props = {}) => {
+ if (!process.client) return
- minWindowApp = app // 保存应用实例
- minWindowInstance = app.mount(container)
+ // 如果在首页,不创建实例并销毁现有实例
+ if (window?.$nuxt?.$route?.path === '/') {
+ hideMinWindow1()
+ return null
+ }
+
+ // 如果已经存在实例,直接返回该实例
+ if (minWindowInstance) {
return minWindowInstance
}
+
+ // 确保清理旧的容器
+ const existingContainer = document.querySelector('.floating-bubble-container')
+ if (existingContainer) {
+ document.body.removeChild(existingContainer)
+ }
+
+ container = document.createElement('div')
+ container.className = 'floating-bubble-container'
+ document.body.appendChild(container)
+
+ const app = createApp(MinWindow, {
+ ...props
+ })
+
+ minWindowApp = app
+ minWindowInstance = app.mount(container)
+ return minWindowInstance
}
export const hideMinWindow1 = () => {
if (!minWindowApp) return
- const cleanup = () => {
- minWindowApp.unmount() // 使用应用实例的unmount方法
- const container = document.querySelector('.floating-bubble-container') // 假设您的容器有这个类名
- container && document.body.removeChild(container)
+
+ try {
+ minWindowApp.unmount()
+ if (container && document.body.contains(container)) {
+ document.body.removeChild(container)
+ }
+ } catch (e) {
+ console.error('清理浮动气泡时出错:', e)
+ } finally {
+ // 确保状态被重置
minWindowApp = null
minWindowInstance = null
+ container = null
+
+ // 额外清理可能残留的容器
+ const existingContainer = document.querySelector('.floating-bubble-container')
+ if (existingContainer) {
+ document.body.removeChild(existingContainer)
+ }
}
-
- cleanup()
}
\ No newline at end of file
diff --git a/app/components/floatingBubble/index.vue b/app/components/floatingBubble/index.vue
index 41ef4b9..84d9824 100644
--- a/app/components/floatingBubble/index.vue
+++ b/app/components/floatingBubble/index.vue
@@ -1,16 +1,31 @@
import {authStore} from "@/stores/auth/index.js";
-
+import {useI18n} from 'vue-i18n'
+const {$t} = useI18n()
const props = defineProps({
type: {
type: Number,
diff --git a/app/pages/signature/panel/index.vue b/app/pages/signature/panel/index.vue
index 1a2cc61..8620ee7 100644
--- a/app/pages/signature/panel/index.vue
+++ b/app/pages/signature/panel/index.vue
@@ -4,7 +4,9 @@ import {onMounted, onUnmounted, ref} from 'vue';
import {signOffline, signOnline} from "~/api/goods/index.js";
import {VueSignaturePad} from "vue-signature-pad";
import {authStore} from "~/stores/auth/index.js";
+import {useI18n} from "vue-i18n";
const router = useRouter();
+const {$t} = useI18n()
definePageMeta({
layout: ''
})
diff --git a/app/pages/signature/personal-Info/index.vue b/app/pages/signature/personal-Info/index.vue
index a11b43f..61e28f5 100644
--- a/app/pages/signature/personal-Info/index.vue
+++ b/app/pages/signature/personal-Info/index.vue
@@ -6,6 +6,7 @@ definePageMeta({
name: 'personal-info',
})
const {t} = useI18n()
+const {$t} = useI18n()
const showPicker = ref(false)
const showPicker1 = ref(false)
const onConfirm = () => {
diff --git a/app/pages/signature/protocol/index.vue b/app/pages/signature/protocol/index.vue
index a47184c..27e1dc8 100644
--- a/app/pages/signature/protocol/index.vue
+++ b/app/pages/signature/protocol/index.vue
@@ -2,13 +2,15 @@
import pdfView from './pdfView'
import { contractView } from "~/api/goods/index.js"
import { authStore } from "~/stores/auth/index.js"
+import {useI18n} from "vue-i18n";
definePageMeta({
layout: 'default',
- i18n: 'signature.title'
+ i18n: 'signature.protocol.title'
})
const { userInfo, payment } = authStore()
+const $t=useI18n().t
const activeNames = ref([])
const router = useRouter()
const pmblUrl = ref('') // 存储拍卖笔录的URL
diff --git a/app/stores/live/index.js b/app/stores/live/index.js
index ed5402a..5b17721 100644
--- a/app/stores/live/index.js
+++ b/app/stores/live/index.js
@@ -167,16 +167,20 @@ export const liveStore = createGlobalState(() => {
[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]: () =>
+ [TIP_TYPES.SUCCESS_BID]: ()=>{
+ quoteStatus.value=false
+ message.success(createMessageConfig(t('live_room.text4'), '#18A058', t('live_room.text5')))
+ },
+ [TIP_TYPES.ARTWORK_OVER]: () =>{
+ quoteStatus.value=false
message.success(createMessageConfig(
t('live_room.text6'),
'#575757',
t('live_room.text7'),
{ backgroundColor: '#fff', borderColor: '#fff' }
- )),
+ ))
+ },
+
[TIP_TYPES.FAIL_BID]: () =>
message.error(createMessageConfig(
diff --git a/i18n/locales/zh-CN.json b/i18n/locales/zh-CN.json
index 8ea1fd1..d4e1c32 100644
--- a/i18n/locales/zh-CN.json
+++ b/i18n/locales/zh-CN.json
@@ -274,6 +274,9 @@
"fail": "签署失败",
"back": "返回"
},
+ "button": {
+ "agreeAndSign": "同意并签署"
+ },
"loading": "加载中...",
"agreement": {
"notice": "《拍卖公告》",