diff --git a/app/(tabs)/rights.tsx b/app/(tabs)/rights.tsx index 52e9423..726b7e5 100644 --- a/app/(tabs)/rights.tsx +++ b/app/(tabs)/rights.tsx @@ -116,6 +116,7 @@ export default function Rights() { // 初始化获取产品项 useEffect(() => { + console.log('subscriptions', subscriptions); setLoading(true); getPAy().then(({ bestValue, payInfo }) => { setPayType(bestValue?.product_code) @@ -134,7 +135,7 @@ export default function Rights() { if (historyIds?.includes(payType)) { setConfirmLoading(false); setTimeout(() => { - alert("您已购买过该权益,无需重复购买"); + alert(t('personal:rights.againError')); }, 0); return } diff --git a/i18n/locales/en/personal.json b/i18n/locales/en/personal.json index 95d6e12..7508e33 100644 --- a/i18n/locales/en/personal.json +++ b/i18n/locales/en/personal.json @@ -114,6 +114,7 @@ "apple": "Apple Pay", "confirm": "Confirm", "cancel": "Cancel", - "confirmLoading": "Confirming..." + "confirmLoading": "Confirming...", + "againError": "You have already purchased this benefit, no need to purchase again" } } \ No newline at end of file diff --git a/i18n/locales/zh/personal.json b/i18n/locales/zh/personal.json index 0ad8e49..2792dfb 100644 --- a/i18n/locales/zh/personal.json +++ b/i18n/locales/zh/personal.json @@ -114,6 +114,7 @@ "apple": "苹果支付", "confirm": "确认", "cancel": "取消", - "confirmLoading": "正在购买..." + "confirmLoading": "正在购买...", + "againError": "您已购买过该权益,无需重复购买" } } \ No newline at end of file