@@ -41,5 +41,6 @@ class OrderAction extends Model
$self->remark = $remark;
$self->save();
+ return $self;
}
@@ -165,12 +165,12 @@ class Order extends Base
if (!isset($params['list']) || empty($params['list'])) {
$this->error('参数错误');
- var_dump($params['list']);die;
// 表单验证
// $this->shoproValidate($params, get_class(), 'comment');
foreach ($params['list'] as $v) {
- $this->success('评价成功', \app\api\model\order\Order::operComment($v));
+ \app\api\model\order\Order::operComment($v);
+ $this->success('评价成功');
/**
@@ -873,8 +873,8 @@ trait OrderOper
OrderAction::operAdd($order, $item, $user, 'user', '用户评价成功');
// 订单评价后
-// $data = ['order' => $order, 'item' => $item];
-// \think\Hook::listen('order_comment_after', $data);
+ $data = ['order' => $order, 'item' => $item];
+ \think\Hook::listen('order_comment_after', $data);
});