From 44b3cb10be18049d4615c18279b73332a5d50a49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Tue, 14 Jul 2026 21:03:26 +0800 Subject: [PATCH] =?UTF-8?q?refactor(shop):=20=E7=AE=80=E5=8C=96=E5=95=86?= =?UTF-8?q?=E5=93=81=E8=AF=A6=E6=83=85=E9=A1=B5=E5=AE=A2=E6=9C=8D=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 用户反馈客服功能复杂,改为使用微信原生 open-type="contact" 按钮 - 删除 handleContactService 函数及页面跳转逻辑 - 替换客服图标组件为 Button,使用 openType="contact" 触发联系客服 - 保留客服页面但不再从商品详情页跳转 - 提示 open-type="contact" 需真机预览测试,开发者工具无反应 --- .workbuddy/memory/2026-07-14.md | 7 +++++++ src/pages/shop/product-detail.tsx | 22 +++++++++++++++------- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/.workbuddy/memory/2026-07-14.md b/.workbuddy/memory/2026-07-14.md index bfb31f2..9d3902b 100644 --- a/.workbuddy/memory/2026-07-14.md +++ b/.workbuddy/memory/2026-07-14.md @@ -285,3 +285,10 @@ adapter `/list` 接口忽略分页,一次返回全部收藏;前端 `listShop ### 验证 - 全局搜索确认无其他 `useNavigate` 和 `useReachBottom` 引用 - TypeScript 检查修改文件无错误 + +### 客服功能简化(21:00) +- 用户反馈客服功能太复杂用不了,改为直接用微信原生 `open-type="contact"` 按钮 +- `src/pages/shop/product-detail.tsx`:客服图标从 `View + onClick navigateTo` 改为 `Button openType="contact" sessionFrom="product_detail"` +- 删除了 `handleContactService` 函数和跳转到 `/pages/user/customer-service/index` 的逻辑 +- **注意:`open-type="contact"` 必须真机预览测试,开发者工具中点击无反应** +- `pages/user/customer-service/index` 页面保留但不再从商品详情页跳转 diff --git a/src/pages/shop/product-detail.tsx b/src/pages/shop/product-detail.tsx index a99c62a..b0f0a84 100644 --- a/src/pages/shop/product-detail.tsx +++ b/src/pages/shop/product-detail.tsx @@ -1,5 +1,5 @@ import React, { useState, useEffect, useRef } from 'react' -import { View, Text, Image, ScrollView, Swiper, SwiperItem, RichText } from '@tarojs/components' +import { View, Text, Image, ScrollView, Swiper, SwiperItem, RichText, Button } from '@tarojs/components' import { Tag } from '@nutui/nutui-react-taro' import Taro, { useRouter, useDidShow } from '@tarojs/taro' import { getShopGoods } from '@/api/shop/shopGoods' @@ -193,10 +193,6 @@ const ProductDetailPage: React.FC = () => { Taro.navigateTo({ url: '/pages/shop/cart' }) } - const handleContactService = () => { - Taro.navigateTo({ url: '/pages/user/customer-service/index' }) - } - if (!product) { return ( @@ -454,10 +450,22 @@ const ProductDetailPage: React.FC = () => { 购物车 - + {isFavorite ? '❤️' : '🤍'} 收藏