Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

调用接口次数超过最大限制问题 #493

Closed
yhs603 opened this issue Aug 22, 2016 · 1 comment
Closed

调用接口次数超过最大限制问题 #493

yhs603 opened this issue Aug 22, 2016 · 1 comment

Comments

@yhs603
Copy link

yhs603 commented Aug 22, 2016

我用的环境

PHP 版本:7.0
overtrue/wechat 版本:3.0

问题及现象

项目采用laravel框架开发;管理后台中部分操作会使用到easywechat中的部分接口,例如自定义菜单发布、停用等;调用到微信接口的地方代码如下:
protected $options;
protected $app;
protected $server;
protected $keywords_model;

public function __construct()
{
    parent::__construct();

    $this->options = config('wechat');
    $this->app = new Application($this->options);
    $this->server = $this->app->server;

    $this->keywords_model = new Keywords();
}

public function getEdit(Request $request)
{
    $id = $request->get('id');

    $res = [];
    if (isset($id))
        $res = $this->keywords_model->where('id', $id)->first()->toArray();

    $lists = $this->app->material->lists('news');
    return view('admin.keywords.edit', ['lists' => $lists, 'res' => $res]);
}

本地测试采用的是ngrok和微信的测试公众号,其中编辑页面会调用到获取永久素材的接口,很多次都会出现“reach max api daily quota limit hint”的错误提示。

@overtrue
Copy link
Collaborator

@yhs603 这问题我可解决不了,你要么把调用结果缓存起来,要么你就找微信给你放开点限制。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants