Commit 067dbc64 by 杨树贤

fix

parent afdbe1ba
......@@ -21,7 +21,11 @@ class SkuApiController extends Controller
{
$skuService = new SkuService();
$data = $skuService->getSkuList();
$this->response(0, 'ok', $data['list'], $data['total']);
if (is_array($data)) {
$this->response(0, 'ok', $data['list'], $data['total']);
} else {
$this->response(-1, '获取数据失败,原因是 : ' . $data);
}
}
public function UpdateSkuStatus($request)
......
......@@ -36,7 +36,7 @@ class SkuService extends BaseService
try {
$return = curl($url, $map, 1);
} catch (\Exception $e) {
return [$e->getMessage()];
return $e->getMessage();
}
$data = json_decode($return, true);
......
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