🐞 fix(ID1001461): 【内部商城】-在购物车内显示订单列表
【【内部商城】-在购物车内显示订单列表】 https://www.tapd.cn/53459131/bugtrace/bugs/view/1153459131001001461
This commit is contained in:
parent
d67d214d46
commit
58d5fd5747
@ -11,6 +11,7 @@ import { useSelector } from '@/reducers/hooks'
|
||||
import { TabBarType } from '@/constants/tabbar'
|
||||
import type { TabBarAction } from '@/reducers/tabBar'
|
||||
import { UseSubscriptionMessage } from '@/use/useCommon'
|
||||
import { debounce } from '@/common/util'
|
||||
|
||||
type IconfontName = Parameters<typeof IconFont>['0']['name']
|
||||
|
||||
@ -41,16 +42,14 @@ const CustomTabBar: FC = () => {
|
||||
const setSelected = (id: TabBarIndexMap[number]['id']) => {
|
||||
dispatch({ type: TabBarType.SET_SELECTED, data: { tabItem, selectedId: id } })
|
||||
}
|
||||
const handleSelectTabItem = (id: TabBarIndexMap[number]['id']) => {
|
||||
return async() => {
|
||||
setSelected(id)
|
||||
if (id === 3) {
|
||||
await openSubscriptionMessage({ scenes: 1 })
|
||||
}
|
||||
console.log(id, 'item')
|
||||
Taro.switchTab({ url: tabItem?.find(item => item.id === id)?.pagePath as string })
|
||||
const handleSelectTabItem = debounce(async(id: TabBarIndexMap[number]['id']) => {
|
||||
setSelected(id)
|
||||
if (id === 3) {
|
||||
await openSubscriptionMessage({ scenes: 1 })
|
||||
}
|
||||
}
|
||||
console.log(id, 'item')
|
||||
Taro.switchTab({ url: tabItem?.find(item => item.id === id)?.pagePath as string })
|
||||
}, 300)
|
||||
|
||||
return (
|
||||
<View className={styles.customTabBar}>
|
||||
@ -60,7 +59,7 @@ const CustomTabBar: FC = () => {
|
||||
<View
|
||||
key={index}
|
||||
className={classname(styles['customTabBar-item'], styles['customTabBar-item-title'], selectedId === item.id ? styles.selected : '')}
|
||||
onClick={handleSelectTabItem(item.id)}
|
||||
onClick={() => handleSelectTabItem(item.id)}
|
||||
>
|
||||
<IconFont name={Number(selectedId) === item.id ? item.selectedIconPath : item.iconPath} size={56} />
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user