Commit bcee6243 by 朱继来

调整加入购物车返回数据

parent d884f21b
Showing with 6 additions and 2 deletions
......@@ -317,8 +317,12 @@ Class AddOrderController extends Controller
$url = Config('website.api_domain').'cart/addByOrderSystem';
$response = json_decode(curlApi($url, $data), true);
return ['errcode' => $response['err_code'], 'errmsg' => $response['err_msg'], 'data'=>$response['data']];
if ($response['err_code'] == 0) {
return ['errcode' => $response['err_code'], 'errmsg' => $response['err_msg'], 'data'=>$response['data']];
} else {
return ['errcode' => $response['err_code'], 'errmsg' => $response['err_msg']];
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment