作者 王智

'管易API返回修改'

... ... @@ -25,7 +25,7 @@ class GuanYiCloud extends Api
//获取店铺信息
public function getShops()
function getShops()
{
$data = array();
$data['appkey'] = APPKEY;
... ... @@ -35,7 +35,7 @@ class GuanYiCloud extends Api
$data['page_size'] = '10';
// $data['code'] = '001';
$data['sign'] = $this->sign($data, SECRET);
echo 'response: ' . $this->mycurl(URL, $data);
$this->success('成功', json_decode($this->mycurl(URL, $data)));
}
// 供应商查询
... ... @@ -51,7 +51,7 @@ class GuanYiCloud extends Api
// $data['end_date'] = '2015-12-10 09:09:09';
// $data['code'] = '001';
$data['sign'] = $this->sign($data, SECRET);
echo 'response: ' . $this->mycurl(URL, $data);
$this->success('成功', json_decode($this->mycurl(URL, $data)));
}
// 会员查询
... ... @@ -69,7 +69,7 @@ class GuanYiCloud extends Api
// $data['shop_code'] = 'feiniu';
// $data['code'] = '18662591592';
$data['sign'] = $this->sign($data, SECRET);
echo 'response: ' . $this->mycurl(URL, $data);
$this->success('成功', json_decode($this->mycurl(URL, $data)));
}
//获取仓库信息
... ... @@ -83,7 +83,7 @@ class GuanYiCloud extends Api
$data['page_size'] = '10';
// $data['code'] = '001';
$data['sign'] = $this->sign($data, SECRET);
echo 'response: ' . $this->mycurl(URL, $data);
$this->success('成功', json_decode($this->mycurl(URL, $data)));
}
// 商品查询
... ... @@ -97,7 +97,7 @@ class GuanYiCloud extends Api
$data['page_size'] = '10';
// $data['code'] = 'ZZLN000005';
$data['sign'] = $this->sign($data, SECRET);
echo 'response: ' . $this->mycurl(URL, $data);
$this->success('成功', json_decode($this->mycurl(URL, $data)));
}
//获取订单
... ... @@ -110,15 +110,15 @@ class GuanYiCloud extends Api
$data['page_no'] = '1';
$data['page_size'] = '10';
$data['start_date'] = '2015-8-1 09:06:01';
$data['end_date'] = '2016-1-27 09:06:01';
$data['end_date'] = '2020-11-27 09:06:01';
$data['date_type'] = 0;
$data['order_state'] = 0;
$data['warehouse_code'] = 'ck01';
// $data['shop_code'] = '005';
$data['warehouse_code'] = '02';//仓库Code
// $data['shop_code'] = '005';
$data['platform_code'] = '1453793019';
// $date['receiver_mobile']='15928552965';
$data['sign'] = $this->sign($data, SECRET);
echo 'response: ' . $this->mycurl(URL, $data);
$this->success('成功', json_decode($this->mycurl(URL, $data)));
}
//获取发货单
... ... @@ -141,7 +141,7 @@ class GuanYiCloud extends Api
// $data['shop_code'] = 'cj02';
// $data['delivery'] = '1';
$data['sign'] = $this->sign($data, SECRET);
echo 'response: ' . $this->mycurl(URL, $data);
$this->success('成功', json_decode($this->mycurl(URL, $data)));
}
// 获取库存(新)
... ... @@ -157,7 +157,7 @@ class GuanYiCloud extends Api
$data['end_date'] = '2015-11-04 10:06:03';
// $data['barcode'] = '6921314113412';
$data['sign'] = $this->sign($data, SECRET);
echo 'response: ' . $this->mycurl(URL, $data);
$this->success('成功', json_decode($this->mycurl(URL, $data)));
}
//新增商品
... ... @@ -239,8 +239,8 @@ class GuanYiCloud extends Api
// 'sku_note' => 'haha'
// );
$data['skus'] = $skus;
$data['sign'] = $this->$this->sign($data, SECRET);
echo 'response: ' . $this->$this->mycurl(URL, $data);
$data['sign'] = $this->sign($data, SECRET);
echo 'response: ' . $this->mycurl(URL, $data);
}
// 商品删除
... ... @@ -253,8 +253,8 @@ class GuanYiCloud extends Api
$data['page_no'] = '1';
$data['page_size'] = '10';
// $data['code'] = '001';
$data['sign'] = $this->$this->sign($data, SECRET);
echo 'response: ' . $this->$this->mycurl(URL, $data);
$data['sign'] = $this->sign($data, SECRET);
echo 'response: ' . $this->mycurl(URL, $data);
}
// 商品规格增加
... ... @@ -276,8 +276,8 @@ class GuanYiCloud extends Api
$data['agent_price'] = '162';
$data['cost_price'] = '163';
$data['note'] = '1.0000';
$data['sign'] = $this->$this->sign($data, SECRET);
echo 'response: ' . $this->$this->mycurl(URL, $data);
$data['sign'] = $this->sign($data, SECRET);
echo 'response: ' . $this->mycurl(URL, $data);
}
// 商品规格修改
... ... @@ -300,8 +300,8 @@ class GuanYiCloud extends Api
$data['agent_price'] = '162';
$data['cost_price'] = '163';
$data['note'] = '1.0000';
$data['sign'] = $this->$this->sign($data, SECRET);
echo 'response: ' . $this->$this->mycurl(URL, $data);
$data['sign'] = $this->sign($data, SECRET);
echo 'response: ' . $this->mycurl(URL, $data);
}
// 商品规格删除
... ... @@ -314,8 +314,8 @@ class GuanYiCloud extends Api
$data['item_id'] = '17391916228';
$data['id'] = '1739213845111';
// $data['code'] = '143330110673602';
$data['sign'] = $this->$this->sign($data, SECRET);
echo 'response: ' . $this->$this->mycurl(URL, $data);
$data['sign'] = $this->sign($data, SECRET);
echo 'response: ' . $this->mycurl(URL, $data);
}
// 获取采购订单
... ... @@ -333,8 +333,8 @@ class GuanYiCloud extends Api
// $data['end_create_date'] = 'PO4298914535';
// $data['start_approve_date'] = '2015-07-03 15:51:32';
// $data['end_approve_date'] = '2015-07-16 17:52:05';
$data['sign'] = $this->$this->sign($data, SECRET);
echo 'response: ' . $this->$this->mycurl(URL, $data);
$data['sign'] = $this->sign($data, SECRET);
$this->success('成功', json_decode($this->mycurl(URL, $data)));
}
// 获取采购入库单
... ... @@ -347,8 +347,8 @@ class GuanYiCloud extends Api
$data['page_no'] = '1';
$data['page_size'] = '10';
$data['code'] = 'PAO451284351';
$data['sign'] = $this->$this->sign($data, SECRET);
echo 'response: ' . $this->$this->mycurl(URL, $data);
$data['sign'] = $this->sign($data, SECRET);
$this->success('成功', json_decode($this->mycurl(URL, $data)));
}
// 获取采购退货单
... ... @@ -363,8 +363,8 @@ class GuanYiCloud extends Api
// $data['warehouse_code'] = 'ck02';
// $data['code'] = 'PAO451284351';
$data['status'] = 1;
$data['sign'] = $this->$this->sign($data, SECRET);
echo 'response: ' . $this->$this->mycurl(URL, $data);
$data['sign'] = $this->sign($data, SECRET);
$this->success('成功', json_decode($this->mycurl(URL, $data)));
}
// 获取盘点单
... ... @@ -377,8 +377,8 @@ class GuanYiCloud extends Api
$data['page_no'] = '1';
$data['page_size'] = '10';
// $data['code'] = 'WCO7171989147';
$data['sign'] = $this->$this->sign($data, SECRET);
echo 'response: ' . $this->$this->mycurl(URL, $data);
$data['sign'] = $this->sign($data, SECRET);
$this->success('成功', json_decode($this->mycurl(URL, $data)));
}
// 获取调拨单
... ... @@ -391,8 +391,8 @@ class GuanYiCloud extends Api
$data['page_no'] = '1';
$data['page_size'] = '10';
// $data['code'] = 'WTO4244996172';
$data['sign'] = $this->$this->sign($data, SECRET);
echo 'response: ' . $this->$this->mycurl(URL, $data);
$data['sign'] = $this->sign($data, SECRET);
$this->success('成功', json_decode($this->mycurl(URL, $data)));
}
// 获取退换货单
... ... @@ -411,8 +411,8 @@ class GuanYiCloud extends Api
$data['receive'] = '1';
$data['agree'] = '1';
$data['cancel'] = '2';
$data['sign'] = $this->$this->sign($data, SECRET);
echo 'response: ' . $this->$this->mycurl(URL, $data);
$data['sign'] = $this->sign($data, SECRET);
$this->success('成功', json_decode($this->mycurl(URL, $data)));
}
// 新增盘点单
... ... @@ -884,7 +884,7 @@ class GuanYiCloud extends Api
function mycurl($url, $data)
{
$data_string = $this->json_encode_ch($data);
echo 'request: ' . $data_string . "\n";
// echo 'request: ' . $data_string . "\n";
$data_string = urlencode($data_string);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
... ...