From 300019a7fc0afbfcc2d1c25510e32d863296036f Mon Sep 17 00:00:00 2001 From: hejin Date: Wed, 13 Aug 2025 22:37:20 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=81=8A=E5=A4=A9=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E7=9A=84=E6=98=BE=E7=A4=BA=EF=BC=8C=E5=92=8C=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E9=A1=B5=E9=9D=A2=E7=9A=84=E5=86=85=E5=AE=B9=E7=9A=84?= =?UTF-8?q?=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layouts/default.vue | 12 ++++++++---- nuxt.config.js | 3 +-- pages/index.vue | 6 +++++- pages/products/_id.vue | 5 +++++ pages/separate.vue | 6 +++++- 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/layouts/default.vue b/layouts/default.vue index 7323468..da5de05 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -32,18 +32,22 @@ export default { } }, created() { - + }, - mounted(){ + beforeMount(){ window.difyChatbotConfig = { token: 'BC985VI4DnedSaIQ', baseUrl: 'http://101.245.103.204', systemVariables: { // user_id: 'YOU CAN DEFINE USER ID HERE', // conversation_id: 'YOU CAN DEFINE CONVERSATION ID HERE, IT MUST BE A VALID UUID', - }, + } } - console.log('执行完成') + let a = document.createElement('script'); + a.setAttribute('src', 'http://101.245.103.204/embed.min.js'); + a.setAttribute('defer', true); + a.setAttribute('id', 'BC985VI4DnedSaIQ'); + document.body.appendChild(a); }, methods: { diff --git a/nuxt.config.js b/nuxt.config.js index 999f9b1..ca66cae 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -32,7 +32,6 @@ export default { ], script: [ // { type:"text/javascript" , src: 'https://api.map.baidu.com/api?v=1.0&type=webgl&ak=otBoKESzaUj1nGjWiehnCP3AUyRKgikx'} - {type:"text/javascript",src:'http://101.245.103.204/embed.min.js',id:"BC985VI4DnedSaIQ",defer:true} ] }, env: { @@ -157,7 +156,7 @@ export default { ] }, router: { - middleware: ['i18n', 'footer', 'header', 'burying-point'] + middleware: ['burying-point','i18n', 'footer', 'header'] }, /* ** Build configuration diff --git a/pages/index.vue b/pages/index.vue index 53f0de3..670b660 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -26,7 +26,11 @@
{{ $t('index.companyProfile') }}

{{ $t('index.corporateName') }}

-
+
+