🎈 perf(优化我的页面样式):
This commit is contained in:
parent
b8a7d5634f
commit
25c0ca3ad3
@ -182,10 +182,13 @@ const Payment = ({ show = false, onClose, orderInfo, onSubmitSuccess }: Param) =
|
|||||||
|
|
||||||
// 直接微信支付事件
|
// 直接微信支付事件
|
||||||
const { fetchData: SubmitTradeOrderPayData } = SubmitTradeOrderPayApi()
|
const { fetchData: SubmitTradeOrderPayData } = SubmitTradeOrderPayApi()
|
||||||
const bankCallBack = useCallback(async() => {
|
const bankCallBack = async() => {
|
||||||
|
onClose?.()
|
||||||
const res = await SubmitTradeOrderPayData({ pay_no: payInfo?.pay_no })
|
const res = await SubmitTradeOrderPayData({ pay_no: payInfo?.pay_no })
|
||||||
if (res.success) { onSubmitSuccess?.() }
|
if (res.data.trade_collect_status == 3) {
|
||||||
}, [payInfo])
|
onSubmitSuccess?.()
|
||||||
|
}
|
||||||
|
}
|
||||||
const { pullBank, payStatus } = usePayBank({ merchId: payInfo?.merch_id, custMerchId: payInfo?.pay_no, callBack: bankCallBack })
|
const { pullBank, payStatus } = usePayBank({ merchId: payInfo?.merch_id, custMerchId: payInfo?.pay_no, callBack: bankCallBack })
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -18,9 +18,6 @@ import { alert } from '@/common/common'
|
|||||||
|
|
||||||
const OrderList = () => {
|
const OrderList = () => {
|
||||||
const { checkLogin } = useLogin()
|
const { checkLogin } = useLogin()
|
||||||
useDidShow(async() => {
|
|
||||||
await checkLogin()
|
|
||||||
})
|
|
||||||
|
|
||||||
// 传递过来的参数
|
// 传递过来的参数
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
@ -52,6 +49,11 @@ const OrderList = () => {
|
|||||||
setRefresherTriggeredStatus(() => false)
|
setRefresherTriggeredStatus(() => false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
useDidShow(() => {
|
||||||
|
checkLogin()
|
||||||
|
searchField.status && getOrderList()
|
||||||
|
})
|
||||||
|
|
||||||
// 监听筛选条件变化
|
// 监听筛选条件变化
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (searchField.status != null) { getOrderList() }
|
if (searchField.status != null) { getOrderList() }
|
||||||
@ -200,9 +202,9 @@ const OrderList = () => {
|
|||||||
},
|
},
|
||||||
[orderData],
|
[orderData],
|
||||||
)
|
)
|
||||||
useDidHide(() => {
|
// useDidHide(() => {
|
||||||
setSearchField(e => ({ ...e, status: -1 }))
|
// setSearchField(e => ({ ...e, status: -1 }))
|
||||||
})
|
// })
|
||||||
return (
|
return (
|
||||||
<View className={styles.order_list_main}>
|
<View className={styles.order_list_main}>
|
||||||
<View className={styles.title}>
|
<View className={styles.title}>
|
||||||
|
|||||||
@ -12,13 +12,18 @@
|
|||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
}
|
}
|
||||||
.user_main__header {
|
.user_main__header {
|
||||||
min-height: 315px;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: #eff3ff;
|
background-color: #eff3ff;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
.user_main__header_con {
|
||||||
|
min-height: 315px;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
.header_bg {
|
.header_bg {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
@ -26,7 +31,7 @@
|
|||||||
.header_img_name {
|
.header_img_name {
|
||||||
display: flex;
|
display: flex;
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 25px 36px 0 36px;
|
padding: 0 36px 0 36px;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@ -54,7 +59,7 @@
|
|||||||
.header_title {
|
.header_title {
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
color: rgba(0, 0, 0, 0.6);
|
color: rgba(0, 0, 0, 0.6);
|
||||||
margin-top: 10px;
|
margin-top: 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text {
|
text {
|
||||||
@ -71,9 +76,8 @@
|
|||||||
.header_picture {
|
.header_picture {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 5px 10px;
|
padding-right: 20px;
|
||||||
padding-right: 10px;
|
height: 37px;
|
||||||
height: 38px;
|
|
||||||
background: #3e6cff;
|
background: #3e6cff;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
@ -81,8 +85,18 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
align-self: baseline;
|
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 {
|
.header_picture_name {
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
|
font-size: 23px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -104,6 +118,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
text {
|
text {
|
||||||
&:nth-child(1) {
|
&:nth-child(1) {
|
||||||
font-size: 42px;
|
font-size: 42px;
|
||||||
@ -123,7 +138,6 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0 24px;
|
padding: 0 24px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin-top: 24px;
|
|
||||||
.price_bg {
|
.price_bg {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|||||||
@ -93,34 +93,39 @@ export default () => {
|
|||||||
<View className={styles.user_main}>
|
<View className={styles.user_main}>
|
||||||
{!userInfo?.adminUserInfo?.phone && <Button className={styles.getPhoneButton} openType="getPhoneNumber" onGetPhoneNumber={mGetPhoneNumber}></Button>}
|
{!userInfo?.adminUserInfo?.phone && <Button className={styles.getPhoneButton} openType="getPhoneNumber" onGetPhoneNumber={mGetPhoneNumber}></Button>}
|
||||||
<View className={styles.user_main__header}>
|
<View className={styles.user_main__header}>
|
||||||
<View className={styles.header_img_name}>
|
<View className={styles.user_main__header_con}>
|
||||||
<View className={styles.header_img}>
|
<View className={styles.header_img_name}>
|
||||||
<Image className={styles.header_img_src} mode="aspectFill" src={`${userInfo?.adminUserInfo?.avatar_url}`} />
|
<View className={styles.header_img}>
|
||||||
</View>
|
<Image className={styles.header_img_src} mode="aspectFill" src={`${userInfo?.adminUserInfo?.avatar_url}`} />
|
||||||
<View className={styles.header_name}>
|
</View>
|
||||||
<Text>{userInfo?.adminUserInfo?.phone ? userInfo?.adminUserInfo?.user_name : '点击登录'}</Text>
|
<View className={styles.header_name}>
|
||||||
<View className={styles['arcd-info-left-phone']}>
|
<Text>{userInfo?.adminUserInfo?.phone ? userInfo?.adminUserInfo?.user_name : '点击登录'}</Text>
|
||||||
<View className={styles.header_title}> {userInfo?.adminUserInfo?.phone || 'Hi,欢迎来到陆盈商城'}</View>
|
<View className={styles['arcd-info-left-phone']}>
|
||||||
|
<View className={styles.header_title}> {userInfo?.adminUserInfo?.phone || 'Hi,欢迎来到陆盈商城'}</View>
|
||||||
|
</View>
|
||||||
|
{!!userInfo?.adminUserInfo?.company_name && <View className={styles.header_picture} >
|
||||||
|
<View className={styles.icon_renzhengchenggong}><IconFont name="icon-renzhengchenggong" size={24} /></View>
|
||||||
|
<View className={styles.header_picture_name}>{userInfo?.adminUserInfo?.company_name}</View></View>}
|
||||||
|
</View>
|
||||||
|
<View className={styles.header_setting} onClick={() => goLink('/pages/userEdit/index')}>
|
||||||
|
<IconFont name="icon-shezhi" size={50} />
|
||||||
</View>
|
</View>
|
||||||
{!!userInfo?.adminUserInfo?.company_name && <View className={styles.header_picture} ><IconFont name="icon-renzhengchenggong" size={30} /><View className={styles.header_picture_name}>{userInfo?.adminUserInfo?.company_name}</View></View>}
|
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.header_setting} onClick={() => goLink('/pages/userEdit/index')}>
|
<View className={styles.header_count}>
|
||||||
<IconFont name="icon-shezhi" size={50} />
|
<View className={styles.header_count__item} onClick={() => goLink('/pages/collection/index')}>
|
||||||
</View>
|
<Text>{orderState?.data?.collection_quantity || 0}</Text>
|
||||||
</View>
|
<Text>商品收藏</Text>
|
||||||
<View className={styles.header_count}>
|
</View>
|
||||||
<View className={styles.header_count__item} onClick={() => goLink('/pages/collection/index')}>
|
<View className={styles.header_count__item} onClick={integral}>
|
||||||
<Text>{orderState?.data?.collection_quantity || 0}</Text>
|
<Text>0</Text>
|
||||||
<Text>商品收藏</Text>
|
<Text>活动积分</Text>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.header_count__item} onClick={integral}>
|
<View className={styles.header_count__item} onClick={() => goLink('/pages/inviteCode/index')}>
|
||||||
<Text>0</Text>
|
<IconFont name="icon-erweima" size={50} />
|
||||||
<Text>活动积分</Text>
|
<Text>邀请码</Text>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.header_count__item} onClick={() => goLink('/pages/inviteCode/index')}>
|
|
||||||
<IconFont name="icon-erweima" size={50} />
|
|
||||||
<Text>邀请码</Text>
|
|
||||||
</View>
|
</View>
|
||||||
|
<Image className={styles.header_bg} src={formatImgUrl('/mall/user_header_bg.png', '')} mode="aspectFit"></Image>
|
||||||
</View>
|
</View>
|
||||||
{userInfo?.adminUserInfo?.order_access_status == 3 && <View className={styles.price_count}>
|
{userInfo?.adminUserInfo?.order_access_status == 3 && <View className={styles.price_count}>
|
||||||
<View className={styles.price_count_list}>
|
<View className={styles.price_count_list}>
|
||||||
@ -133,7 +138,7 @@ export default () => {
|
|||||||
<Image className={styles.price_bg} src={formatImgUrl('/mall/price_bg.png', '')} mode="aspectFit"></Image>
|
<Image className={styles.price_bg} src={formatImgUrl('/mall/price_bg.png', '')} mode="aspectFit"></Image>
|
||||||
</View>
|
</View>
|
||||||
</View>}
|
</View>}
|
||||||
<Image className={styles.header_bg} src={formatImgUrl('/mall/user_header_bg.png', '')} mode="aspectFit"></Image>
|
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.order_count}>
|
<View className={styles.order_count}>
|
||||||
<View className={styles.order_count__title}>
|
<View className={styles.order_count__title}>
|
||||||
|
|||||||
@ -16,7 +16,7 @@ export default (props: Param) => {
|
|||||||
console.log('openstatus::', openStatus)
|
console.log('openstatus::', openStatus)
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
Taro.onAppShow((res) => {
|
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)
|
console.log('onAppShow::', res)
|
||||||
callBack?.(res)
|
callBack?.(res)
|
||||||
const tf = res?.referrerInfo?.extraData?.payStatus == 'success'
|
const tf = res?.referrerInfo?.extraData?.payStatus == 'success'
|
||||||
@ -24,7 +24,7 @@ export default (props: Param) => {
|
|||||||
openStatus.current = true
|
openStatus.current = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, [])
|
}, [props])
|
||||||
|
|
||||||
const pullBank = () => {
|
const pullBank = () => {
|
||||||
console.log('merchId::', `${merchId}&&${custMerchId}`)
|
console.log('merchId::', `${merchId}&&${custMerchId}`)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user