Commit 860b3264 by 朱继来

Merge branch 'zjl_order_perm_20181024'

parents 6a28c806 2a4c82a5
Showing with 9 additions and 2 deletions
......@@ -289,11 +289,18 @@ Class AddOrderController extends Controller
if ($request->isMethod('post')) {
$url = Config('website.search-skuid');
$data['sku_id'] = $request->input('sku_id');
$goods_type = $request->input('goods_type');
$response = json_decode(curlApi($url, $data, 'POST'), true);
if (!empty($response['data']['data'])) {
return ['errcode' => 0, 'errmsg' => '', 'data' => $response['data']['data'][$data['sku_id']]];
if ($goods_type == 1) {
$goods_info = $response['data']['sku'];
} else {
$goods_info = $response['data'];
}
if (!empty($goods_info)) {
return ['errcode' => 0, 'errmsg' => '', 'data' => $goods_info];
} else {
return ['errcode' => -1, 'errmsg' => '未找SKU信息'];
}
......
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