fix(ticket): 修复编辑模式下按钮文本显示问题
- 在无可用票据条件判断中添加编辑模式检查 - 根据编辑模式动态显示按钮文本为"确定修改"或"确定下单" - 确保编辑模式下购买按钮也显示正确的操作文本
This commit is contained in:
@@ -1109,7 +1109,7 @@ const OrderConfirm = () => {
|
||||
setTicketPopupVisible(true)
|
||||
}}
|
||||
/>
|
||||
{noUsableTickets && (
|
||||
{(noUsableTickets && !isEditMode) && (
|
||||
<Cell
|
||||
title={<Text className="text-gray-500">还没有购买水票</Text>}
|
||||
description="购买水票后即可在这里直接下单送水"
|
||||
@@ -1186,7 +1186,7 @@ const OrderConfirm = () => {
|
||||
<Empty description="暂无可用水票" />
|
||||
<View className="mt-4 flex justify-center">
|
||||
<Button type="primary" onClick={goBuyTickets}>
|
||||
确定下单
|
||||
{isEditMode ? '确定修改' : '确定下单'}
|
||||
</Button>
|
||||
</View>
|
||||
</View>
|
||||
@@ -1268,13 +1268,13 @@ const OrderConfirm = () => {
|
||||
</View>
|
||||
</div>
|
||||
<div className={'buy-btn mx-4'}>
|
||||
{noUsableTickets ? (
|
||||
<Button type="primary" size="large" onClick={goBuyTickets}>
|
||||
确定下单
|
||||
</Button>
|
||||
) : (
|
||||
<Button
|
||||
type="success"
|
||||
{noUsableTickets ? (
|
||||
<Button type="primary" size="large" onClick={goBuyTickets}>
|
||||
{isEditMode ? '确定修改' : '确定下单'}
|
||||
</Button>
|
||||
) : (
|
||||
<Button
|
||||
type="success"
|
||||
size="large"
|
||||
loading={submitLoading || deliveryRangeChecking}
|
||||
disabled={
|
||||
|
||||
Reference in New Issue
Block a user