|
@@ -60,6 +60,8 @@ class Yorder extends Api
|
|
|
}
|
|
|
$method_info = $method_model->where('id',$data['method_id'])->field('type,show_images,moshi,user_id,yutang_id,yutang_name,eat_price,yajin')->find();
|
|
|
$images = explode(',',$method_info['show_images']);
|
|
|
+ $rebate = rebate($method_info['type'],$method_info['moshi']);
|
|
|
+ $youhui= $rebate['reduction'];
|
|
|
$order_data = [
|
|
|
'user_id'=>$this->auth->id,
|
|
|
'order_no'=>$order_no,
|
|
@@ -72,7 +74,7 @@ class Yorder extends Api
|
|
|
'item_money'=>$data['item_money'],
|
|
|
'wucan_money'=>$data['wucan_money'],
|
|
|
'yajin_money'=>$data['yajin_money'],
|
|
|
- 'youhui_money'=>config('site.reduction'),
|
|
|
+ 'youhui_money'=>$youhui,
|
|
|
'order_money'=>$data['order_money'],
|
|
|
'status'=>1,
|
|
|
'create_time'=>time(),
|