$shake = new Shake(); $uid=$_COOKIE[USER_COOKIE_ID]; $url = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid='.$config["appid"].'&redirect_uri='.htmlspecialchars($config["redirect_uri"]).'&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect'; if($uid){ $user = $shake->getUser($uid,$config['appid']); if(!$user||$user['expiretime']<time()){//用户不存在或者过期 header("Location:".$url); exit; } }else{ header("Location:".$url); exit; } $openid = $user['openid']; $list = $shake->getPrizeList($openid); date_default_timezone_set('Asia/Shanghai'); ?> <!DOCTYPE html> <html> <head lang="en"> <meta http-equiv="Content-Type"> <meta content="text/html; charset=utf-8"> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"> <meta name="format-detection" content="telephone=no"> <meta name="format-detection" content="email=no"> <title>我的现金券</title> <style> html,body{width: 100%;height: 100%;} html,body,img,input,ul,li{