forked from gxwebsoft/mp-10550
refactor(share): 更新分享标题和内容
- 将"云上商店"改为"网宿小店"作为分享标题的一部分 -优化商品详情页的分享逻辑- 调整订单确认页的样式 - 移除购物车页面的冗余代码
This commit is contained in:
@@ -28,13 +28,13 @@ function Cart() {
|
||||
|
||||
useShareTimeline(() => {
|
||||
return {
|
||||
title: '购物车 - 云上商店'
|
||||
title: '购物车 - 网宿小店'
|
||||
};
|
||||
});
|
||||
|
||||
useShareAppMessage(() => {
|
||||
return {
|
||||
title: '购物车 - 云上商店',
|
||||
title: '购物车 - 网宿小店',
|
||||
success: function (res) {
|
||||
console.log('分享成功', res);
|
||||
},
|
||||
|
||||
@@ -49,7 +49,7 @@ const BestSellers = () => {
|
||||
// 分享到朋友圈
|
||||
useShareTimeline(() => {
|
||||
return {
|
||||
title: `${goods?.name || '精选商品'} - 云上商店`,
|
||||
title: `${goods?.name || '精选商品'} - 网宿小店`,
|
||||
path: `/shop/goodsDetail/index?id=${goods?.goodsId}`,
|
||||
imageUrl: goods?.image
|
||||
};
|
||||
|
||||
@@ -17,14 +17,14 @@ function Home() {
|
||||
|
||||
useShareTimeline(() => {
|
||||
return {
|
||||
title: '云上商店 - 网宿软件',
|
||||
title: '网宿小店 - 网宿软件',
|
||||
path: `/pages/index/index`
|
||||
};
|
||||
});
|
||||
|
||||
useShareAppMessage(() => {
|
||||
return {
|
||||
title: '云上商店 - 网宿软件',
|
||||
title: '网宿小店 - 网宿软件',
|
||||
path: `/pages/index/index`,
|
||||
success: function (res) {
|
||||
console.log('分享成功', res);
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
@@ -35,8 +35,7 @@ const OrderConfirm = () => {
|
||||
setPayments(paymentList?.map((d, _) => {
|
||||
return {
|
||||
type: d.type,
|
||||
name: d.name,
|
||||
description: d.comments
|
||||
name: d.name
|
||||
}
|
||||
}))
|
||||
setPayment(paymentList[0])
|
||||
@@ -114,12 +113,13 @@ const OrderConfirm = () => {
|
||||
address && (
|
||||
<Cell className={'address-bottom-line'} onClick={() => Taro.navigateTo({url: '/user/address/index'})}>
|
||||
<Space>
|
||||
<Location/>
|
||||
<Location className={'text-gray-500'}/>
|
||||
<View className={'flex flex-col w-full justify-between items-start'}>
|
||||
<Space className={'flex flex-row w-full font-medium'}>
|
||||
<View className={'flex-wrap text-nowrap whitespace-nowrap'}>送至</View>
|
||||
<View style={{width: '64%'}}
|
||||
className={'line-clamp-1 relative'}>{address.province} {address.city} {address.region} {address.address}
|
||||
<Space className={'flex flex-row w-full'}>
|
||||
<View className={'flex-wrap text-nowrap whitespace-nowrap text-gray-500'}>送至</View>
|
||||
<View className={'font-medium text-sm flex items-center w-full'}>
|
||||
<View style={{width: '64%'}}>{address.province} {address.city} {address.region} {address.address}</View>
|
||||
<ArrowRight className={'text-gray-500'} size={14} />
|
||||
</View>
|
||||
</Space>
|
||||
<View className={'pt-1 pb-3 text-gray-500'}>{address.name} {address.phone}</View>
|
||||
@@ -159,12 +159,12 @@ const OrderConfirm = () => {
|
||||
|
||||
<CellGroup>
|
||||
<Cell title={`商品总价(共1件)`} extra={<View className={'font-medium'}>{'¥' + goods.price}</View>}/>
|
||||
{/*<Cell title={'优惠券'} extra={(*/}
|
||||
{/* <View className={'flex justify-between items-center'}>*/}
|
||||
{/* <View className={'text-red-500 text-sm mr-1'}>-¥0.00</View>*/}
|
||||
{/* <ArrowRight className={'text-gray-400'} size={14}/>*/}
|
||||
{/* </View>*/}
|
||||
{/*)}/>*/}
|
||||
<Cell title={'优惠券'} extra={(
|
||||
<View className={'flex justify-between items-center'}>
|
||||
<View className={'text-red-500 text-sm mr-1'}>-¥0.00</View>
|
||||
<ArrowRight className={'text-gray-400'} size={14}/>
|
||||
</View>
|
||||
)}/>
|
||||
{/*<Cell title={'配送费'} extra={'¥' + 10}/>*/}
|
||||
<Cell title={'订单备注'} extra={(
|
||||
<Input placeholder={'选填,请先和商家协商一致'} style={{padding: '0'}}/>
|
||||
|
||||
Reference in New Issue
Block a user