123456789101112131415161718192021222324252627282930313233 |
- <?php
- namespace app\api\controller\v1;
- use app\api\controller\Base;
- use app\hander\HelpHander;
- use think\Db;
- class GreenAddr extends Base
- {
- public function sweepCode(){
- $code = input('code','','trim');
- $taskId = input('taskId/d',0);
- $greenAddrId = input('greenAddrId/d',0);
- $ret = model('GreenAddr')->sweepCode($code,$this->orgId,$this->userId,$taskId,$greenAddrId);
- if($ret){
- HelpHander::success($ret);
- }else{
- HelpHander::error(model('GreenAddr')->getError());
- }
- }
- public function getAddrInfo(){
- $id = input('id',0);
- $info = Db::name('green_addr')->field('id,title,content,img')->where('id',$id)->find();
- if($info){
- HelpHander::success($info);
- }else{
- HelpHander::error('参数错误');
- }
- }
- }
|