🎈 perf(ID1000823客服窗口优化):
This commit is contained in:
parent
6b73799112
commit
9d03caee74
@ -16,11 +16,11 @@ interface param {
|
||||
children?: ReactElement | null
|
||||
onShopClick?: () => void
|
||||
showList?: ShowStatus[]
|
||||
messageTitle: string
|
||||
messagePath: string
|
||||
showCart: false|true
|
||||
messageTitle?: string
|
||||
messagePath?: string
|
||||
showCart?: false|true
|
||||
}
|
||||
const MoveBtn = ({ children = null, onShopClick, showList = [], messageTitle = '', messagePath = '', showCart }: param) => {
|
||||
const MoveBtn = ({ children = null, onShopClick, showList = [], messageTitle = '', messagePath = '', showCart = false }: param) => {
|
||||
const userInfo = useSelector(state => state.userInfo)
|
||||
// 获取购物车数据数量
|
||||
const { getShopCount, commonData } = useCommonData()
|
||||
@ -82,7 +82,7 @@ const MoveBtn = ({ children = null, onShopClick, showList = [], messageTitle = '
|
||||
</MovableView>}
|
||||
{onShow('order') && <MovableView
|
||||
onClick={() => set_customer_service_show(true) }
|
||||
className={styles.moveBtn}
|
||||
className={classnames(styles.moveBtn, styles.no_bg_moveBtn)}
|
||||
direction="all"
|
||||
inertia
|
||||
x="630rpx"
|
||||
@ -92,7 +92,7 @@ const MoveBtn = ({ children = null, onShopClick, showList = [], messageTitle = '
|
||||
</MovableView>}
|
||||
{onShow('customer') && <MovableView
|
||||
onClick={onPhone}
|
||||
className={styles.moveBtn}
|
||||
className={classnames(styles.moveBtn, styles.no_bg_moveBtn)}
|
||||
direction="all"
|
||||
inertia
|
||||
x="630rpx"
|
||||
@ -100,7 +100,7 @@ const MoveBtn = ({ children = null, onShopClick, showList = [], messageTitle = '
|
||||
>
|
||||
<Image mode="aspectFit" src={formatImgUrl('/mall/float_button_customer_service.png')} />
|
||||
</MovableView>}
|
||||
<Customer messageTitle={messageTitle} messagePath={messageTitle} show={customer_service_show} onClose={customerClose} />
|
||||
<Customer messageTitle={messageTitle} messagePath={messageTitle} show={customer_service_show} showCard={showCart} onClose={customerClose} />
|
||||
</MovableArea>
|
||||
)
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ const Index = () => {
|
||||
categoryList()
|
||||
}, [])
|
||||
return (
|
||||
<MoveBtn showList={['shop']} onClick={() => setShowShopCart(!showShopCart)}>
|
||||
<MoveBtn showList={['shop']} onShopClick={() => setShowShopCart(!showShopCart)}>
|
||||
<View className={styles.main}>
|
||||
<View className={styles.header}>
|
||||
<View className={styles.search}>
|
||||
|
||||
@ -287,7 +287,7 @@ const Order = () => {
|
||||
[orderDetail],
|
||||
)
|
||||
return (
|
||||
<MoveBtn showList={['order']}>
|
||||
<MoveBtn showList={['order']} messageTitle={orderDetail?.order_no} messagePath={`/pages/order/index?id=${orderDetail?.id}`} showCart>
|
||||
<View className={styles.order_main}>
|
||||
{(orderDetail?.status != SaleorderstatusWaitingPrePayment.value && <OrderState orderInfo={orderDetail} />) || (
|
||||
<AdvanceOrderState orderInfo={orderDetail} onRefresh={refresh} />
|
||||
|
||||
@ -189,7 +189,7 @@ const SalesAfter = () => {
|
||||
if (orderDetail) { formatData() }
|
||||
}, [orderDetail])
|
||||
return (
|
||||
<MoveBtn showList={['customer']}>
|
||||
<MoveBtn showList={['order']} messageTitle={orderDetail?.return_order_no} messagePath={`/pages/salesAfter/index?id=${orderDetail?.id}`} showCart>
|
||||
<View className={styles.order_main}>
|
||||
<OrderState orderInfo={orderDetail} />
|
||||
<AddressInfoDetail orderInfo={orderDetail} onLogistics={onShowLogistics} />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user