提交 64dd28ef 编写于 作者: D devil

小程序支付0成功错误修复

上级 a32249f4
......@@ -171,7 +171,7 @@ class OrderService
// 是否直接跳转
if($success_count > 0 && $success_count == count($order_data))
{
return DataReturn('支付成功', 0, ['data'=>MyUrl('index/order/respond', ['appoint_status'=>0])]);
return DataReturn('支付成功', 0, ['data'=>MyUrl('index/order/respond', ['appoint_status'=>0]), 'is_success'=>1]);
}
// 支付入口文件检查
......
......@@ -37,11 +37,13 @@ return array (
0 => 'app\\plugins\\ordergoodsform\\Hook',
1 => 'app\\plugins\\membershiplevelvip\\Hook',
2 => 'app\\plugins\\multilingual\\Hook',
3 => 'app\\plugins\\coupon\\Hook',
),
'plugins_js' =>
array (
0 => 'app\\plugins\\ordergoodsform\\Hook',
1 => 'app\\plugins\\multilingual\\Hook',
2 => 'app\\plugins\\coupon\\Hook',
),
'plugins_view_goods_detail_base_inventory_top' =>
array (
......@@ -67,6 +69,7 @@ return array (
array (
0 => 'app\\plugins\\membershiplevelvip\\Hook',
1 => 'app\\plugins\\blog\\Hook',
2 => 'app\\plugins\\coupon\\Hook',
),
'plugins_service_goods_handle_end' =>
array (
......@@ -79,6 +82,7 @@ return array (
'plugins_service_buy_group_goods_handle' =>
array (
0 => 'app\\plugins\\membershiplevelvip\\Hook',
1 => 'app\\plugins\\coupon\\Hook',
),
'plugins_service_user_login_success_record' =>
array (
......@@ -119,11 +123,13 @@ return array (
'plugins_service_users_center_left_menu_handle' =>
array (
0 => 'app\\plugins\\membershiplevelvip\\Hook',
1 => 'app\\plugins\\coupon\\Hook',
),
'plugins_service_header_navigation_top_right_handle' =>
array (
0 => 'app\\plugins\\membershiplevelvip\\Hook',
1 => 'app\\plugins\\multilingual\\Hook',
2 => 'app\\plugins\\coupon\\Hook',
),
'plugins_common_page_bottom' =>
array (
......@@ -145,5 +151,29 @@ return array (
array (
0 => 'app\\plugins\\multilingual\\Hook',
),
'plugins_view_goods_detail_panel_bottom' =>
array (
0 => 'app\\plugins\\coupon\\Hook',
),
'plugins_view_buy_group_goods_inside_bottom' =>
array (
0 => 'app\\plugins\\coupon\\Hook',
),
'plugins_view_buy_form_inside' =>
array (
0 => 'app\\plugins\\coupon\\Hook',
),
'plugins_service_buy_order_insert_success' =>
array (
0 => 'app\\plugins\\coupon\\Hook',
),
'plugins_service_order_status_change_history_success_handle' =>
array (
0 => 'app\\plugins\\coupon\\Hook',
),
'plugins_service_user_register_end' =>
array (
0 => 'app\\plugins\\coupon\\Hook',
),
);
?>
\ No newline at end of file
......@@ -233,9 +233,7 @@ Page({
// 支付方法
pay_handle(order_ids) {
var self = this;
// 加载loding
my.showLoading({ content: "请求中..." });
my.request({
url: app.get_request_url("pay", "order"),
method: "POST",
......@@ -248,6 +246,11 @@ Page({
success: res => {
my.hideLoading();
if (res.data.code == 0) {
// 是否直接支付成功
if((res.data.data.is_success || 0) == 1) {
self.order_item_pay_success_handle(order_ids);
app.showToast('支付成功', 'success');
} else {
// 支付方式类型
switch (res.data.data.is_payment_type) {
// 正常线上支付
......@@ -300,6 +303,7 @@ Page({
default :
app.showToast('支付类型有误');
}
}
} else {
app.showToast(res.data.msg);
}
......
......@@ -229,9 +229,7 @@ Page({
// 支付方法
pay_handle(order_ids) {
var self = this;
// 加载loding
swan.showLoading({ title: "请求中..." });
swan.request({
url: app.get_request_url("pay", "order"),
method: "POST",
......@@ -243,6 +241,11 @@ Page({
success: res => {
swan.hideLoading();
if (res.data.code == 0) {
// 是否直接支付成功
if((res.data.data.is_success || 0) == 1) {
self.order_item_pay_success_handle(order_ids);
app.showToast('支付成功', 'success');
} else {
// 支付方式类型
switch (res.data.data.is_payment_type) {
// 正常线上支付
......@@ -288,6 +291,7 @@ Page({
default:
app.showToast('支付类型有误');
}
}
} else {
app.showToast(res.data.msg);
}
......
......@@ -232,9 +232,7 @@ Page({
// 支付方法
pay_handle(order_ids) {
var self = this;
// 加载loding
qq.showLoading({title: "请求中..." });
qq.request({
url: app.get_request_url("pay", "order"),
method: "POST",
......@@ -246,6 +244,11 @@ Page({
success: res => {
qq.hideLoading();
if (res.data.code == 0) {
// 是否直接支付成功
if((res.data.data.is_success || 0) == 1) {
self.order_item_pay_success_handle(order_ids);
app.showToast('支付成功', 'success');
} else {
// 支付方式类型
switch (res.data.data.is_payment_type) {
// 正常线上支付
......@@ -308,6 +311,7 @@ Page({
default :
app.showToast('支付类型有误');
}
}
} else {
app.showToast(res.data.msg);
}
......
......@@ -241,8 +241,7 @@ Page({
// 支付方法
pay_handle(order_ids) {
var self = this; // 加载loding
var self = this;
tt.showLoading({
title: "请求中..."
});
......@@ -256,8 +255,13 @@ Page({
dataType: "json",
success: res => {
tt.hideLoading();
if (res.data.code == 0) {
// 是否直接支付成功
if((res.data.data.is_success || 0) == 1)
{
self.order_item_pay_success_handle(order_ids);
app.showToast('支付成功', 'success');
} else {
// 支付方式类型
switch (res.data.data.is_payment_type) {
// 正常线上支付
......@@ -323,6 +327,7 @@ Page({
default:
app.showToast('支付类型有误');
}
}
} else {
app.showToast(res.data.msg);
}
......
......@@ -73,7 +73,7 @@ App({
// 请求地址
request_url: "{{request_url}}",
// request_url: 'http://shopxo.com/',
request_url: 'http://shopxo.com/',
// request_url: 'https://dev.shopxo.net/',
// 基础信息
......
......@@ -232,9 +232,7 @@ Page({
// 支付方法
pay_handle(order_ids) {
var self = this;
// 加载loding
wx.showLoading({title: "请求中..." });
wx.request({
url: app.get_request_url("pay", "order"),
method: "POST",
......@@ -246,6 +244,11 @@ Page({
success: res => {
wx.hideLoading();
if (res.data.code == 0) {
// 是否直接支付成功
if((res.data.data.is_success || 0) == 1) {
self.order_item_pay_success_handle(order_ids);
app.showToast('支付成功', 'success');
} else {
// 支付方式类型
switch (res.data.data.is_payment_type) {
// 正常线上支付
......@@ -297,6 +300,7 @@ Page({
default :
app.showToast('支付类型有误');
}
}
} else {
app.showToast(res.data.msg);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册