12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <?php
- namespace App\Client;
- class Site
- {
- protected $site;
- public function __construct()
- {
- $this->site = app()->make('siteData');
- }
- /**
- * 获取appid
- *
- * @return mixed
- */
- public function getAppid()
- {
- return (string)getProp($this->site, 'appid');
- }
- /**
- * 获取app_token
- *
- * @return mixed
- */
- public function getAppToken()
- {
- return (string)getProp($this->site, 'app_token');
- }
- /**
- * 获取公司名
- *
- * @return mixed
- */
- public function getCompanyName()
- {
- return (string)getProp($this->site, 'company_name');
- }
- /**
- * 获取appid
- *
- * @return mixed
- */
- public function getCompanyId()
- {
- return (string)getProp($this->site, 'company_id');
- }
- /**
- * 获取channel_id
- *
- * @return mixed
- */
- public function getChannelId()
- {
- return (array)getProp($this->site, 'channel_id');
- }
- /**
- * 设置全局返回报错数据
- *
- * @param $data
- */
- public function setErrorResponseData($data)
- {
- $this->site->errorResponseData = $data;
- }
- /**
- * 获取全局返回报错数据
- *
- * @return mixed|string
- */
- public function getErrorResponseData()
- {
- return getProp($this->site, 'errorResponseData', []);
- }
- }
|