|
|
@@ -34,7 +34,7 @@ use think\facade\Log;
|
|
|
class DouYinController extends BaseApiController
|
|
|
{
|
|
|
|
|
|
- public array $notNeedLogin = ['testNotify','getClientToken','register','account','getAllGoods','getGoodsDetail','submitOrderNotify','payNotify','payTailNotify'];
|
|
|
+ public array $notNeedLogin = ['testNotify','getClientToken','getOpenid','register','account','goodsNotify','getAllGoods','getGoodsDetail','submitOrderNotify','payNotify','payTailNotify'];
|
|
|
public function testNotify()
|
|
|
{
|
|
|
$params = $this->request->post();
|
|
|
@@ -102,7 +102,19 @@ class DouYinController extends BaseApiController
|
|
|
return $this->success();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ public function getOpenid()
|
|
|
+ {
|
|
|
+ $params = $this->request->post();
|
|
|
+ $toData = [
|
|
|
+ 'appid' => 'tt74fb0246ebf34b0601',
|
|
|
+ 'secret' => "0c841cc324e8bea8a584d248556d6263fb2dadb2",
|
|
|
+ 'code' => $params['code'],
|
|
|
+ 'anonymous_code' => $params['anonymous_code']
|
|
|
+ ];
|
|
|
+ $res = http_request('https://developer.toutiao.com/api/apps/v2/jscode2session',$toData,['Content-Type' => 'application/json']);
|
|
|
+ Log::info(json_encode($res));
|
|
|
+ return $this->success('',$res);
|
|
|
+ }
|
|
|
// ******************************** 列表详情 _商品 _订单 _退款
|
|
|
/*
|
|
|
* 商品审核结果回调
|