getWeappConfig($this->site_id); return array_merge($config_info, $this->getWeappStaticInfo()); } /** * 设置配置 * @param array $data * @return SysConfig|bool|Model */ public function setWeappConfig(array $data){ return (new CoreWeappConfigService())->setWeappConfig($this->site_id, $data); } /** *查询微信小程序需要的静态信息 * @return array */ public function getWeappStaticInfo(){ $domain = request()->domain(); return [ 'serve_url' => (string)url('/api/weapp/serve/'.$this->site_id, [],'',true), 'request_url' => $domain, 'socket_url' => "wss://".request()->host(), 'upload_url' => $domain, 'download_url' => $domain, 'upload_ip' => '8.140.96.55' ]; } }