<?php
/* versionbeta:name
 * versionbeta:number
 * versionbeta:site
 * versionbeta:pubtime
 */
require "inc.php";
if(!cls_obj::get("cls_user")->is_login() && isset($_GET['code']) && isset($_GET['state']) && $_GET['state'] == 'weixinlogin') {
	$arr = cls_obj::get('cls_com')->userapi("login_token" , array("jump_url"=>'' , "plat" => 'wx'));
}
//是否整合微信
if(fun_is::set("app_weixin")) {
	cls_obj::get("cls_session")->set("weixin",1);
	$certify = cls_config::get("certify" , 'weixin' , '' ,'');
	if($certify == 1 && cls_obj::get("cls_user")->is_login() == false) {//未登录则自动跳转微信登录
		$url = cls_config::get("url");
		$jump_url = fun_get::url(array('app_weixin'=>''));
		$jump_url = urlencode(cls_config::get("domain") . $jump_url);
		fun_base::url_jump( $url . '/common.php?app=api.login&plat=weixin&jump_url=' . $jump_url);
		exit;
	}
} else if(fun_is::weixin()) {
	cls_obj::get("cls_session")->set("weixin",1);
}
$agent = "iphone";
cls_app::on_load("default" , "wap");