OrderController.class.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. namespace Home\Controller;
  3. use Think\Model;
  4. /**
  5. * 首页
  6. * @author Devil
  7. * @blog http://gong.gg/
  8. * @version 0.0.1
  9. * @datetime 2016-12-01T21:51:08+0800
  10. */
  11. class OrderController extends CommonController {
  12. /**
  13. * 鉴权接口
  14. */
  15. public function contentCTCAuth() {
  16. error_reporting(0);
  17. $map['userid'] = I('uid');
  18. $map['contentcode'] = I('contentcode');
  19. $map['usertoken'] = I('usertoken');
  20. $map['version'] = I('version');
  21. $map['mac'] = I('mac');
  22. $map['fromsource'] = 15;
  23. $prame = http_build_query($map);
  24. //$url = 'http://183.215.118.129:6600/SPM/Interface/ContentCmccAuth.action?' . $prame;
  25. $url = 'http://10.2.219.176:6600/SPM/Interface/ContentCmccAuth.action?' . $prame;
  26. // \Think\Log::record('-------contentCTCAuth url------' . $url, \Think\Log::INFO); //记录参数
  27. $result = $this->http($url);
  28. Writelog(json_encode($result,JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES),$url,'activityv2');
  29. if ($result[0] != 200) {
  30. $this->responseError('接口请求失败');
  31. }
  32. // \Think\Log::record('-------contentCTCAuth result------' . $result[1], \Think\Log::INFO); //记录参数
  33. $result = json_decode($result[1]);
  34. // $result = '{"Message":"","Result":0,"count":0,"week":0}';
  35. $data['result'] = $result->Result;
  36. $this->responseSuccess($data, '查询成功!');
  37. }
  38. public function iptv_contentCTCAuth() {
  39. error_reporting(0);
  40. $map['userid'] = I('uid');
  41. $map['contentcode'] = I('contentcode');
  42. $map['usertoken'] = I('usertoken');
  43. $map['version'] = I('version');
  44. $map['mac'] = I('mac');
  45. $map['fromsource'] = 15;
  46. $map['stb_id'] = I('stb_id');
  47. $map['epgCityCode'] =I('epgCityCode');
  48. $map['epgProvince'] = I('epgProvince');
  49. $map['accountIdentity'] = I('accountIdentity');
  50. $prame = http_build_query($map);
  51. // $url = 'http://10.2.219.176:6600/SPM/Interface/ContentCmccAuth.action?' . $prame;
  52. $url = 'http://10.2.219.139:6600/SPM/Interface/ContentCmccIPTVAuth.action?' . $prame;
  53. // \Think\Log::record('-------contentCTCAuth url------' . $url, \Think\Log::INFO); //记录参数
  54. $result = $this->http($url);
  55. Writelog(json_encode($result,JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES),$url,'auth');
  56. if ($result[0] != 200) {
  57. $this->responseError('接口请求失败');
  58. }
  59. // \Think\Log::record('-------contentCTCAuth result------' . $result[1], \Think\Log::INFO); //记录参数
  60. $result = json_decode($result[1]);
  61. // $result = '{"Message":"","Result":0,"count":0,"week":0}';
  62. $data['result'] = $result->Result;
  63. $this->responseSuccess($data, '查询成功!');
  64. }
  65. }