公众号H5跳转小程序

跳转所需数据只能用同步给到前端,否则无法跳转

//测试页面

    public function test20200909(){

        //获取微信参数

        $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";

        $url = "$protocol$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";

        //echo $url;die;

        $wx = A('JdApi')->getWxData($url);

        $this->assign('con',$wx);

        $this->display('condvoucher_20200909');

    }

你可能感兴趣的:(公众号H5跳转小程序)