diff --git a/application/api/controller/Order.php b/application/api/controller/Order.php index 7992286..a25cbb8 100755 --- a/application/api/controller/Order.php +++ b/application/api/controller/Order.php @@ -355,6 +355,11 @@ class Order extends Api if ($order_goods) { foreach ($order_goods as $key => $value) { $value['goods_image'] = cdnurl($value['goods_image'], true); + if ($item['status'] == 7) { + $value['goods_price'] = $value['commission_price']; + $item['pay_amount'] = $value['commission_price']; + $item['order_amount'] = $value['commission_price']; + } } } diff --git a/application/api/controller/User.php b/application/api/controller/User.php index 051a018..a5e3e0e 100755 --- a/application/api/controller/User.php +++ b/application/api/controller/User.php @@ -63,9 +63,10 @@ class User extends Api if (!$account || !$password) { $this->error(__('Invalid parameters')); } + $site = Config::get("site"); $config = [ - 'app_id' => 'wx183e3fbc925f1ba3', - 'secret' => 'b3e26edaa7642673dd98a951564e02c7', + 'app_id' => $site['wx_appid'], + 'secret' => $site['wx_secrect'], // 指定 API 调用返回结果的类型:array(default)/collection/object/raw/自定义类名 'response_type' => 'array', ];