🎈 perf(微信支付完成):
This commit is contained in:
parent
cf5f794106
commit
3401b77a03
@ -45,7 +45,7 @@ export const SubmitPrepayOrderPayApi = () => {
|
|||||||
*/
|
*/
|
||||||
export const SubmitTradeOrderPayApi = () => {
|
export const SubmitTradeOrderPayApi = () => {
|
||||||
return useRequest({
|
return useRequest({
|
||||||
url: '/lymarket/v1/mall/trade',
|
url: '/v1/mall/trade',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,10 +20,13 @@ $top: 190px;
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
margin-bottom: 32px;
|
||||||
}
|
}
|
||||||
.amount {
|
.amount {
|
||||||
|
height: 182px;
|
||||||
|
line-height: 182px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 25px 0;
|
border-bottom: 3px dashed #daddea;
|
||||||
}
|
}
|
||||||
.playMode {
|
.playMode {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -43,39 +46,28 @@ $top: 190px;
|
|||||||
// background: radial-gradient(circle 20px at left $top, transparent 20px, #fff 20px + 3px) left 0px/60% no-repeat ,
|
// background: radial-gradient(circle 20px at left $top, transparent 20px, #fff 20px + 3px) left 0px/60% no-repeat ,
|
||||||
// radial-gradient(circle 20px at right $top, transparent 20px, #fff 20px + 3px) right 0px/60% no-repeat;
|
// radial-gradient(circle 20px at right $top, transparent 20px, #fff 20px + 3px) right 0px/60% no-repeat;
|
||||||
// filter: drop-shadow(2px 2px 6px rgba(0, 0, 0, .16));
|
// filter: drop-shadow(2px 2px 6px rgba(0, 0, 0, .16));
|
||||||
position: relative;
|
|
||||||
&::before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
border-bottom: 3px dashed #ccc;
|
|
||||||
top: $top;
|
|
||||||
width: calc(100% - 50px);
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
margin: auto;
|
|
||||||
}
|
|
||||||
.payment_list_top_border {
|
|
||||||
height: 32px;
|
|
||||||
width: 100%;
|
|
||||||
background: linear-gradient(215deg, #cde5ff 2%, #cde5ff 2%, #68b4ff 72%);
|
|
||||||
border-radius: 10px 10px 0px 0px;
|
|
||||||
}
|
|
||||||
.payment_list_title {
|
.payment_list_title {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 30px 0 50px 0;
|
padding: 30px 0 50px 0;
|
||||||
font-size: $font_size;
|
font-size: $font_size;
|
||||||
color: $color_font_three;
|
color: $color_font_three;
|
||||||
|
padding: 0 40px;
|
||||||
|
.payment_list_title_price {
|
||||||
|
padding: 40px 0;
|
||||||
|
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
.payment_list_title_price_item {
|
.payment_list_title_price_item {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 0 90px;
|
|
||||||
&:nth-child(1) {
|
&:nth-child(1) {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 32px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text {
|
text {
|
||||||
&:nth-child(2) {
|
&:nth-child(2) {
|
||||||
color: $color_main;
|
color: rgba(0, 0, 0, 0.8);
|
||||||
|
font-size: 28px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -116,7 +108,7 @@ $top: 190px;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.miconfont_more {
|
.miconfont_more {
|
||||||
font-size: 20px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import ScanPay from '../scanPay'
|
|||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
import MCheckbox from '@/components/checkbox'
|
import MCheckbox from '@/components/checkbox'
|
||||||
import Popup from '@/components/popup'
|
import Popup from '@/components/popup'
|
||||||
import { GetOrderPayApi, GetPrepayOrderPayApi, SubmitOrderPayApi, SubmitPrepayOrderPayApi } from '@/api/orderPay'
|
import { GetOrderPayApi, GetPrepayOrderPayApi, SubmitOrderPayApi, SubmitPrepayOrderPayApi, SubmitTradeOrderPayApi } from '@/api/orderPay'
|
||||||
import { formatPriceDiv } from '@/common/fotmat'
|
import { formatPriceDiv } from '@/common/fotmat'
|
||||||
import { alert } from '@/common/common'
|
import { alert } from '@/common/common'
|
||||||
import { ORDER_STATUS, PAYMENT_METHOD, SUBSCRIPTION_MESSAGE_SCENE } from '@/common/enum'
|
import { ORDER_STATUS, PAYMENT_METHOD, SUBSCRIPTION_MESSAGE_SCENE } from '@/common/enum'
|
||||||
@ -184,17 +184,31 @@ const Payment = ({ show = false, onClose, orderInfo, onSubmitSuccess }: Param) =
|
|||||||
const onBankPay = useCallback(() => {
|
const onBankPay = useCallback(() => {
|
||||||
pullBank({ merchId: payInfo.merch_id, custMerchId: payInfo.pay_no })
|
pullBank({ merchId: payInfo.merch_id, custMerchId: payInfo.pay_no })
|
||||||
}, [payInfo])
|
}, [payInfo])
|
||||||
|
|
||||||
|
const { fetchData: SubmitTradeOrderPayData } = SubmitTradeOrderPayApi()
|
||||||
|
useEffect(() => {
|
||||||
|
if (payStatus) {
|
||||||
|
(async() => {
|
||||||
|
const res = await SubmitTradeOrderPayData()
|
||||||
|
if (res.success) {
|
||||||
|
onSubmitSuccess?.()
|
||||||
|
}
|
||||||
|
})()
|
||||||
|
}
|
||||||
|
}, [payStatus])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className={styles.payment_main}>
|
<View className={styles.payment_main}>
|
||||||
<Popup show={show} showTitle={false} onClose={onClose}>
|
<Popup show={show} showTitle={false} onClose={onClose}>
|
||||||
<View className={styles.payment_con}>
|
<View className={styles.payment_con}>
|
||||||
<View className={classnames('iconfont icon-a-moreback', styles.miconfont_title)} onClick={onClose}></View>
|
{/* <View className={classnames('iconfont icon-a-moreback', styles.miconfont_title)} onClick={onClose}></View> */}
|
||||||
<View className={styles.title}>待支付款项</View>
|
<View className={styles.title}>待支付款项</View>
|
||||||
|
|
||||||
|
{payInfo?.delivery_payment_name && <View className={styles.playMode}>已使用{payInfo?.delivery_payment_name}方式付款</View>}
|
||||||
|
<View className={styles.payment_list}>
|
||||||
<View className={styles.amount}>
|
<View className={styles.amount}>
|
||||||
<AmountShow status={2} number={formatPriceDiv(payInfo?.amount_to_be_paid) as number} />
|
<AmountShow status={2} number={formatPriceDiv(payInfo?.amount_to_be_paid) as number} />
|
||||||
</View>
|
</View>
|
||||||
{payInfo?.delivery_payment_name && <View className={styles.playMode}>已使用{payInfo?.delivery_payment_name}方式付款</View>}
|
|
||||||
<View className={styles.payment_list}>
|
|
||||||
<View className={styles.payment_list_top_border}></View>
|
<View className={styles.payment_list_top_border}></View>
|
||||||
<View className={styles.payment_list_title}>
|
<View className={styles.payment_list_title}>
|
||||||
{/* <Text>向商家发起支付</Text> */}
|
{/* <Text>向商家发起支付</Text> */}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user