This commit is contained in:
tianshujie98
2020-09-08 09:27:22 +08:00
parent 10a9a84dd3
commit f2bcc2f19c
2 changed files with 35 additions and 14 deletions
+34 -13
View File
@@ -11,23 +11,44 @@
*/
class design extends control
{
/**
* Browse designs.
*
* @param int $productID
* @param string $type all|bySearch|HLDS|DDS|DBDS|ADS
* @param string $param
* @param string $orderBy
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @access public
* @return void
*/
public $products = array();
/**
* Construct function, load module auto.
*
* @param string $moduleName
* @param string $methodName
* @access public
* @return void
*/
public function __construct($moduleName = '', $methodName = '')
{
parent::__construct($moduleName, $methodName);
$products = array();
$this->loadModel('product');
$this->view->products = $this->products = $this->product->getPairs('nocode', $this->session->program);
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=design")));
}
/**
* Browse designs.
*
* @param int $productID
* @param string $type all|bySearch|HLDS|DDS|DBDS|ADS
* @param string $param
* @param string $orderBy
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @access public
* @return void
*/
public function browse($productID = 0, $type = 'all', $param = '', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Save session for design list and process product id. */
$this->session->set('designList', $this->app->getURI(true));
$productID = $this->product->saveState($productID, $this->products);
$this->design->setProductMenu($productID);
/* Build the search form. */
+1 -1
View File
@@ -73,7 +73,7 @@ class designModel extends model
if(!trim($name)) continue;
$design = new stdclass();
$design->story = $data->story[$i];
$design->story = isset($data->story[$i]) ? $data->story[$i] : '';
$design->type = $data->type[$i];
$design->name = $name;
$design->product = $productID;