Commit 05b62b96 authored by 章建武's avatar 章建武

dep

parent 91cd97f3
...@@ -20,20 +20,20 @@ class IndexController extends Controller ...@@ -20,20 +20,20 @@ class IndexController extends Controller
//生成图片 //生成图片
public function get_pic (){ public function get_pic (){
session_start(); session_start();
if (!$_SESSION["headimgurl"]) { // if (!$_SESSION["headimgurl"]) {
redirect('http://mallapp.guoguodz.com/test_h5/appwww/index.php/WxAuthorize'); // redirect('http://mallapp.guoguodz.com/test_h5/appwww/index.php/WxAuthorize');
return; // return;
} // }
if($_SERVER['QUERY_STRING']){ // if($_SERVER['QUERY_STRING']){
$url = '?'.$_SERVER['QUERY_STRING']; // $url = '?'.$_SERVER['QUERY_STRING'];
} // }
$link = 'http://'.$_SERVER["HTTP_HOST"].'/test_h5/appwww/index.php'.$url; // $link = 'http://'.$_SERVER["HTTP_HOST"].'/test_h5/appwww/index.php'.$url;
//
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; // $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
$nonceStr = ""; // $nonceStr = "";
for ($i = 0; $i < 16; $i++) { // for ($i = 0; $i < 16; $i++) {
$nonceStr .= substr($chars, mt_rand(0, strlen($chars) - 1), 1); // $nonceStr .= substr($chars, mt_rand(0, strlen($chars) - 1), 1);
} // }
$weChatApi = WechatWebApi::getInstance(); $weChatApi = WechatWebApi::getInstance();
$wxToken = S('wx_token'); $wxToken = S('wx_token');
if (!$wxToken) { if (!$wxToken) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment