order('id asc')->select(); foreach($user_list as $key => $user){ $rs = $tenim->register(''.$user['id'],$user['nickname'],localpath_to_netpath($user['avatar'])); } } /** * 无需登录的接口 * */ public function test1() { $address = $this->ip_to_address(); $address = $address['provincename'].$address['cityname']; dump($address); } /** * 需要登录的接口 * */ public function test2() { $tenim = new \app\api\controller\Tenim; $tenim->sendMessageToUser(1, 11, 'TA送给你一个礼物送给你一个礼物', 1); } /** * 需要登录且需要验证有相应组的权限 * */ public function test3() { $this->success('返回成功', ['action' => 'test3']); } }