no message

parent 73d8ff25
......@@ -7,7 +7,7 @@ use Closure;
class CheckApiLogin
{
public $no_login_url = ["api/cart/cartLists","api/cart/cartMyCount"];
public $no_login_url = ["api/cart/saveCart","api/cart/cartLists","api/cart/cartMyCount"];
/**
* Handle an incoming request.
......@@ -20,7 +20,7 @@ class CheckApiLogin
{
if (!\Auth::check() ) {
if (in_array($request->path(),$this->no_login_url)){ //一些接口可以登录或者不登录都可以通行
request()->offsetSet("user",(object)["id"=>0,"gid"=>$request->cookie('sem_gid')]);
request()->offsetSet("user",(object)["id"=>0,"gid"=>\Arr::get($_COOKIE,"sem_gid")]);
return $next($request);
}else{
$response = [
......
......@@ -93,6 +93,11 @@ class CartService
$te = [
"cart_id"=>$cart_id,
"goods_id"=>$goods_id,
"goods_name"=>$skuInfo["goods_name"],
"brand_id"=>$skuInfo["brand_id"],
"brand_name"=>$skuInfo["brand_name"],
"supplier_id"=>$skuInfo["supplier_id"],
"supplier_name"=>$skuInfo["supplier_name"],
"buy_price"=>$buy_price,
"buy_number"=>$buy_number,
"ext_price"=>round($buy_price*$buy_number,2),
......
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