From 9f53f147ee2065430b6cc67798ebcc91a0f38760 Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Fri, 8 May 2026 16:09:19 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=A7=BB=E9=99=A4=E6=89=80=E6=9C=89?= =?UTF-8?q?=E8=B0=83=E8=AF=95=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 1 - common/js/ai-service.js | 21 -------- common/js/config.js | 1 - common/js/customer-service.js | 27 ++-------- common/js/diy.js | 1 - common/js/goods_detail_base.js | 1 - common/js/html-parser.js | 2 - common/js/map/openMap.js | 3 -- common/js/navigation.js | 4 -- common/js/socketTest.js | 22 -------- common/js/uniapp.utils.js | 1 - common/js/util.js | 52 +++++++------------ common/js/wx-jssdk.js | 1 - components-diy/diy-audio.vue | 9 +--- components-diy/diy-channel-list.vue | 14 ----- components-diy/diy-channel-video.vue | 1 - components-diy/diy-digit.vue | 1 - components-diy/diy-graphic-nav.vue | 1 - components-diy/diy-group.vue | 5 -- components-diy/diy-live.vue | 4 +- components-diy/diy-merch-list.vue | 5 +- components-diy/diy-payment-qrcode.vue | 2 - components-diy/diy-tab.vue | 5 +- components-diy/diy-video-list.vue | 3 -- components-diy/diy-video.vue | 11 ---- components-diy/js/wechat-channel.js | 5 +- components-diy/minx.js | 1 - components/hover-nav/hover-nav.vue | 1 - components/uv-count-to/uv-count-to.vue | 1 - components/wxwork-contact/wxwork-contact.vue | 2 - pages/index/public/js/index.js | 2 - .../_components/goods-detail-view/detail.js | 2 - .../pengpai-fadein-out/pengpai-fadein-out.vue | 3 +- pages_goods/public/js/cart.js | 1 - pages_goods/public/js/list.js | 1 - .../_components/common-payment/payment.js | 3 -- pages_order/public/js/orderMethod.js | 1 - pages_promotion/fenxiao/index.vue | 5 +- .../fenxiao/public/js/goods_list.js | 10 ++-- pages_promotion/fenxiao/withdraw_apply.vue | 5 +- pages_promotion/merch/merchcategory.vue | 6 +-- pages_promotion/merch/public/edit.js | 7 --- pages_promotion/merch/public/js/list.js | 5 +- pages_tool/agreement/contenr.vue | 5 +- pages_tool/ai-chat/ai-chat-message.vue | 21 ++------ pages_tool/ai-chat/index.vue | 22 -------- pages_tool/cases/index.vue | 14 ----- pages_tool/files/list.vue | 5 -- pages_tool/member/address.vue | 5 +- pages_tool/member/apply_withdrawal.vue | 5 +- pages_tool/member/footprint.vue | 2 - pages_tool/member/public/js/common.js | 1 - pages_tool/order/refund.vue | 1 - pages_tool/order/refund_batch.vue | 1 - pages_tool/seal/medium/detail.vue | 3 -- pages_tool/seal/structure.vue | 1 - pages_tool/vr/index.vue | 1 - store/index.js | 2 - 58 files changed, 51 insertions(+), 297 deletions(-) diff --git a/App.vue b/App.vue index 09f2e4e..e638aa6 100644 --- a/App.vue +++ b/App.vue @@ -266,7 +266,6 @@ imgUrl: this.$util.img(share_data.imgUrl) }, res => { - console.log(res); } ); } diff --git a/common/js/ai-service.js b/common/js/ai-service.js index a1ae59f..9bda135 100644 --- a/common/js/ai-service.js +++ b/common/js/ai-service.js @@ -40,15 +40,6 @@ export default { */ async sendMessage(message, options = {}) { try { - // 调试:打印关键状态 - console.log('[AI Service] sendMessage 开始执行'); - console.log('[AI Service] store.state.memberInfo:', store.state.memberInfo); - console.log('[AI Service] uniacid:', this.getUniacid()); - console.log('[AI Service] currentConversationId:', this.getConversationId()); - - const aiConfig = store.getters.globalAIKefuConfig; - console.log('[AI Service] aiConfig:', aiConfig); - const params = { url: '/api/kefu/chat', data: { @@ -66,16 +57,11 @@ export default { } }; - console.log('[AI Service] 发送请求到:', params.url); - console.log('[AI Service] 请求参数:', JSON.stringify(params.data, null, 2)); - const response = await http.sendRequest({ ...params, async: false }); - console.log('[AI Service] 收到响应:', response); - const result = this.handleResponse(response); if (result.conversationId) { this.setConversationId(result.conversationId); @@ -103,7 +89,6 @@ export default { const match = Config.baseUrl.match(/^(?:https?:\/\/|wss?:\/\/)([^\/\s:]+)/); const domain = match ? match[1] : ''; const wssUrl = `wss://${domain}/ws/aikefu`; - console.log(`wssUrl = ${wssUrl}`); const socketTask = wx.connectSocket({ url: wssUrl, header: {} @@ -114,7 +99,6 @@ export default { let isAuthenticated = false; socketTask.onOpen(() => { - console.log('WebSocket 连接成功,开始认证...'); socketTask.send({ data: JSON.stringify({ action: 'auth', @@ -128,10 +112,8 @@ export default { socketTask.onMessage((res) => { try { const data = JSON.parse(res.data); - console.log('收到 WebSocket 消息:', data); if (data.type === 'auth_success') { - console.log('认证成功,发送聊天消息...'); isAuthenticated = true; socketTask.send({ data: JSON.stringify({ @@ -173,7 +155,6 @@ export default { // 可选:处理 done else if (data.type === 'done') { - console.log('对话完成:', data); } } catch (e) { @@ -189,7 +170,6 @@ export default { }); socketTask.onClose(() => { - console.log('WebSocket 连接已关闭'); }); const timeout = setTimeout(() => { @@ -388,7 +368,6 @@ export default { async: false, data: {} }); - console.log('/api/kefu/health response', response); const available = [response?.data?.status, response?.data?.components?.ai_service_config?.status] .filter(item => item === 'healthy').length > 0; return { diff --git a/common/js/config.js b/common/js/config.js index ec8d65b..06779c6 100644 --- a/common/js/config.js +++ b/common/js/config.js @@ -59,7 +59,6 @@ if (process?.env?.NODE_ENV === 'development') { // 如果本地配置文件不存在或加载失败,保持使用默认配置 // 只在开发模式下输出提示信息 // #ifdef WEB - console.log('本地配置文件 .local.config.js 不存在,使用默认配置'); // #endif } } diff --git a/common/js/customer-service.js b/common/js/customer-service.js index 78d472e..288770f 100644 --- a/common/js/customer-service.js +++ b/common/js/customer-service.js @@ -32,7 +32,6 @@ export class CustomerService { // 优先级:外部传入 > vuex store > 空对象 const servicerConfig = this.externalConfig || this.vm.$store.state.servicerConfig || {}; - console.log(`【实时客服配置】`, servicerConfig); let platformConfig = null; @@ -167,8 +166,6 @@ export class CustomerService { } const config = this.getPlatformConfig(); - console.log('【当前客服配置】', config); - console.log('【客服类型】', config.type); const { niushop = {}, sendMessageTitle = '', sendMessagePath = '', sendMessageImg = '' } = options; @@ -180,31 +177,24 @@ export class CustomerService { // 核心路由:根据 type 决定行为 switch (config.type) { case 'aikefu': - console.log('【跳转 AI 客服】目标路径: /pages_tool/ai-chat/index'); this.openDifyService(); break; case 'wxwork': - console.log('【跳转企业微信客服】'); this.openWxworkService(false, config, options); break; case 'third': - console.log('【跳转第三方客服】'); this.openThirdService(config); break; case 'miniprogram': - console.log('【跳转第三方小程序客服】'); this.openThirdService(config); break; case 'niushop': - console.log('【跳转牛商客服】'); this.openNiushopService(niushop); break; case 'weapp': - console.log('【跳转微信官方客服】'); this.openWeappService(config, options); break; case 'aliapp': - console.log('【跳转支付宝客服】'); this.openAliappService(config); break; default: @@ -225,7 +215,7 @@ export class CustomerService { wx.navigateToMiniProgram({ appId: 'wxeb490c6f9b154ef9', path: `pages/contacts/externalContactDetail?url=${encodeURIComponent(wxworkConfig.contact_url)}`, - success: () => console.log('跳转企业微信成功'), + success: () => {}, fail: (err) => { console.error('跳转企业微信失败:', err); this.fallbackToOriginalService(); @@ -262,24 +252,20 @@ export class CustomerService { } openThirdService(config) { - console.log('【第三方客服配置】', config); - console.log('【配置字段】', Object.keys(config)); // 支持多种可能的字段名 const miniAppId = config.mini_app_id || config.miniAppId || config.appid || config.appId || config.app_id; const miniAppPath = config.mini_app_path || config.miniAppPath || config.path || config.page_path || ''; - console.log('【解析后的小程序配置】AppID:', miniAppId, 'Path:', miniAppPath); + // 优先处理第三方微信小程序客服 if (miniAppId) { - console.log('【跳转第三方小程序】AppID:', miniAppId, 'Path:', miniAppPath); // #ifdef MP-WEIXIN wx.navigateToMiniProgram({ appId: miniAppId, path: miniAppPath, success: () => { - console.log('【跳转第三方小程序成功】'); }, fail: (err) => { console.error('【跳转第三方小程序失败】', err); @@ -295,7 +281,6 @@ export class CustomerService { // 处理第三方链接客服 if (config.third_url) { - console.log('【跳转第三方链接】', config.third_url); // #ifdef H5 window.location.href = config.third_url; // #endif @@ -326,7 +311,7 @@ export class CustomerService { // 此方法仅用于自定义跳转(如 useOfficial: false) if (config.useOfficial !== false) { // 不做任何事,应由