1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <?php
- namespace app\api\controller;
- use app\common\controller\Api;
- use app\common\library\Tenim;
- use think\Db;
- class Demo extends Api
- {
-
-
-
-
-
- protected $noNeedLogin = ['*'];
-
- 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'],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']);
- }
- }
|