錯(cuò)誤描述:短信驗(yàn)證碼登錄、申請(qǐng)開(kāi)票時(shí)接口報(bào)錯(cuò)內(nèi)容如下
修復(fù)方法:
1、打開(kāi)文件:crmeb/services/SmsService.php將以下內(nèi)容:
public function __construct()
{
$this->accessKey = sys_config('yihaotong_appid', '');
$this->secretKey = sys_config('yihaotong_appsecret', '');
$this->cache = app()->cache;
$token = new AccessToken();
$accessToken = $token->setConfig($this->accessKey, $this->secretKey)
->setCache(app('cache.store'))->setBaseUri('https://api.crmeb.com/api/v2');
$this->factory = Factory::setAccessToken($accessToken);
}
修改為:
public function __construct()
{
$this->accessKey = sys_config('yihaotong_appid', '');
$this->secretKey = sys_config('yihaotong_appsecret', '');
$this->cache = app()->cache;
$this->factory = Factory::setAccessToken(new AccessToken([
'access_key'=>$this->accessKey,
'secret_key'=>$this->secretKey,
'base_url'=>'https://api.crmeb.com/api/v2',
],app('cache.store')));
}
2、保存文件,重啟項(xiàng)目守護(hù)進(jìn)程