isAjax()) { $h5 = new H5Model(); $res = $h5->refresh(); $this->h5DomainName(); // 修改H5域名 return $res; } else { $refresh_time = 0; if (file_exists('h5/refresh.log')) { $refresh_time = file_get_contents('h5/refresh.log'); } $config_model = new Config(); $config = $config_model->geth5DomainName($this->site_id); $this->assign('config', $config[ 'data' ][ 'value' ]); $this->assign('refresh_time', $refresh_time); $this->assign("root_url", __ROOT__); return $this->fetch('h5/refresh_h5'); } } /** * h5域名配置 */ public function h5DomainName() { $config_model = new Config(); $domain_name = input("domain", ""); $deploy_way = input("deploy_way", "default"); if ($deploy_way == 'default') { $domain_name = __ROOT__ . '/h5'; } $result = $config_model->seth5DomainName([ 'domain_name_h5' => $domain_name, 'deploy_way' => $deploy_way ]); return $result; } /** * 独立部署版下载 */ public function downloadSeparate(){} /** * 下载uniapp源码,混入所选模板代码 * @return array|bool|int|mixed|void */ public function downloadUniapp() {} }