liugc преди 10 месеца
родител
ревизия
29aaa93e99
променени са 1 файла, в които са добавени 7 реда и са изтрити 2 реда
  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
 {
 
-    public array $notNeedLogin = ['testNotify','register','account','getAllGoods','getGoodsDetail','payNotify'];
-
+    public array $notNeedLogin = ['testNotify','getClientToken','register','account','getAllGoods','getGoodsDetail','payNotify'];
     public function testNotify()
     {
         // https://weixiudev.kyjlkj.com/api/dou_yin/testNotify
         $params = $this->request->post();
         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>