diff --git a/src/pages/order/components/payment/index.tsx b/src/pages/order/components/payment/index.tsx index c2677e2..3ce8db0 100644 --- a/src/pages/order/components/payment/index.tsx +++ b/src/pages/order/components/payment/index.tsx @@ -182,10 +182,13 @@ const Payment = ({ show = false, onClose, orderInfo, onSubmitSuccess }: Param) = // 直接微信支付事件 const { fetchData: SubmitTradeOrderPayData } = SubmitTradeOrderPayApi() - const bankCallBack = useCallback(async() => { + const bankCallBack = async() => { + onClose?.() const res = await SubmitTradeOrderPayData({ pay_no: payInfo?.pay_no }) - if (res.success) { onSubmitSuccess?.() } - }, [payInfo]) + if (res.data.trade_collect_status == 3) { + onSubmitSuccess?.() + } + } const { pullBank, payStatus } = usePayBank({ merchId: payInfo?.merch_id, custMerchId: payInfo?.pay_no, callBack: bankCallBack }) return ( diff --git a/src/pages/order/orderList/index.tsx b/src/pages/order/orderList/index.tsx index a3fcd42..f4f0dcc 100644 --- a/src/pages/order/orderList/index.tsx +++ b/src/pages/order/orderList/index.tsx @@ -18,9 +18,6 @@ import { alert } from '@/common/common' const OrderList = () => { const { checkLogin } = useLogin() - useDidShow(async() => { - await checkLogin() - }) // 传递过来的参数 const router = useRouter() @@ -52,6 +49,11 @@ const OrderList = () => { setRefresherTriggeredStatus(() => false) } + useDidShow(() => { + checkLogin() + searchField.status && getOrderList() + }) + // 监听筛选条件变化 useEffect(() => { if (searchField.status != null) { getOrderList() } @@ -200,9 +202,9 @@ const OrderList = () => { }, [orderData], ) - useDidHide(() => { - setSearchField(e => ({ ...e, status: -1 })) - }) + // useDidHide(() => { + // setSearchField(e => ({ ...e, status: -1 })) + // }) return ( diff --git a/src/pages/user/index.module.scss b/src/pages/user/index.module.scss index aab2eea..a6931f6 100644 --- a/src/pages/user/index.module.scss +++ b/src/pages/user/index.module.scss @@ -12,13 +12,18 @@ z-index: 1000; } .user_main__header { - min-height: 315px; width: 100%; background-color: #eff3ff; position: relative; overflow: hidden; + .user_main__header_con { + min-height: 315px; + position: relative; + overflow: hidden; + } .header_bg { width: 100%; + height: 100%; position: absolute; top: 0; left: 0; @@ -26,7 +31,7 @@ .header_img_name { display: flex; position: relative; - padding: 25px 36px 0 36px; + padding: 0 36px 0 36px; z-index: 999; align-items: center; flex: 1; @@ -54,7 +59,7 @@ .header_title { font-size: 28px; color: rgba(0, 0, 0, 0.6); - margin-top: 10px; + margin-top: 8px; } } text { @@ -71,9 +76,8 @@ .header_picture { display: flex; align-items: center; - padding: 5px 10px; - padding-right: 10px; - height: 38px; + padding-right: 20px; + height: 37px; background: #3e6cff; border-radius: 16px; font-size: 24px; @@ -81,8 +85,18 @@ color: #fff; margin-top: 8px; align-self: baseline; + .icon_renzhengchenggong { + width: 37px; + height: 37px; + background-color: #2248c4ff; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + } .header_picture_name { margin-left: 8px; + font-size: 23px; } } } @@ -104,6 +118,7 @@ display: flex; flex-direction: column; align-items: center; + justify-content: space-between; text { &:nth-child(1) { font-size: 42px; @@ -123,7 +138,6 @@ width: 100%; padding: 0 24px; box-sizing: border-box; - margin-top: 24px; .price_bg { position: absolute; top: 0; diff --git a/src/pages/user/index.tsx b/src/pages/user/index.tsx index 12f545f..d5d9b47 100644 --- a/src/pages/user/index.tsx +++ b/src/pages/user/index.tsx @@ -93,34 +93,39 @@ export default () => { {!userInfo?.adminUserInfo?.phone && } - - - - - - {userInfo?.adminUserInfo?.phone ? userInfo?.adminUserInfo?.user_name : '点击登录'} - - {userInfo?.adminUserInfo?.phone || 'Hi,欢迎来到陆盈商城'} + + + + + + + {userInfo?.adminUserInfo?.phone ? userInfo?.adminUserInfo?.user_name : '点击登录'} + + {userInfo?.adminUserInfo?.phone || 'Hi,欢迎来到陆盈商城'} + + {!!userInfo?.adminUserInfo?.company_name && + + {userInfo?.adminUserInfo?.company_name}} + + goLink('/pages/userEdit/index')}> + - {!!userInfo?.adminUserInfo?.company_name && {userInfo?.adminUserInfo?.company_name}} - goLink('/pages/userEdit/index')}> - - - - - goLink('/pages/collection/index')}> - {orderState?.data?.collection_quantity || 0} - 商品收藏 - - - 0 - 活动积分 - - goLink('/pages/inviteCode/index')}> - - 邀请码 + + goLink('/pages/collection/index')}> + {orderState?.data?.collection_quantity || 0} + 商品收藏 + + + 0 + 活动积分 + + goLink('/pages/inviteCode/index')}> + + 邀请码 + + {userInfo?.adminUserInfo?.order_access_status == 3 && @@ -133,7 +138,7 @@ export default () => { } - + diff --git a/src/use/usePayBank.ts b/src/use/usePayBank.ts index a13bd84..5035f81 100644 --- a/src/use/usePayBank.ts +++ b/src/use/usePayBank.ts @@ -16,7 +16,7 @@ export default (props: Param) => { console.log('openstatus::', openStatus) useEffect(() => { Taro.onAppShow((res) => { - if (res?.referrerInfo?.appId == BANk_WX_APPID && !openStatus.current) { + if (res?.referrerInfo?.appId == BANk_WX_APPID && !openStatus.current && props.custMerchId) { console.log('onAppShow::', res) callBack?.(res) const tf = res?.referrerInfo?.extraData?.payStatus == 'success' @@ -24,7 +24,7 @@ export default (props: Param) => { openStatus.current = true } }) - }, []) + }, [props]) const pullBank = () => { console.log('merchId::', `${merchId}&&${custMerchId}`)