request = is_null($request) ? Request::instance() : $request; // 定义常量 $this->definedConstant(); // gbk_collection(); // $result = load_taoke_registration(); // if(!$result['status']) fault($result['msg']); } /** * 定义常量 * */ protected function definedConstant() { $header = $this->request->header(''); // 容错定义 define('ACCESS_TOKEN', $this->request->header('token', '')); define("MOBILE_INFO",isset($header['mobileinfo']) && !empty($header['mobileinfo']) ? strtoupper($header['mobileinfo']) : 'IOS'); define('APP_VERSION', $this->request->header('appVersion', '')); //if(empty(APP_VERSION)) fault("版本号错误"); define('UDER_ORIG',md5(request()->domain().rand(1000,9999))); define('TAOKE_TOKEN',md5('taoke_token'.rand(1000,9999))); define('TAOKE_SIGN',md5('taoke_sign'.rand(1000,9999))); define('ORDER_MENTH',md5('order_menth'.rand(1000,9999))); define('ORDER_STATUS',md5('order_status'.rand(1000,9999))); } protected function checkSign() { return true; } protected function round_time() { return time(); } }