Browse Source

add - getClientToken

liugc 10 months ago
parent
commit
29aaa93e99
1 changed files with 7 additions and 2 deletions
  1. 7 2
      app/api/controller/DouYinController.php

+ 7 - 2
app/api/controller/DouYinController.php

@@ -34,14 +34,19 @@ use think\facade\Log;
 class DouYinController extends BaseApiController
 class DouYinController extends BaseApiController
 {
 {
 
 
-    public array $notNeedLogin = ['testNotify','register','account','getAllGoods','getGoodsDetail','payNotify'];
-
+    public array $notNeedLogin = ['testNotify','getClientToken','register','account','getAllGoods','getGoodsDetail','payNotify'];
     public function testNotify()
     public function testNotify()
     {
     {
         // https://weixiudev.kyjlkj.com/api/dou_yin/testNotify
         // https://weixiudev.kyjlkj.com/api/dou_yin/testNotify
         $params = $this->request->post();
         $params = $this->request->post();
         Log::info('dy_testNotify:'.json_encode($params));
         Log::info('dy_testNotify:'.json_encode($params));
     }
     }
+
+    public function getClientToken()
+    {
+        $access_token = DouYinService::getClientToken();
+        return $this->success('',['access_token'=>$access_token]);
+    }
     /**
     /**
      * 手机号注册
      * 手机号注册
      * @author liugc <466014217@qq.com>
      * @author liugc <466014217@qq.com>