public function goodspropertyAction()
 {
     $typeId = intval($this->_getParam('typeId'));
     $goodsProperty = new GoodsTypePropertyModel();
     $goodsProperty->where = array('type_id' => $typeId);
     $propertyList = $goodsProperty->getList(array('property_id', 'property_name'))->toarray();
     echo json_encode($propertyList);
     $this->_helper->viewRenderer->setNoRender();
 }
 public function deleteAction()
 {
     $typeId = intval($this->_getParam('id'));
     if (empty($typeId)) {
         Zshop_Message::show($this, '类型ID为空', 'back', 2);
     } else {
         //删除商品类型
         $typeDeleted = $this->goodsTypeModel->delete($typeId);
         //删除商品类型属性
         $goodsTypeProperty = new GoodsTypePropertyModel();
         $propertyDeleted = $goodsTypeProperty->delete($typeId, 'type_id');
         //跳转提示
         $message = $typeDeleted && $propertyDeleted ? '删除成功' : '删除失败';
         Zshop_Message::show($this, $message, 'admin/goodstype/index', 2);
     }
 }