From 47eae4577bf97025336b5eee5971a5609946dd2c Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Thu, 20 Apr 2023 23:13:04 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=B8=8B=E5=8D=95session?= =?UTF-8?q?=E4=B8=B4=E6=97=B6=E6=95=B0=E6=8D=AE=E6=94=B9=E4=B8=BAcache?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/controller/Buy.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/index/controller/Buy.php b/app/index/controller/Buy.php index c04406048..9648b2030 100755 --- a/app/index/controller/Buy.php +++ b/app/index/controller/Buy.php @@ -53,9 +53,10 @@ class Buy extends Common */ public function Index() { + $key = 'buy_post_data_'.$this->user['id']; if($this->data_post) { - MySession('buy_post_data', $this->data_post); + MyCache($key, $this->data_post, 1800); return MyRedirect(MyUrl('index/buy/index')); } else { // 站点类型,是否开启了展示型 @@ -66,7 +67,7 @@ class Buy extends Common } // 获取下单信息 - $buy_data = MySession('buy_post_data'); + $buy_data = MyCache($key); if(empty($buy_data) || (empty($buy_data['goods_data']) && empty($buy_data['ids']))) { MyViewAssign('msg', MyLang('goods_data_empty_tips'));