Video.Class.php 924 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * 腾讯云点播类
  4. * Created by PhpStorm.
  5. * User: phperstar
  6. * Date: 2019/10/28
  7. * Time: 10:29 AM
  8. */
  9. namespace HeZuoQiao\Controller\Common;
  10. use Mall\Framework\Core\ErrorCode;
  11. use Mall\Framework\Factory;
  12. use HeZuoQiao\Controller\BaseController;
  13. use Util\TencentCloud\Vod;
  14. class Video extends BaseController
  15. {
  16. /**
  17. * 小程序登陆接口
  18. */
  19. public function getUploadSign()
  20. {
  21. $ConfigData = Factory::config()->get('tencentCloud');
  22. if(empty($ConfigData)){
  23. $this->sendOutput('腾讯云配置项错误',ErrorCode::$configEroor);
  24. }
  25. $objVod = new Vod($ConfigData['secretId'], $ConfigData['secretKey']);
  26. $result = $objVod->getUploadSign();
  27. if ($result->isSuccess()) {
  28. parent::sendOutput($result->getData());
  29. } else {
  30. parent::sendOutput($result->getData(), $result->getErrorCode());
  31. }
  32. }
  33. }