Commit 01d35bea by hcy001

1

parent 3c752037
......@@ -86,15 +86,15 @@ class CommonModel extends Model
//模糊搜索sku型号
public function SkuList($k)
{
$url = "http://s.ichunt.com/api/think?k=".$k;
$url = "http://so12.ichunt.com/search/spu/think?spu_name=".$k;
$res = post_curl($url,[]);
$resArr = \GuzzleHttp\json_decode($res,true);
$temp = [];
if (count($resArr["data"]) == 0){
array_push($temp,["value"=>$k,"name"=>$k]);
array_push($temp,["value"=>"","name"=>$k]);
}else{
foreach ($resArr["data"] as $k=>$v){
array_push($temp,["value"=>$v,"name"=>$v]);
array_push($temp,["value"=>json_encode($v),"name"=>$v["spu_name"]." 品牌:".$v["brand_name"]]);
}
}
echo json_encode($temp,JSON_UNESCAPED_UNICODE) ;
......
......@@ -187,7 +187,6 @@ class InquiryItemsModel extends Model
if (empty($b["inquiry_number"])) throw new Exception("请输入询价数量",1004);
if (empty($b["batch"])) throw new Exception("请输入批次要求",1005);
if (empty($b["delivery_time"])) throw new Exception("请选择交货日期",1006);
if (empty($b["brand_name"])) throw new Exception("请选择品牌名称",1003);
try{
$con = DB::connection('rfq');
......
......@@ -74,7 +74,7 @@ class InquiryModel extends Model
#不同类别查询
switch (@$input["types"]){
case "1": //我的询价
$list = $list->where('a.create_uid', $user_id)->whereIn('a.status', [-1,1]);
$list = $list->where('a.create_uid', $user_id);
break;
case "2": //我的已关闭询价
$list = $list->where('a.create_uid', $user_id)->where("b.status",-1);
......
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