1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <?php
- namespace app\api\controller;
- use app\common\controller\Api;
- use app\common\library\Tenim;
- use think\Db;
- class Demo extends Api
- {
-
-
-
-
-
- protected $noNeedLogin = ['test', 'test1'];
-
- protected $noNeedRight = ['test2'];
-
- public function test()
- {
-
- $tenim = new Tenim();
- $user_list = Db::name('user')->order('id asc')->select();
- foreach($user_list as $key => $user){
- $rs = $tenim->register(''.$user['id'],$user['nickname'],'');
- }
- }
-
- public function test1()
- {
- $this->success('返回成功', ['action' => 'test1']);
- }
-
- public function test2()
- {
- $this->success('返回成功', ['action' => 'test2']);
- }
-
- public function test3()
- {
- $this->success('返回成功', ['action' => 'test3']);
- }
- }
|