作者 何书鹏
1 个管道 的构建 通过 耗费 2 秒

评价

... ... @@ -363,10 +363,14 @@ class Order extends Api
$this->error($this->model->getError());
}
empty($post['goods_appraise']) && $this->error(__('请填写评价'));
$goods_appraise = htmlspecialchars_decode($post['goods_appraise']);
$goods_appraise = json_decode($goods_appraise,true);
if(is_string($post['goods_appraise'])){
$post['goods_appraise'] = htmlspecialchars_decode($post['goods_appraise']);
$post['goods_appraise'] = json_decode($post['goods_appraise'],true);
}elseif(is_object($post['goods_appraise'])){
$post['goods_appraise'] = json_decode($post['goods_appraise'],true);
}
$appraiseList = [];
foreach ($goods_appraise as $appraise) {
foreach ($post['goods_appraise'] as $appraise) {
$appraiseList[] = [
'user_id' => $this->user['id'],
'order_id' => $post['order_id'],
... ...