public function edit($param = array()) { list($id, $backurl) = $param; $this->actionMenu = array(array('name' => '返回', 'url' => base64_decode($backurl))); $this->menuTitle = '修改系统商品'; $this->style['css'][] = 'public/uploadify/uploadify.css'; $this->style['js'][] = 'public/uploadify/jquery.uploadify.min.js?i=' . rand(10000, 99999); $systemProductInfo = $this->systemProductService->model->find($id); $showCategoryModel = new showCategoryModel(); $showCategoryList = $showCategoryModel->getCacheFileCategory(); $parentId = $showCategoryList[$systemProductInfo['show_category_id']]['parentid']; $firstCategory = $showCategoryModel->getChildCategoryByIdCache(0); $parentCategory = $showCategoryModel->getChildCategoryByIdCache($systemProductInfo['show_category_first_id']); $thisParentCategoryList = $showCategoryModel->getChildCategoryByIdCache($parentId); $systemProductSkuService = new systemProductSkuService(); $skuList = $systemProductSkuService->getKeyValueSkuList($id); $skuTitle = array_keys($skuList); $systemProductImageService = new sysProImgService(); $productImageList = $systemProductImageService->getImageList($id); $productImageList = $productImageList['resultList']; $data = array('systemProductInfo' => $systemProductInfo, 'skuList' => $skuList, 'skuTitle' => $skuTitle, 'firstCategory' => $firstCategory, 'parentCategory' => $parentCategory, 'thisParentCategoryList' => $thisParentCategoryList, 'parentId' => $parentId, 'productImageList' => $productImageList, 'backurl' => $backurl); $this->setView($data); }
public function edit($param = array()) { list($id, $backurl) = $param; $this->actionMenu = array(array('name' => '返回', 'url' => base64_decode($backurl))); $this->menuTitle = '修改系统商品'; $systemProductInfo = $this->systemProductModel->find($id); $showCategoryModel = new showCategoryModel(); $showCategoryList = $showCategoryModel->getCacheFileCategory(); $parentId = $showCategoryList[$systemProductInfo['show_category_id']]['parentid']; $firstCategory = $showCategoryModel->getChildCategoryByIdCache(0); $parentCategory = $showCategoryModel->getChildCategoryByIdCache($systemProductInfo['show_category_first_id']); $thisParentCategoryList = $showCategoryModel->getChildCategoryByIdCache($parentId); $skuList = systemProductSkuService::getKeyValueSkuList($id); $skuTitle = array_keys($skuList); $data = array('systemProductInfo' => $systemProductInfo, 'skuList' => $skuList, 'skuTitle' => $skuTitle, 'firstCategory' => $firstCategory, 'parentCategory' => $parentCategory, 'thisParentCategoryList' => $thisParentCategoryList, 'parentId' => $parentId, 'backurl' => $backurl); $this->setView($data); }