Skip to content

Commit

Permalink
feat:增加插件功能
Browse files Browse the repository at this point in the history
  • Loading branch information
parieses committed Jan 11, 2024
1 parent 9b80da4 commit 70734c1
Show file tree
Hide file tree
Showing 3 changed files with 426 additions and 369 deletions.
8 changes: 8 additions & 0 deletions Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,21 @@ function generate($ToUserName, $FromUserName, $Content, $MsgType = 'text')
$format = "<xml><ToUserName><![CDATA[%s]]></ToUserName><FromUserName><![CDATA[%s]]></FromUserName><CreateTime>%s</CreateTime><MsgType><![CDATA[text]]></MsgType><Content><![CDATA[%s]]></Content></xml>";
return sprintf($format, $ToUserName, $FromUserName, time(), $Content);
}



$componentAppId = 'wx108c9cc5a36ef1b0';
$componentAppSecret = '10cbbc0b28fa9dee578b8bf0f2696e48';
//消息校验Token
$token = 'henanwaifu';
//消息加解密Key
$encodingAesKey = '1CD37E73D5D74B439A167DE3014FD882521XINGFULI';
$xml = generate('admin', 'admin', 'hello world');

$model = new \WeChat\library\OtherApplet();
$data = ['action'=>'list','plugin_appid'=>'wxfd41bbd0f83ffe83','reason'=>'1231313'];
$a = $model->plugin("76_ndpkppYEDzfu2eUDQ_ev-xcaeMnTbdQZYc4Iyn2k8xk2YaTh-f5EueQX94mDh7bxxi5mZSUy9AGZetf8I1XRxfbAvT7DbY4jNJ1NqCuv9ezkL_yCoFhexG9XNgJbziD4TZ1f2tk7kWK0EeA8RGNgAEDZOV",$data);
var_dump($a);die();
//$weChat = new WeChatServer(Authorization::class, ['componentAppId' => $componentAppId, 'componentAppSecret' => $componentAppSecret, 'token' => $token, 'encodingAesKey' => $encodingAesKey]);
//$data = ['ticket' => 'znki2rGXe30AWTWliIrpKBVxUNf-TOQQ-54RQrXqdCULxUOtlxksDlk0batVSuzL75xvz-cbpOnKPK1tlXsqqw'];
//var_dump($weChat->exec('getComponentAccessToken',$data));
Expand Down
8 changes: 8 additions & 0 deletions src/UrlConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,4 +312,12 @@ class UrlConfig
public const weDataUnbindUser = self::baseUrl . '/wedata/wedata_unbind_user?access_token=';
//用户PC端登录
public const weDataLogin = self::baseUrl . '/wedata/wedata_login?access_token=';
/**
* 插件管理
* @RUL:https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/plugin-management/managePluginApplication.html
*/
//插件申请管理
public const devplugin = self::baseUrl. '/wxa/devplugin?access_token=';
//插件管理
public const plugin = self::baseUrl. '/wxa/plugin?access_token=';
}

0 comments on commit 70734c1

Please sign in to comment.