feat/task1-c-wallet
devil_gong 2018-11-26 15:33:11 +08:00
parent 13b1dfff52
commit f9c6a1bc9a
2 changed files with 12 additions and 4 deletions

View File

@ -162,6 +162,11 @@ Page({
} else {
my.redirectTo({url: '/pages/user-order/user-order'});
}
} else {
my.showToast({
type: "fail",
content: res.data.msg
});
}
},
fail: () => {

View File

@ -545,12 +545,15 @@ class BuyService
'key_name' => 'address_id',
'error_msg' => '地址有误',
],
[
];
if(MyC('common_order_is_booking', 0) != 1)
{
$p[] = [
'checked_type' => 'empty',
'key_name' => 'payment_id',
'error_msg' => '支付方式有误',
],
];
];
}
$ret = params_checked($params, $p);
if($ret !== true)
{
@ -599,7 +602,7 @@ class BuyService
'preferential_price' => $preferential_price,
'price' => $check['data']['total_price'],
'total_price' => $check['data']['total_price']-$preferential_price,
'payment_id' => intval($params['payment_id']),
'payment_id' => isset($params['payment_id']) ? intval($params['payment_id']) : 0,
'add_time' => time(),
];
if($order['status'] == 1)