1.0

parent 5ac2a05a
...@@ -54,7 +54,7 @@ class ServerFoostoneModel ...@@ -54,7 +54,7 @@ class ServerFoostoneModel
//获取sku列表 //获取sku列表
public function SkuList($data,$type =1,$goods_type = [3,4]){ public function SkuList($data,$type =1,$goods_type = [3,4]){
$data['goods_type'] = $goods_type; $data['goods_type'] = $goods_type;
return $this->push( '/third/api/obtain/list/sku',$data,$type); return $this->push('/third/api/obtain/list/sku',$data,$type);
} }
//模糊搜索品牌 //模糊搜索品牌
public function getBrand($keyword,$limit = 100,$type =1){ public function getBrand($keyword,$limit = 100,$type =1){
......
...@@ -33,7 +33,14 @@ class ServerPurModel ...@@ -33,7 +33,14 @@ class ServerPurModel
die(); die();
} }
$p = json_decode($res,true); $p = json_decode($res,true);
$p['code'] = $p['errcode']; if (array_key_exists('errcode',$p)){
$p['code'] = $p['errcode'];
unset($p['errcode']);
}
if (array_key_exists('errmsg',$p)){
$p['msg'] = $p['errmsg'];
unset($p['errmsg']);
}
unset($p['errcode']); unset($p['errcode']);
if ($type == 1){ if ($type == 1){
echo json_encode($p); echo json_encode($p);
......
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