订单列表页面完成
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
|
||||
.scroll_main{
|
||||
height: 100%;
|
||||
|
||||
.infinite_scroll{
|
||||
font-size: $font_size_medium;
|
||||
color: $color_font_two;
|
||||
@@ -13,4 +12,7 @@
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
.scrollViewCon {
|
||||
// height: 100%;
|
||||
}
|
||||
}
|
||||
@@ -2,12 +2,14 @@ import { ScrollView, View } from "@tarojs/components"
|
||||
import { memo, ReactNode, useState } from "react"
|
||||
import style from "./index.module.scss"
|
||||
import DotLoading from "@/components/dotLoading"
|
||||
import LoadingCard from "../loadingCard"
|
||||
|
||||
type Params = {
|
||||
styleObj?: Object,
|
||||
selfonScrollToLower?: () => void,
|
||||
hasMore?: false|true,
|
||||
moreStatus?: false|true,
|
||||
statusMore?: 0|1|2, //0:没数据加载,1:下拉加载,2:没有数据
|
||||
children?: ReactNode,
|
||||
lowerThresholdNum?: number,
|
||||
selfOnScrollToUpper?:() => void
|
||||
@@ -35,7 +37,8 @@ export default memo(({
|
||||
paddingBottom = 0,
|
||||
refresherTriggered = false,
|
||||
refresherEnabled = false,
|
||||
moreStatus = true
|
||||
moreStatus = true,
|
||||
statusMore = 0
|
||||
}: Params) => {
|
||||
const scrollToLower = () => {
|
||||
selfonScrollToLower?.()
|
||||
@@ -77,7 +80,7 @@ export default memo(({
|
||||
onRefresherAbort = {() => refresherAbort()}
|
||||
refresherBackground ='#F8F8F8'
|
||||
>
|
||||
<View style={{paddingBottom:paddingBottom + 'rpx'}}>
|
||||
{(statusMore != 0)&&<View style={{paddingBottom:paddingBottom + 'rpx'}} className={style.scrollViewCon}>
|
||||
{children}
|
||||
{moreStatus&&<View className={style.infinite_scroll}>
|
||||
{
|
||||
@@ -85,8 +88,9 @@ export default memo(({
|
||||
<View>没有更多数据了</View>
|
||||
}
|
||||
</View>}
|
||||
</View>
|
||||
|
||||
</View>||
|
||||
<LoadingCard/>
|
||||
}
|
||||
<View className="common_safe_area_y"></View>
|
||||
</ScrollView>
|
||||
|
||||
|
||||
@@ -25,21 +25,19 @@
|
||||
border-radius: 10px;
|
||||
}
|
||||
.num{
|
||||
width: 100px;
|
||||
height: 36px;
|
||||
padding: 5px 10px;
|
||||
font-size: $font_size_min;
|
||||
position: absolute;
|
||||
right:0;
|
||||
bottom: 0;
|
||||
background: rgba($color: #fff, $alpha: 0.3);
|
||||
background: rgba($color: #000, $alpha: 0.3);
|
||||
border-radius: 36px 0px 10px 0px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
line-height: 36px;
|
||||
}
|
||||
}
|
||||
.item_con{
|
||||
padding-left: 15px;
|
||||
padding-left: 20px;
|
||||
font-size: $font_size;
|
||||
flex:1;
|
||||
.title{
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Image, View } from "@tarojs/components"
|
||||
import Taro from "@tarojs/taro"
|
||||
import { goLink } from "@/common/common"
|
||||
import styles from './index.module.scss'
|
||||
import { formatHashTag, formatImgUrl } from "@/common/fotmat"
|
||||
|
||||
type Params = {
|
||||
desStatus?: true|false,
|
||||
@@ -13,17 +14,17 @@ export default ({desStatus = true, productList = []}:Params) => {
|
||||
{productList?.map(item => {
|
||||
return <View className={styles.products_item} onClick={() => goLink(`/pages/details/index?id=${item.id}`)}>
|
||||
<View className={styles.item_img}>
|
||||
<Image src={item.texture_url}/>
|
||||
<Image src={formatImgUrl(item.texture_url)}/>
|
||||
<View className={styles.num}>{item.product_color_count}色</View>
|
||||
</View>
|
||||
<View className={styles.item_con}>
|
||||
<View className={styles.title}><text>{item.code}#</text>{item.name}</View>
|
||||
<View className={styles.title}><text>{formatHashTag(item.code, '')} </text>{item.name}</View>
|
||||
<View className={styles.tag_list}>
|
||||
<View className={styles.tag}>{item.width}</View>
|
||||
<View className={styles.tag}>{item.weight_density}</View>
|
||||
</View>
|
||||
<View className={styles.introduce}>{item.component}</View>
|
||||
{desStatus&&<View className={styles.des}>{item.describe}</View>}
|
||||
{desStatus&&<View className={styles.des}>{item.describe}</View>}
|
||||
</View>
|
||||
</View>
|
||||
})}
|
||||
|
||||
@@ -189,7 +189,7 @@ export default ({show = false, onClose}: param) => {
|
||||
const estimatePrice = useMemo(() => {
|
||||
let count = 0
|
||||
list.map(item => {
|
||||
if(item.select) count += item.sale_price
|
||||
if(item.select) count += item.estimate_amount
|
||||
})
|
||||
return Number(formatPriceDiv(count))
|
||||
},[list])
|
||||
|
||||
@@ -4,6 +4,7 @@ import styles from "./index.module.scss"
|
||||
import classnames from "classnames";
|
||||
import Taro, { useReady } from "@tarojs/taro";
|
||||
import InfiniteScroll from "../infiniteScroll";
|
||||
import LoadingCard from "../loadingCard";
|
||||
|
||||
|
||||
|
||||
@@ -107,6 +108,7 @@ export default memo(({list = [],
|
||||
<View className="common_safe_area_y"></View>
|
||||
</ScrollView>
|
||||
<View className={styles.sideBar_con}>
|
||||
|
||||
<InfiniteScroll hasMore={hasMore} selfonScrollToLower={() => selfOnScrolltolower?.()} refresherTriggered={refresherTriggered} refresherEnabled={true} selfOnRefresherRefresh={() => selfOnRefresherRefresh?.()}>
|
||||
{children}
|
||||
</InfiniteScroll>
|
||||
|
||||
Reference in New Issue
Block a user