微信支付详情页关闭支付mp

This commit is contained in:
lxy 2024-07-15 11:01:07 +08:00
parent b8afb8fe03
commit 56221caf08
2 changed files with 29 additions and 28 deletions

View File

@ -132,11 +132,21 @@
</l-button>
</view>
</block>
<block wx:elif="{{closable}}">
<block wx:elif="{{!closable}}">
<l-button
type="default"
size="long"
bind:lintap="goBack"
>
{{t('common::back')}}
</l-button>
</block>
<block wx:if="{{closable}}">
<l-button
type="error"
size="long"
bind:lintap="closeMp"
style="margin-top:24rpx;"
>
{{t('pay:action.close')}}
</l-button>
@ -150,13 +160,4 @@
bind:lintap="cancelCloseMp"
/>
</block>
<block wx:else>
<l-button
type="default"
size="long"
bind:lintap="goBack"
>
{{t('common::back')}}
</l-button>
</block>
</view>

View File

@ -291,7 +291,24 @@ export default function Render(props: WebComponentProps<EntityDict, 'pay', false
if (pay) {
const { iState, price, entity } = pay;
let BtnPart = startPayable ? (
let BtnPart = closable ? (
<Button
block
color="danger"
onClick={() => {
Modal.confirm({
title: t('cc.title'),
content: t('cc.content'),
onConfirm: async () => {
await execute('close');
onClose();
}
});
}}
>
{t('pay:action.close')}
</Button>
) : startPayable ? (
<Button
block
style={{ backgroundColor: '#04BE02' }}
@ -320,23 +337,6 @@ export default function Render(props: WebComponentProps<EntityDict, 'pay', false
</Button>
</div>
</>
) : closable ? (
<Button
block
color="danger"
onClick={() => {
Modal.confirm({
title: t('cc.title'),
content: t('cc.content'),
onConfirm: async () => {
await execute('close');
onClose();
}
});
}}
>
{t('pay:action.close')}
</Button>
) : (
<Button
block