1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
-
-
- namespace app\common\controller;
- use think\Session;
- use think\WeappController;
- class Weapp extends WeappController {
-
-
-
- function __construct()
- {
- parent::__construct();
- }
-
-
-
- public function _initialize()
- {
- if (!session_id()) {
- Session::start();
- }
- header("Cache-control: private");
- $this->session_id = session_id();
- !defined('SESSION_ID') && define('SESSION_ID', $this->session_id);
- }
-
-
-
- public function language_access()
- {
- if (is_language() && $this->main_lang != $this->admin_lang) {
- $lang_title = model('Language')->where('mark',$this->main_lang)->value('title');
- $this->error('当前语言没有此功能,请切换到【'.$lang_title.'】语言');
- }
- }
- }
|