123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <?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 = [
- 'id' => 27,
- 'nickname' => '你好a',
- 'avatar' => config('avatar_girl'),
- ];
- $rs = $tenim->useredit(''.$user['id'],$user['nickname'],localpath_to_netpath($user['avatar']));
- dump($rs);
-
- }
-
- 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']);
- }
- public function wechat_pay_apiv2_secret(){
- echo md5('wechat_pay_apiv2_secret_xinglian');
- }
- }
|