* ============================================================================
 * 属性控制器
 */
class AttributesAction extends BaseAction{
	/**
	 * 跳到新增/编辑页面
	 */
	public function toEdit(){
		$this->isShopLogin();
		
	    $m = D('Home/Attributes');
    	$object = array();
    	if((int)I('id',0)>0){
    		$object = $m->get();
    	}else{
    		$object = $m->getModel();
    		$object['catId'] = (int)I('catId');
    	}
    	$m = D('Home/AttributeCats');
		$this->assign('cat',$m->get((int)$object['catId']));
    	$this->assign('object',$object);
    	$this->assign('umark',"AttributeCats");
		$this->display('shops/attributes/edit');
	}
	/**
	 * 新增/修改操作
	 */
	public function edit(){
		$this->isShopLogin();
		$m = D('Home/Attributes');
    	$rs = array();
    	$rs = $m->edit();
    	$this->ajaxReturn($rs);
	}
	/**
	 * 删除操作
	 */
	public function del(){
		$this->isShopLogin();
		$m = D('Home/Attributes');
    	$rs = $m->del();
    	$this->ajaxReturn($rs);
	}
	/**
	 * 分页查询
	 */
	public function index(){
		$this->isShopLogin();
		$m = D('Home/AttributeCats');
		$this->assign('cat',$m->get((int)I('catId')));
		$this->assign('catList',$m->queryByList());
		$m = D('Home/Attributes');
    	$list = $m->queryByPage();
    	$this->assign('List',$list);
    	$this->assign('umark',"AttributeCats");
        $this->display("shops/attributes/list");
	}
	
	/**
	 * 获取列表
	 */
	public function getAttributes(){
		$m = D('Home/Attributes');
    	$list = $m->queryByListForGoods();
    	$rs = array('status'=>1,'list'=>$list);
    	$this->ajaxReturn($rs);
	}
};
?>

//===-- FindAllMacros.cpp - find all macros ---------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "FindAllMacros.h"
#include "HeaderMapCollector.h"
#