🎈 perf(ID1000721【订单进度咨询】):
This commit is contained in:
parent
566f429051
commit
cb7a1df5b2
@ -254,7 +254,7 @@ export default (props: Params) => {
|
|||||||
sendMessageImg={shareImg}
|
sendMessageImg={shareImg}
|
||||||
sendMessageTitle={productName}
|
sendMessageTitle={productName}
|
||||||
showMessageCard={true}
|
showMessageCard={true}
|
||||||
sendMessagePath={`pages/details/index?id=${productInfo.id}`}></Button>
|
sendMessagePath={`/pages/details/index?id=${productInfo.id}`}></Button>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.buy_cart} onClick={() => setShowCart(true)}>
|
<View className={styles.buy_cart} onClick={() => setShowCart(true)}>
|
||||||
|
|||||||
43
src/pages/order/components/movableAreaBtn/index.module.scss
Normal file
43
src/pages/order/components/movableAreaBtn/index.module.scss
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
.movableItem {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.moveBtn {
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 2px solid #cde5ff;
|
||||||
|
box-shadow: 0px 0px 20px 0px rgba(104, 180, 255, 0.7);
|
||||||
|
background-color: #fff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
z-index: 999;
|
||||||
|
.shop_icon {
|
||||||
|
font-size: 70px;
|
||||||
|
color: $color_main;
|
||||||
|
}
|
||||||
|
.product_num {
|
||||||
|
position: absolute;
|
||||||
|
font-size: 23px;
|
||||||
|
background-color: red;
|
||||||
|
color: #fff;
|
||||||
|
height: 36px;
|
||||||
|
line-height: 36px;
|
||||||
|
padding: 0 6px;
|
||||||
|
border-radius: 72px;
|
||||||
|
min-width: 25px;
|
||||||
|
text-align: center;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
.wxBtn {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
38
src/pages/order/components/movableAreaBtn/index.tsx
Normal file
38
src/pages/order/components/movableAreaBtn/index.tsx
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
import { Button, MovableArea, MovableView, View } from '@tarojs/components'
|
||||||
|
import Taro, { useReady } from '@tarojs/taro'
|
||||||
|
import { ReactElement, useEffect, useLayoutEffect, useRef, useState } from 'react'
|
||||||
|
import classnames from 'classnames'
|
||||||
|
import styles from './index.module.scss'
|
||||||
|
|
||||||
|
type param = {
|
||||||
|
children?: ReactElement | null
|
||||||
|
orderInfo?: any
|
||||||
|
}
|
||||||
|
export default ({ children = null, orderInfo }: param) => {
|
||||||
|
const [screenHeight, setScreenHeight] = useState(0)
|
||||||
|
const screenWidthRef = useRef(0)
|
||||||
|
useLayoutEffect(() => {
|
||||||
|
const res = Taro.getSystemInfoSync()
|
||||||
|
if (res.screenHeight) {
|
||||||
|
let ratio = 750 / res.screenWidth
|
||||||
|
setScreenHeight(res.screenHeight * ratio - 600)
|
||||||
|
screenWidthRef.current = res.screenWidth / 2
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
return (
|
||||||
|
<MovableArea className={styles.movableItem}>
|
||||||
|
{children}
|
||||||
|
<MovableView className={styles.moveBtn} direction='all' inertia={true} x='630rpx' y={screenHeight + 'rpx'}>
|
||||||
|
<View className={classnames('iconfont', 'icon-kefu', styles.shop_icon)}>
|
||||||
|
<Button
|
||||||
|
className={styles.wxBtn}
|
||||||
|
openType='contact'
|
||||||
|
sendMessageTitle={orderInfo?.order_no}
|
||||||
|
showMessageCard={true}
|
||||||
|
sendMessagePath={`/pages/order/index?id=${orderInfo?.id}`}></Button>
|
||||||
|
</View>
|
||||||
|
</MovableView>
|
||||||
|
</MovableArea>
|
||||||
|
)
|
||||||
|
}
|
||||||
@ -1,3 +1,6 @@
|
|||||||
|
.movable_area {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
.order_main {
|
.order_main {
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
background-color: $color_bg_one;
|
background-color: $color_bg_one;
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import Popup from '@/components/popup'
|
|||||||
import SearchInput from '@/components/searchInput'
|
import SearchInput from '@/components/searchInput'
|
||||||
import ShopCart from '@/components/shopCart'
|
import ShopCart from '@/components/shopCart'
|
||||||
import useLogin from '@/use/useLogin'
|
import useLogin from '@/use/useLogin'
|
||||||
import { Text, View } from '@tarojs/components'
|
import { MovableArea, Text, View } from '@tarojs/components'
|
||||||
import Taro, { useDidShow, usePullDownRefresh, useRouter } from '@tarojs/taro'
|
import Taro, { useDidShow, usePullDownRefresh, useRouter } from '@tarojs/taro'
|
||||||
import classnames from 'classnames'
|
import classnames from 'classnames'
|
||||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||||
@ -17,6 +17,7 @@ import AddressInfoDetail from './components/addressInfoDetail'
|
|||||||
import AdvanceOrderState from './components/advanceOrderState'
|
import AdvanceOrderState from './components/advanceOrderState'
|
||||||
import ApplyRefund from './components/applyRefund'
|
import ApplyRefund from './components/applyRefund'
|
||||||
import KindList from './components/kindList'
|
import KindList from './components/kindList'
|
||||||
|
import MovableAreaBtn from './components/movableAreaBtn'
|
||||||
import OrderState from './components/orderState'
|
import OrderState from './components/orderState'
|
||||||
import Payment from './components/payment'
|
import Payment from './components/payment'
|
||||||
import Remark from './components/remark'
|
import Remark from './components/remark'
|
||||||
@ -283,6 +284,7 @@ export default () => {
|
|||||||
const [showScanPayCheck, setShowScanPayCheck] = useState(false)
|
const [showScanPayCheck, setShowScanPayCheck] = useState(false)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<MovableAreaBtn orderInfo={orderDetail}>
|
||||||
<View className={styles.order_main}>
|
<View className={styles.order_main}>
|
||||||
{(orderDetail?.status != SaleorderstatusWaitingPrePayment.value && <OrderState orderInfo={orderDetail} />) || (
|
{(orderDetail?.status != SaleorderstatusWaitingPrePayment.value && <OrderState orderInfo={orderDetail} />) || (
|
||||||
<AdvanceOrderState orderInfo={orderDetail} onRefresh={refresh} />
|
<AdvanceOrderState orderInfo={orderDetail} onRefresh={refresh} />
|
||||||
@ -339,5 +341,6 @@ export default () => {
|
|||||||
<ReturnRecord show={returnRecordShow} onClose={closeReturnRecord} id={orderDetail?.id} />
|
<ReturnRecord show={returnRecordShow} onClose={closeReturnRecord} id={orderDetail?.id} />
|
||||||
<View className='common_safe_area_y'></View>
|
<View className='common_safe_area_y'></View>
|
||||||
</View>
|
</View>
|
||||||
|
</MovableAreaBtn>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user