12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?php
- /**
- * SystemController.php UTF-8
- *
- *
- * @date : 2018/6/20 9:49
- *
- * @license 这不是一个自由软件,未经授权不许任何使用和传播。
- * @author : luowei <lw@huosdk.com>
- * @version : HUOSDK 8.0
- */
- namespace api\wapapp\controller\v8;
- use api\common\controller\V2ApiBaseController;
- use huo\controller\game\Game;
- use huo\controller\member\Oauth;
- use huo\controller\notice\Notice;
- use think\Session;
- class SystemController extends V2ApiBaseController {
- public function _initialize() {
- parent::_initialize();
- }
- /**
- * 初始化
- * http://doc.1tsdk.com/138?page_id=3556
- * 【域名】/system/appinit
- */
- public function appinit() {
- $_game_rq = $this->setGameData();
- $_channel_rq = $this->setChannelData();
- $_device_rq = $this->setDeviceData();
- $_game_class = new Game();
- $_rdata['up_info'] = $_game_class->getUpInfo($_game_rq, $_channel_rq);
- $_notice_class = new Notice();
- $_rdata['notice'] = $_notice_class->getNotice($_game_rq, $_channel_rq, $_device_rq);
- $_rdata['hb_time'] = 120;
- $_rdata['user_token'] = session_id();
- $_rdata['toggle'] = 1;// TODO: wuyonghong 2018/4/24 需要添加函数
- $_rdata['agentgame'] = $_channel_rq->getAgentGame();
- $_rdata['oauth_list'] = (new Oauth())->getOauthConf();
- $_rdata['help'] = [
- 'qq' => '',
- 'qqgroup' => '',
- 'wx' => '',
- 'tel' => '',
- 'servicetime' => '',
- ];// TODO: luowei 2018/6/20 未实现
- $_rdata['splash'] = [
- 'img' => '',
- 'gameid' => '',
- 'url' => '',
- ];// TODO: luowei 2018/6/20 未实现
- $_rdata['newmsg'] = 1;// TODO: luowei 2018/6/20 未实现
-
- $_open_cnt = isset($this->rq_data['open_cnt']) ? $this->rq_data['open_cnt'] : 1;
- Session::set('open_cnt', $_open_cnt);
- Session::set('app_id', $_game_rq->getHAppId(), 'app');
- $this->success(lang('SUCCESS'), $_rdata);
- }
- }
|