From c19ad08621d90e291e0f25e130c8f026aa3d9c46 Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Thu, 15 Apr 2021 14:38:39 +0800 Subject: [PATCH] * Finish task #37530. --- module/branch/control.php | 5 +++-- module/product/model.php | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/module/branch/control.php b/module/branch/control.php index a1a5e0a703..b0600d6024 100644 --- a/module/branch/control.php +++ b/module/branch/control.php @@ -53,13 +53,14 @@ class branch extends control * Ajax get drop menu. * * @param int $productID + * @param int $branch * @param string $module * @param string $method * @param string $extra * @access public * @return void */ - public function ajaxGetDropMenu($productID, $module, $method, $extra) + public function ajaxGetDropMenu($productID, $branch = 0, $module, $method, $extra = '') { $this->view->link = $this->loadModel('product')->getProductLink($module, $method, $extra, true); $this->view->productID = $productID; @@ -70,7 +71,7 @@ class branch extends control $branches = $this->branch->getPairs($productID); $this->view->branches = $branches; - $this->view->currentBranchID = $this->cookie->preBranch; + $this->view->currentBranchID = $branch; $this->view->branchesPinyin = common::convert2Pinyin($branches); $this->display(); } diff --git a/module/product/model.php b/module/product/model.php index 40ba30e8be..6b8db3ff5c 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -117,7 +117,7 @@ class productModel extends model $branchName = isset($branches[$branch]) ? $branches[$branch] : $branches[0]; if(!$isMobile) { - $dropMenuLink = helper::createLink('branch', 'ajaxGetDropMenu', "objectID=$productID&module=$currentModule&method=$currentMethod&extra=$extra"); + $dropMenuLink = helper::createLink('branch', 'ajaxGetDropMenu', "objectID=$productID&branch=$branch&module=$currentModule&method=$currentMethod&extra=$extra"); $output .= "