Exemplo n.º 1
0
    <style>a,body,div,footer,h1,h2,h3,h4,h5,h6,header,html,img,input,li,p,section,select,span,textarea,ul{margin:0;padding:0;-webkit-tap-highlight-color:rgba(255,0,0,0);border:none;outline:0;-webkit-touch-callout:none}html{min-height:100%}body{min-height:100%;font-family:'\5FAE\8F6F\96C5\9ED1','黑体','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:30px;background:#f5f5eb}a,body{color:#000}.fixed-bottom,.fixed-screen-bottom{position:fixed;width:100%;height:100%;left:0;bottom:0}.clearfix:after,.clearfix:before{display:table;line-height:0;content:""}.clearfix:after{clear:both}a{text-decoration:none}img{max-width:100%}li{list-style:none}.fl{float:left}.fr{float:right}.radius5{border-radius:5px}.radius10{border-radius:10px}.hide{display:none}.show{display:block}.show-in{display:inline-block}.fixed-bottom{-webkit-backface-visibility:hidden}.fixed-bottom.blackbg{background:#292928;background:rgba(41,41,40,.95)}.icon,.icon-del-img{display:inline-block}.icon{background:url(http://cdnst.momocdn.com/static/m4/img/icon.png?20150126) no-repeat;background-size:250px auto;vertical-align:middle}</style>

    <script src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript"></script>

    <?php 
define('APP_DIR', dirname(__FILE__));
require_once APP_DIR . '/action/weixin.php';
require_once APP_DIR . '/action/uber.php';
$appid = 'wx895ed4a1115b7e54';
$appsecret = 'd4624c36b6795d1d99dcf0547af5443d';
$weixin = new Weixin($appid, $appsecret);
$uber_appid = 'cmLDMkZ4cr9rivGlPd8Z6AQM-gdwiU2t';
$uber_appsecret = 'q7ImotFQf1BsgKhsT0STUrq0Vd8IquRSpcoBdS4A';
$uber = new Uber($uber_appid, $uber_appsecret, 'profile');
if (get('code') && get('state') == 'authorization') {
    $uber->oauth();
    exit;
}
$uber->gotoOAuth();
$jsSDK = $weixin->getJsApiConf();
?>

    <script>

        var UberHackthon = {
            ajax : function( url, data, callback, method, errorCallback ) {
                var xhr = new window.XMLHttpRequest;
                var sdata = data || '' ;
                xhr.onreadystatechange = function(){
                    if ( xhr.readyState == 4 ) {
                        if( xhr.status == 200 ) {