确认订单
This commit is contained in:
parent
8ebca1e661
commit
2731717a7d
@ -7,6 +7,7 @@ import InfiniteScroll from "@/components/infiniteScroll";
|
|||||||
import styles from "./index.module.scss"
|
import styles from "./index.module.scss"
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import Taro from "@tarojs/taro";
|
import Taro from "@tarojs/taro";
|
||||||
|
import { goLink } from "@/common/common";
|
||||||
|
|
||||||
type param = {
|
type param = {
|
||||||
show?: true|false,
|
show?: true|false,
|
||||||
@ -149,7 +150,7 @@ export default ({show = false, onClose}: param) => {
|
|||||||
<View className={styles.price_real}><text>¥</text>200</View>
|
<View className={styles.price_real}><text>¥</text>200</View>
|
||||||
<View className={styles.price_forecast}>预估金额</View>
|
<View className={styles.price_forecast}>预估金额</View>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.goPay}>
|
<View className={styles.goPay} onClick={() => goLink('/pages/order/index')}>
|
||||||
去结算
|
去结算
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
@ -1,16 +1,28 @@
|
|||||||
import { Text, View } from "@tarojs/components"
|
import { Text, View } from "@tarojs/components"
|
||||||
|
import { useCallback, useEffect, useMemo } from "react"
|
||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
type Param = {
|
type Param = {
|
||||||
style?: Object
|
style?: Object,
|
||||||
|
number?: number
|
||||||
}
|
}
|
||||||
export default ({style}:Param) => {
|
export default ({style, number = 0}:Param) => {
|
||||||
|
const priceDom = useCallback(() => {
|
||||||
|
let res = number.toFixed(2).split('.')
|
||||||
|
let int_num = parseInt(res[0]).toLocaleString()
|
||||||
|
let decimals_num = res[1]
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Text>¥</Text>
|
||||||
|
<Text>{int_num}</Text>
|
||||||
|
<Text>.{decimals_num}</Text>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}, [number])
|
||||||
return (
|
return (
|
||||||
<View className={styles.order_price}>
|
<View className={styles.order_price}>
|
||||||
<Text className={styles.order_price_text}>预估金额</Text>
|
<Text className={styles.order_price_text}>预估金额</Text>
|
||||||
<View className={styles.order_price_num} style={style}>
|
<View className={styles.order_price_num} style={style}>
|
||||||
<Text>¥</Text>
|
{priceDom()}
|
||||||
<Text>6,001</Text>
|
|
||||||
<Text>.00</Text>
|
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
|
@ -202,6 +202,10 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
.order_number_desc{
|
||||||
|
font-size: $font_size_medium;
|
||||||
|
color: $color_font_two;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,9 +1,12 @@
|
|||||||
import { Text, View } from "@tarojs/components"
|
import { Text, View } from "@tarojs/components"
|
||||||
import classnames from "classnames";
|
import classnames from "classnames";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
import EstimatedAmount from "./components/estimatedAmount";
|
import EstimatedAmount from "./components/estimatedAmount";
|
||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
|
const [price, setPrice] = useState(123000.33)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className={styles.order_main}>
|
<View className={styles.order_main}>
|
||||||
<View className={styles.order_title}>
|
<View className={styles.order_title}>
|
||||||
@ -88,7 +91,7 @@ import styles from './index.module.scss'
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.order_estimated_amount}>
|
<View className={styles.order_estimated_amount}>
|
||||||
<EstimatedAmount/>
|
<EstimatedAmount number={price}/>
|
||||||
<View className={styles.order_price_des}>(按照25kg/条, 预估金额)</View>
|
<View className={styles.order_price_des}>(按照25kg/条, 预估金额)</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@ -98,7 +101,10 @@ import styles from './index.module.scss'
|
|||||||
<View className={classnames(styles.miconfont, 'iconfont icon-jiantou')}></View>
|
<View className={classnames(styles.miconfont, 'iconfont icon-jiantou')}></View>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.submit_order}>
|
<View className={styles.submit_order}>
|
||||||
<EstimatedAmount style={{color:'#007AFF'}}/>
|
<View className={styles.submit_order_number}>
|
||||||
|
<EstimatedAmount style={{color:'#007AFF'}} number={price}/>
|
||||||
|
<View className={styles.order_number_desc}>2种面料,6种颜色,共6条</View>
|
||||||
|
</View>
|
||||||
<View className={styles.order_btn}>提交订单</View>
|
<View className={styles.order_btn}>提交订单</View>
|
||||||
</View>
|
</View>
|
||||||
<View className="common_safe_area_y"></View>
|
<View className="common_safe_area_y"></View>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user