25 lines
637 B
PHP
25 lines
637 B
PHP
<?php
|
|
namespace addon\aliapp\api\controller;
|
|
use addon\aliapp\model\AliPayApplet;
|
|
use app\api\controller\BaseApi;
|
|
use think\Exception;
|
|
class Aliapp extends BaseApi
|
|
{
|
|
|
|
public function authcodetouserid()
|
|
{
|
|
try {
|
|
$aliPayAppletModel = new AliPayApplet($this->site_id);
|
|
$baseInfo = $aliPayAppletModel->loginBaseInfo($this->params['code']);
|
|
return $this->response($baseInfo);
|
|
} catch (Exception $e) {
|
|
return $this->response([]);
|
|
}
|
|
}
|
|
|
|
//用户订阅消息
|
|
public function messagetmplids()
|
|
{
|
|
return $this->response($this->success());
|
|
}
|
|
} |