12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <?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()
- {
- $address = $this->ip_to_address();
- $address = $address['provincename'].$address['cityname'];
- dump($address);
- }
-
- public function test2()
- {
- $this->success('返回成功', ['action' => 'test2']);
- }
-
- public function test3()
- {
- $this->success('返回成功', ['action' => 'test3']);
- }
- }
|