<?php /** * Created by PhpStorm. * User: Hardy * Date: 2020/7/14 * Time: 15:28 */ namespace App\Http\Controllers\Wechat\Statistic; use App\Http\Controllers\WechatController; class NewsStatisticsController extends WechatController { public function __construct($_param) { $this->$_param =$_param; $this->gzh_app_id = isset($this->template_info['appid'])?$this->$_param['appid']:''; if(!empty($this->gzh_app_id)){ parent::__construct($this->gzh_app_id); }else{ v('appid is null'); } $this->error_msg = ''; } public function test() { $url = $this->app->url; $shortUrl = $url->shorten('https://m.ycsd.cn/'); dd($shortUrl); } }