
<?php

class EvaluateController extends \Our\Controller_AbstractApi {

    private $evaluationService;
    public function init(){
        parent::init();
        $this->evaluationService = \Business\Goods\EvaluationServiceModel::getInstance();
    }

    public function getGoodsAction(){

        $info = $this->evaluationService->getGoods($this->req[\Our\NameConst::data],$this->memberId);
        $this->success($info);
    }

    public function testAction(){
        $info = $this->evaluationService->addBrowseRecord($this->req[\Our\NameConst::data],$this->memberId);
    }

    public function submitAction(){
        $this->evaluationService->submit($this->req[\Our\NameConst::data],$this->memberId);
        unset($this->req[\Our\NameConst::data]['images']);
        $this->success('','评价成功','评价成功');
    }

}