|
@@ -70,6 +70,12 @@ class GoodsEval extends Api
|
|
|
'content|内容'=>['require','max:250'],
|
|
|
]);
|
|
|
$user=$this->auth->getUser();
|
|
|
+ $orderCheck=$user->orders()->where('id',$data['order_id'])
|
|
|
+ ->where('status',Orders::S_OVER)
|
|
|
+ ->find();
|
|
|
+ if(!$orderCheck){
|
|
|
+ $this->error('您无法进行评价');
|
|
|
+ }
|
|
|
$has=\app\common\model\GoodsEval::where('user_id',$user['id'])
|
|
|
->where('goods_id',$data['goods_id'])
|
|
|
->where('order_id',$data['order_id'])
|