@AliceXT
2016-01-05T02:48:17.000000Z
字数 851
阅读 417
分销系统
开发进程 | 日期 |
---|---|
学习开发文档 | 2015-10-8,2015-10-9 |
编写前端页面 | 2015-10-10 |
测试调试代码 | 2015-10-12,2015-10-13 |
重新写代码 | 2015-11-23 |
调试测试,化繁为简 | 2015-11-24 |
public function getAccessToken(){
$token = I('state');
$tmp = session('oauth_access_token'.$token);
if(!empty($tmp)){
return ;
}
$appinfo = get_token_appinfo();
$timestamp = time();
$noncestr = get_rand_char();
$url = GetCurUrl ();
$redirect_url = $url;
$code = I('code');
if(empty($code)){//获取code
$this->get_oath_code($url);
}else{//获取access_token
$content = $this->get_oath_accesstoken($token,$code);
$value = $content['access_token'];
session('oauth_access_token'.$token,$value);
}
}
获取access_token可以在获取地址页面打开时获得,换句话说就是嵌入到buyNowShow和orderShow里面
选址前
选址中
选址后