跳轉(zhuǎn)所需數(shù)據(jù)只能用同步給到前端,否則無法跳轉(zhuǎn)
//測試頁面
? ? public function test20200909(){
? ? ? ? //獲取微信參數(shù)
? ? ? ? $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');
? ? }