NewsStatisticsController.php 754 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: Hardy
  5. * Date: 2020/7/14
  6. * Time: 15:28
  7. */
  8. namespace App\Http\Controllers\Wechat\Statistic;
  9. use App\Http\Controllers\WechatController;
  10. class NewsStatisticsController extends WechatController
  11. {
  12. public function __construct($_param)
  13. {
  14. $this->$_param =$_param;
  15. $this->gzh_app_id = isset($this->template_info['appid'])?$this->$_param['appid']:'';
  16. if(!empty($this->gzh_app_id)){
  17. parent::__construct($this->gzh_app_id);
  18. }else{
  19. v('appid is null');
  20. }
  21. $this->error_msg = '';
  22. }
  23. public function test()
  24. {
  25. $url = $this->app->url;
  26. $shortUrl = $url->shorten('https://m.ycsd.cn/');
  27. dd($shortUrl);
  28. }
  29. }