table = 'yz_uniacid_app'; } } public static function getAccountByUniacid($uniacid) { if (!config('app.framework') == 'platform' || file_exists(base_path().'/bootstrap/install.lock')) { //这里使用laravel Cache是因为商城cache调用了Yunshop::app()->uniacid导致死循环 return Cache::remember('account_app_'.$uniacid,3600,function () use ($uniacid) { return self::where('uniacid', $uniacid)->first(); }); } } /** * 设置公众号 * @param $account */ public static function setConfig($account) { if($account){ \Config::set('wechat.app_id',$account->key); \Config::set('wechat.secret',$account->secret); \Config::set('wechat.token',$account->token); \Config::set('wechat.aes_key',$account->encodingaeskey); } return; } }