refactor(share): 更新分享标题和内容

- 将"云上商店"改为"网宿小店"作为分享标题的一部分
-优化商品详情页的分享逻辑- 调整订单确认页的样式
- 移除购物车页面的冗余代码
This commit is contained in:
2025-08-11 16:11:17 +08:00
parent 044c6f8580
commit 20984811d7
5 changed files with 21 additions and 21 deletions

View File

@@ -22,7 +22,7 @@ const GoodsDetail = () => {
const [skus, setSkus] = useState<ShopGoodsSku[]>([]);
const [showSpecSelector, setShowSpecSelector] = useState(false);
const [specAction, setSpecAction] = useState<'cart' | 'buy'>('cart');
const [selectedSku, setSelectedSku] = useState<ShopGoodsSku | null>(null);
// const [selectedSku, setSelectedSku] = useState<ShopGoodsSku | null>(null);
const [loading, setLoading] = useState(false);
const router = Taro.getCurrentInstance().router;
const goodsId = router?.params?.id;
@@ -83,7 +83,7 @@ const GoodsDetail = () => {
// 规格选择确认回调
const handleSpecConfirm = (sku: ShopGoodsSku, quantity: number, action: 'cart' | 'buy') => {
setSelectedSku(sku);
// setSelectedSku(sku);
setShowSpecSelector(false);
if (action === 'cart') {
@@ -180,7 +180,7 @@ const GoodsDetail = () => {
// 分享到朋友圈
useShareTimeline(() => {
return {
title: `${goods?.name || '精选商品'} - 云上商`,
title: `${goods?.name || '精选商品'} - 网宿小`,
path: `/shop/goodsDetail/index?id=${goodsId}`,
imageUrl: goods?.image
};