Merge branch 'sprint/174_tianshujie_bug' into 'master'

* Fix the problem of recording product cookies.

See merge request easycorp/zentaopms!719
This commit is contained in:
李玉春
2021-12-02 03:16:40 +00:00
+2 -2
View File
@@ -155,10 +155,10 @@ class productModel extends model
if(empty($product)) $productID = key($products);
$this->session->set('product', (int)$productID, $this->app->tab);
if($productID && strpos(",{$this->app->user->view->products},", ",{$productID},") === false) $this->accessDenied();
setcookie('preProductID', $productID, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);
}
setcookie('preProductID', (int)$productID, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);
if($this->cookie->preProductID != $this->session->product)
{
setcookie('preBranch', 0, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);