Commit 1eb27d4f authored by 章建武's avatar 章建武

dep

parent f1dda8d3
......@@ -20,20 +20,20 @@ class IndexController extends Controller
//生成图片
public function get_pic (){
session_start();
// if (!$_SESSION["headimgurl"]) {
// redirect('http://mallapp.guoguodz.com/test_h5/appwww/index.php/WxAuthorize');
// return;
// }
// if($_SERVER['QUERY_STRING']){
// $url = '?'.$_SERVER['QUERY_STRING'];
// }
// $link = 'http://'.$_SERVER["HTTP_HOST"].'/test_h5/appwww/index.php'.$url;
//
// $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
// $nonceStr = "";
// for ($i = 0; $i < 16; $i++) {
// $nonceStr .= substr($chars, mt_rand(0, strlen($chars) - 1), 1);
// }
if (!$_SESSION["headimgurl"]) {
redirect('http://mallapp.guoguodz.com/test_h5/appwww/index.php/WxAuthorize');
return;
}
if($_SERVER['QUERY_STRING']){
$url = '?'.$_SERVER['QUERY_STRING'];
}
$link = 'http://'.$_SERVER["HTTP_HOST"].'/test_h5/appwww/index.php'.$url;
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
$nonceStr = "";
for ($i = 0; $i < 16; $i++) {
$nonceStr .= substr($chars, mt_rand(0, strlen($chars) - 1), 1);
}
$weChatApi = WechatWebApi::getInstance();
$wxToken = S('wx_token');
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