|
@@ -102,19 +102,19 @@
|
|
|
const payMethods = [
|
|
|
{
|
|
|
icon: '/assets/addons/shopro/uniapp/pay/wechat.png',
|
|
|
- title: $t('pay.index.wxpay'),
|
|
|
+ title: uni.getLocale() == 'en' ? 'WeChat Payment' : '微信支付',
|
|
|
value: 'wechat',
|
|
|
disabled: false,
|
|
|
},
|
|
|
{
|
|
|
icon: '/assets/addons/shopro/uniapp/pay/alipay.png',
|
|
|
- title: $t('pay.index.alipay'),
|
|
|
+ title: uni.getLocale() == 'en' ? 'Alipay payment' : '支付宝支付',
|
|
|
value: 'alipay',
|
|
|
disabled: false,
|
|
|
},
|
|
|
{
|
|
|
icon: '/assets/addons/shopro/uniapp/pay/wallet.png',
|
|
|
- title: $t('pay.index.balancepay'),
|
|
|
+ title: uni.getLocale() == 'en' ? 'Balance payment' : '余额支付',
|
|
|
value: 'money',
|
|
|
disabled: false,
|
|
|
},
|
|
@@ -126,7 +126,7 @@
|
|
|
},
|
|
|
{
|
|
|
icon: '/assets/addons/shopro/uniapp/pay/cod.png',
|
|
|
- title: $t('pay.index.payCash'),
|
|
|
+ title: uni.getLocale() == 'en' ? 'Cash on delivery' : '货到付款',
|
|
|
value: 'offline',
|
|
|
disabled: false,
|
|
|
},
|
|
@@ -134,13 +134,13 @@
|
|
|
|
|
|
const onPay = () => {
|
|
|
if (state.payment === '') {
|
|
|
- sheep.$helper.toast($t('pay.index.choosePayway'));
|
|
|
+ sheep.$helper.toast(uni.getLocale() == 'en' ? 'Please choose a payment method' : '请选择支付方式');
|
|
|
return;
|
|
|
}
|
|
|
if (state.payment === 'money') {
|
|
|
uni.showModal({
|
|
|
- title: $t('pay.index.tips'),
|
|
|
- content: $t('pay.index.tipsConfirmPay'),
|
|
|
+ title: uni.getLocale() == 'en' ? 'tips' : '提示',
|
|
|
+ content: uni.getLocale() == 'en' ? 'Are you sure you want to pay?' : '确定要支付吗?',
|
|
|
success: function (res) {
|
|
|
if (res.confirm) {
|
|
|
sheep.$platform.pay(state.payment, state.orderType, state.orderInfo.order_sn);
|
|
@@ -149,8 +149,8 @@
|
|
|
});
|
|
|
} else if (state.payment === 'offline') {
|
|
|
uni.showModal({
|
|
|
- title: $t('pay.index.tips'),
|
|
|
- content: $t('pay.index.tipsSubmitOrder'),
|
|
|
+ title: uni.getLocale() == 'en' ? 'tips' : '提示',
|
|
|
+ content: uni.getLocale() == 'en' ? 'Are you sure you want to place an order?' : '确定要下单吗?',
|
|
|
success: function (res) {
|
|
|
if (res.confirm) {
|
|
|
sheep.$platform.pay(state.payment, state.orderType, state.orderInfo.order_sn);
|
|
@@ -164,7 +164,7 @@
|
|
|
|
|
|
const payDescText = computed(() => {
|
|
|
if (state.payStatus === 2) {
|
|
|
- return $t('pay.index.paid');
|
|
|
+ return uni.getLocale() == 'en' ? 'The order has been paid' : '该订单已支付';
|
|
|
}
|
|
|
if (state.payStatus === 1 && state.orderInfo.ext.expired_time !== 0) {
|
|
|
const time = useDurationTime(state.orderInfo.ext.expired_time);
|
|
@@ -172,10 +172,10 @@
|
|
|
state.payStatus = -1;
|
|
|
return '';
|
|
|
}
|
|
|
- return $t('pay.index.restTime')+` ${time.h}:${time.m}:${time.s} `;
|
|
|
+ return (uni.getLocale() == 'en' ? 'Remaining payment time' : '剩余支付时间')+` ${time.h}:${time.m}:${time.s} `;
|
|
|
}
|
|
|
if (state.payStatus === -2) {
|
|
|
- return $t('pay.index.noPayData');
|
|
|
+ return uni.getLocale() == 'en' ? 'No payment order information found' : '未查询到支付单信息';
|
|
|
}
|
|
|
|
|
|
return '';
|