feat(ID1000945): 【面料优选】,客服入口补充

【【面料优选】,客服入口补充】https://www.tapd.cn/53459131/prong/stories/view/1153459131001000945
This commit is contained in:
xuan 2023-03-15 11:08:03 +08:00
parent 5d42eef85c
commit e5f36e9ca3
8 changed files with 202 additions and 189 deletions

View File

@ -29,8 +29,10 @@ interface param {
playVideo?: boolean
floatVideoFile?: any[]
showFloatVideo?: boolean
customStyles?: React.CSSProperties
}
const MoveBtn = ({ showFloatVideo = false, floatVideoFile = [], playVideo = true, orderObj = {}, children = null, onShopClick, showList = [], messageTitle = '', messagePath = '', showCart = false }: param) => {
const MoveBtn = (props: param) => {
const { customStyles = {}, showFloatVideo = false, floatVideoFile = [], playVideo = false, orderObj = {}, children = null, onShopClick, showList = [], messageTitle = '', messagePath = '', showCart = false } = props
const userInfo = useSelector(state => state.userInfo)
// 获取购物车数据数量
const { getShopCount, commonData } = useCommonData()
@ -127,7 +129,7 @@ const MoveBtn = ({ showFloatVideo = false, floatVideoFile = [], playVideo = true
}
return (
<MovableArea className={styles.movableItem}>
<MovableArea className={styles.movableItem} style={customStyles}>
{children}
{onShow('shop') && <MovableView
onClick={onShopClick}

View File

@ -8,6 +8,7 @@ import { GetProductKindListApi, GetProductListApi } from '@/api/material'
import { dataLoadingStatus } from '@/common/util'
import Product from '@/components/product'
import useLogin from '@/use/useLogin'
import MoveBtn from '@/components/moveBtn'
const PAGE_LIMIT = 10
@ -88,7 +89,8 @@ const Category = () => {
categoryList()
}, [])
return <View className={styles.main}>
return <MoveBtn showList={['order']} customStyles={{ overflow: 'scroll' }}>
<View className={styles.main}>
<View className={styles.header}>
<View className={styles.search}>
<View className={styles.search_input} onClick={() => goLink('/pages/searchList/search')}>
@ -113,5 +115,6 @@ const Category = () => {
</SideBar>
</View>
</View>
</MoveBtn>
}
export default Category

View File

@ -1,6 +1,5 @@
.main {
background-color: #fff;
height: 100vh;
display: flex;
flex-direction: column;
.header {

View File

@ -14,6 +14,7 @@ import IconFont from '@/components/iconfont/iconfont'
import IconText from '@/components/iconText'
import { HOME_ITEM1, HOME_ITEM2, HOME_ITEM3, HOME_ITEM4 } from '@/common/constant'
import { EnumLabelPageJumpApi, GetLabelProductsApi } from '@/api/search'
import MoveBtn from '@/components/moveBtn'
const Index = () => {
useLogin()
@ -134,6 +135,7 @@ const Index = () => {
}
return (
<MoveBtn showList={['order']} customStyles={{ overflow: 'scroll' }}>
<View className={styles.main}>
<View className={styles.header}>
<View className={styles.search}>
@ -199,9 +201,8 @@ const Index = () => {
<View className={styles.more_recommend} onClick={handleMoreRecommend}>{'更多推荐 >'}</View>
</View>
</View>
{/* 真机测试:注释了以下这段也没有布局问题 */}
{/* <View className="common_safe_area_y"></View> */}
</View>
</MoveBtn>
)
}

View File

@ -17,6 +17,7 @@ import LabAndImg from '@/components/LabAndImg'
import IconFont from '@/components/iconfont/iconfont'
import Tag from '@/components/tag'
import { EnumAllLabelApi, GetLabelProductsApi, HomePageJumpApi } from '@/api/search'
import MoveBtn from '@/components/moveBtn'
enum FilterOptions {
RECOMMEND = 1,
@ -201,6 +202,7 @@ export default () => {
}
return (
<MoveBtn showList={['order']} customStyles={{ overflow: 'scroll' }}>
<View className={styles.main}>
<View className={styles.search}>
<Search placeholder="请输入搜索面料" showBtn btnTitle="搜索" clickOnSearch={getSearchData} defaultValue={router.params.key} changeOnSearch={handleInput} debounceTime={300} />
@ -235,7 +237,7 @@ export default () => {
refresherEnabled
selfOnRefresherRefresh={getRefresherRefresh}
refresherTriggered={refresherTriggeredStatus}
safeAreaInsetBottom={false}
safeAreaInsetBottom
selfonScrollToLower={getScrollToLower}
statusMore={statusMore}
>
@ -278,5 +280,6 @@ export default () => {
</View>
</View>
</View>
</MoveBtn>
)
}

View File

@ -3,11 +3,9 @@
align-items: center;
background-color: #fff;
padding: 24px 24px 24px 56px;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
box-sizing: border-box;
position: relative;
z-index: 999;
box-shadow: 0px -5px 20px -8px rgba(0, 0, 0, 0.06);
.select_text {

View File

@ -1,13 +1,20 @@
page {
display: flex;
flex-flow: column nowrap;
height: 100vh;
overflow: hidden;
}
.shop_main {
min-height: 100vh;
background-color: #f8f8f8;
display: flex;
flex-direction: column;
.shop_con {
// flex: 1;
box-sizing: border-box;
height: calc(100vh - 300px);
flex-flow: column nowrap;
justify-content: space-between;
overflow: hidden;
height: 100%;
.shop_con {
flex: 1 1 auto;
box-sizing: border-box;
overflow: scroll;
}
.scroll_view {
padding: 0 24px;

View File

@ -4,15 +4,14 @@ import React, { useCallback, useEffect, useMemo, useRef, useState, useTransition
import ProductBlock from '../productBlock'
import BottomBtn from '../bottomBtn'
import Operation from '../operation'
import type { listType } from '../search'
import Search from '../search'
import NoShop from '../noShop'
import RecommendOpen from '../RecommendOpen'
import styles from './index.module.scss'
import type { listType, saleModeType } from '@/common/enum'
import { DelShoppingCartApi, GetProductColorApi, GetShoppingCartV2Api } from '@/api/shopCart'
import type { ProductType } from '@/context/ContextShop'
import { useCurrenShop } from '@/context/ContextShop'
import type { saleModeType } from '@/common/enum'
import LoadingCard from '@/components/loadingCard'
import { alert, goLink } from '@/common/common'
import InfiniteScroll from '@/components/infiniteScroll'
@ -25,6 +24,7 @@ import { useSelector } from '@/reducers/hooks'
import OrganizationNameModal from '@/components/organizationNameModal'
import useLogin from '@/use/useLogin'
import { companyDetailApi, companyUpdateApi } from '@/api/company'
import MoveBtn from '@/components/moveBtn'
interface FilterType {
abstract_sort_key: -1|1|2|-2
@ -93,7 +93,7 @@ export default () => {
setFilter(e => ({ ...e, sale_mode: val.value }))
}, [])
const logadingStatus = useMemo(() => {
const loadingStatus = useMemo(() => {
return shopState.loading || isPending
}, [shopState.loading, isPending])
@ -224,7 +224,8 @@ export default () => {
}
}, [state.delCommendId])
return <View className={styles.shop_main}>
return <MoveBtn showList={['order']} customStyles={{ overflow: 'scroll' }}>
<View className={styles.shop_main}>
<View className={styles.shop_header}>
<Operation onSelect={onSortChange} onChange={onChangeSetting} />
<View className={styles.search_title}>
@ -232,12 +233,11 @@ export default () => {
</View>
</View>
<View className={styles.shop_con}>
{logadingStatus && <View className={styles.loading_card}><LoadingCard /></View>}
{(!logadingStatus && state.list && state.list.length > 0) && <ScrollView scrollY className={styles.scroll_view}>
{loadingStatus && <View className={styles.loading_card}><LoadingCard /></View>}
{(!loadingStatus && state.list && state.list.length > 0) && <ScrollView scrollY className={styles.scroll_view}>
{state.list?.map(item => (<ProductBlock productItem={item} key={item.product_id} />))}
<View style={{ height: '100rpx' }}></View>
</ScrollView>}
{(!logadingStatus && !state.list) && <NoShop />}
{(!loadingStatus && !state.list) && <NoShop />}
</View>
<BottomBtn onSelect={onSelect} model={settingStatus} onBtnClick={onBtnClick} />
@ -250,6 +250,6 @@ export default () => {
<View>
<RecommendOpen shopId={state.recommendId || 0} onShow={!!state.recommendId} onClose={onRecommendClose} submitSuccess={onSubmitSuccess} />
</View>
<View className="common_safe_area_y"></View>
</View>
</MoveBtn>
}