支付app优化,首页标题优化

master
gongfuxiang 2024-02-29 10:02:11 +08:00
parent 26ead98d87
commit e17b7a4506
6 changed files with 99 additions and 48 deletions

36
App.vue
View File

@ -2541,25 +2541,29 @@
//
set_pages_navigation_bar_title() {
var arr = [
'pages/index/index',
'pages/goods-category/goods-category',
'pages/cart/cart',
'pages/user/user',
'pages/plugins/realstore/detail/detail'
];
//
var client_value = this.application_client_type();
//
var url = this.current_page(false);
//
if(arr.indexOf(url) == -1) {
var arr = url.split('/');
arr = arr.slice(1);
arr = arr.slice(0, -1);
var key = 'pages.'+arr.join('-');
uni.setNavigationBarTitle({
title: i18n.t(key),
});
// tab
if(client_value == 'alipay' && this.data.tabbar_pages.indexOf('/'+url) == -1) {
return false;
}
// key
var arr = url.split('/');
arr = arr.slice(1);
arr = arr.slice(0, -1);
var key = 'pages.'+arr.join('-');
//
var value = i18n.t(key);
//
if(this.data.tabbar_pages[0] == '/'+url) {
value = this.get_application_title();
}
//
uni.setNavigationBarTitle({
title: value
});
},
//

View File

@ -210,7 +210,10 @@
payment_id: Number(this.propPaymentId) === 0 ? this.propDefaultPaymentId : Number(this.propPaymentId),
submit_disabled_status: true,
order_id: 0,
popup_view_pay_html_is_show: false,
popup_view_pay_html_is_show: false,
// url
open_pay_url_timer: null,
open_pay_url_status: true,
};
},
methods: {
@ -415,17 +418,17 @@
}
},
// APP
app_pay_handle(self, data, order_id) {
uni.getProvider({
service: 'payment',
success: function (res) {
var arr = {
Alipay: 'alipay',
Weixin: 'wxpay',
PayPal: 'paypal'
}
var pay_value = arr[data.payment.payment] || null;
if(pay_value != null) {
app_pay_handle(self, data, order_id) {
var arr = {
Alipay: 'alipay',
Weixin: 'wxpay',
PayPal: 'paypal'
}
var pay_value = arr[data.payment.payment] || null;
if(pay_value != null) {
uni.getProvider({
service: 'payment',
success: function (res) {
if(~res.provider.indexOf(pay_value)) {
var pay_data = ((data.data.pay_data || null) == null) ? data.data : data.data.pay_data;
uni.requestPayment({
@ -437,7 +440,7 @@
if(call_back_url != null) {
uni.request({url: call_back_url, method: 'GET'});
}
//
self.order_item_pay_success_handle(data, order_id);
},
@ -446,13 +449,53 @@
}
});
} else {
app.globalData.showToast(data.payment.payment+self.$t('payment.payment.t4d687'));
app.globalData.showToast(data.payment.payment+self.$t('payment.payment.bv637f'));
}
} else {
app.globalData.showToast(data.payment.payment+self.$t('payment.payment.bv637f'));
}
}
});
}
});
} else {
//
if(self.open_pay_url_timer != null) {
clearTimeout(self.open_pay_url_timer);
}
//
uni.showLoading({
title: this.$t('common.loading_in_text'),
mask: true
});
// url
self.setData({
open_pay_url_status: true
});
// url
plus.runtime.openURL(data.data, function(error) {
uni.hideLoading();
// url
self.setData({
open_pay_url_status: false
});
self.order_item_pay_fail_handle(data, order_id, error);
});
// 3
self.open_pay_url_timer = setTimeout(function() {
if(self.open_pay_url_status) {
uni.hideLoading();
uni.showModal({
content: self.$t('payment.payment.sdfs31'),
showCancel: true,
cancelText: self.$t('common.not_have_name'),
confirmText: self.$t('order.order.s8g966'),
success(res) {
if (res.confirm) {
self.order_item_pay_success_handle(data, order_id);
} else {
self.order_item_pay_fail_handle(data, order_id, self.$t('paytips.paytips.6y488i'));
}
},
});
}
}, 3000);
}
},
//
kuaishou_pay_handle(self, data, order_id) {
@ -789,4 +832,4 @@
.payment-sub {
padding: 86rpx 90rpx 24rpx 90rpx;
}
</style>
</style>

View File

@ -42,10 +42,10 @@
"internet_error_tips": "網絡開小差了哦~",
"sub_error_retry_tips": "提交失敗,請重試!",
"not_more_list_data_tips": "無更多清單數據",
"scan_name": "掃一掃"
"scan_name": "掃一掃",
"not_have_name": "沒有"
},
"pages": {
"index": "ShopXO",
"goods-category": "商品分類",
"cart": "購物車",
"user": "用戶中心",
@ -1561,7 +1561,8 @@
"bv637f": "支付未定義",
"4dszme": "請使用真機操作、或小程式基礎版本太低!",
"k2i010": "支付成功後、請不要重複支付、如果訂單狀態未成功請聯系客服處理",
"2rw3qh": "支付方式還未適配"
"2rw3qh": "支付方式還未適配",
"sdfs31": "是否已完成支付?"
}
},
"realstore-cart": {

View File

@ -42,10 +42,10 @@
"login_in_text": "Logging in",
"sending_in_text": "Sending",
"sending": "Sending",
"scan_name": "Scan it"
"scan_name": "Scan it",
"not_have_name": "not have"
},
"pages": {
"index": "ShopXO",
"goods-category": "Product classification",
"cart": "shopping cart",
"user": "User Center",
@ -1574,7 +1574,8 @@
"bv637f": "Payment undefined",
"4dszme": "Please use real machine operation, or the basic version of the mini program is too low!",
"k2i010": "After successful payment, please do not make duplicate payments. If the order status is not successful, please contact customer service for assistance",
"2rw3qh": "The payment method has not been adapted yet"
"2rw3qh": "The payment method has not been adapted yet",
"sdfs31": "Has the payment been completed?"
}
},
"realstore-cart": {

View File

@ -42,10 +42,10 @@
"internet_error_tips": "La red está un poco mal.",
"sub_error_retry_tips": "¡La presentación falló, ¡ por favor, vuelva a intentarlo!",
"not_more_list_data_tips": "No hay más datos de lista",
"scan_name": "Barrer"
"scan_name": "Barrer",
"not_have_name": "No, No."
},
"pages": {
"index": "Shopxo",
"goods-category": "Clasificación de mercancías",
"cart": "Carrito de compras",
"user": "Centro de usuarios",
@ -1561,7 +1561,8 @@
"bv637f": "Pago no definido",
"4dszme": "¡¡ por favor, use la máquina real para operar o la versión básica del applet es demasiado baja!",
"k2i010": "Después de que el pago sea exitoso, no repita el pago, si el Estado del pedido no es exitoso, Póngase en contacto con el servicio al cliente para procesarlo.",
"2rw3qh": "El método de pago aún no se ha adaptado"
"2rw3qh": "El método de pago aún no se ha adaptado",
"sdfs31": "¿¿ se ha completado el pago?"
}
},
"realstore-cart": {

View File

@ -42,10 +42,10 @@
"internet_error_tips": "网络开小差了哦~",
"sub_error_retry_tips": "提交失败,请重试!",
"not_more_list_data_tips": "无更多列表数据",
"scan_name": "扫一扫"
"scan_name": "扫一扫",
"not_have_name": "没有"
},
"pages": {
"index": "ShopXO",
"goods-category": "商品分类",
"cart": "购物车",
"user": "用户中心",
@ -1565,7 +1565,8 @@
"bv637f": "支付未定义",
"4dszme": "请使用真机操作、或小程序基础版本太低!",
"k2i010": "支付成功后、请不要重复支付、如果订单状态未成功请联系客服处理",
"2rw3qh": "支付方式还未适配"
"2rw3qh": "支付方式还未适配",
"sdfs31": "是否已完成支付?"
}
},
"realstore-cart": {