123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <?php
- namespace Home\Controller;
- use Think\Model;
- /**
- * 首页
- * @author Devil
- * @blog http://gong.gg/
- * @version 0.0.1
- * @datetime 2016-12-01T21:51:08+0800
- */
- class OrderController extends CommonController {
- /**
- * 鉴权接口
- */
- public function contentCTCAuth() {
- error_reporting(0);
- $map['userid'] = I('uid');
- $map['contentcode'] = I('contentcode');
- $map['usertoken'] = I('usertoken');
- $map['version'] = I('version');
- $map['mac'] = I('mac');
- $map['fromsource'] = 15;
- $prame = http_build_query($map);
- //$url = 'http://183.215.118.129:6600/SPM/Interface/ContentCmccAuth.action?' . $prame;
- $url = 'http://10.2.219.176:6600/SPM/Interface/ContentCmccAuth.action?' . $prame;
- // \Think\Log::record('-------contentCTCAuth url------' . $url, \Think\Log::INFO); //记录参数
- $result = $this->http($url);
- Writelog(json_encode($result,JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES),$url,'activityv2');
- if ($result[0] != 200) {
- $this->responseError('接口请求失败');
- }
- // \Think\Log::record('-------contentCTCAuth result------' . $result[1], \Think\Log::INFO); //记录参数
- $result = json_decode($result[1]);
- // $result = '{"Message":"","Result":0,"count":0,"week":0}';
- $data['result'] = $result->Result;
- $this->responseSuccess($data, '查询成功!');
- }
- public function iptv_contentCTCAuth() {
- error_reporting(0);
- $map['userid'] = I('uid');
- $map['contentcode'] = I('contentcode');
- $map['usertoken'] = I('usertoken');
- $map['version'] = I('version');
- $map['mac'] = I('mac');
- $map['fromsource'] = 15;
- $map['stb_id'] = I('stb_id');
- $map['epgCityCode'] =I('epgCityCode');
- $map['epgProvince'] = I('epgProvince');
- $map['accountIdentity'] = I('accountIdentity');
- $prame = http_build_query($map);
- // $url = 'http://10.2.219.176:6600/SPM/Interface/ContentCmccAuth.action?' . $prame;
- $url = 'http://10.2.219.139:6600/SPM/Interface/ContentCmccIPTVAuth.action?' . $prame;
- // \Think\Log::record('-------contentCTCAuth url------' . $url, \Think\Log::INFO); //记录参数
- $result = $this->http($url);
- Writelog(json_encode($result,JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES),$url,'auth');
- if ($result[0] != 200) {
- $this->responseError('接口请求失败');
- }
- // \Think\Log::record('-------contentCTCAuth result------' . $result[1], \Think\Log::INFO); //记录参数
- $result = json_decode($result[1]);
- // $result = '{"Message":"","Result":0,"count":0,"week":0}';
- $data['result'] = $result->Result;
- $this->responseSuccess($data, '查询成功!');
- }
- }
|