<?php
/**
 * User: liuyuzhen
 * Date: 2018/5/11
 * Time: 14:12
 * Description:
 */

class ShortmessageController extends \Our\Controller_AbstractIndex {

    public function init(){
        parent::init();

    }

    public function getValidCodeAction(){
        $shortMessageService = \Business\User\ShortMessageServiceModel::getInstance();
        $memberId = $this->sess->get('member_id');
        $result = $shortMessageService->getValidCode($this->req[\Our\NameConst::data],$memberId);
        if($result['status']){
            $this->success($result['msg']);
        }else{
            \Error\ErrorModel::throwException(\Error\CodeConfigModel::smsSendFail);
        }
    }

}