作者 景龙
1 个管道 的构建 通过 耗费 0 秒

调式移动微信登录

... ... @@ -24,8 +24,11 @@ class LoginController extends HomeBaseController
private $appsecret = 'd80b43a1e74e8ba095590b36a3459480';//微博appsecret
private $redirect_uri = 'http://www.starplanet.cn/portal/login/wb_login';//回调地址
private $appkey1 = 'wx9cfa880272f186bf';//微信appkey
private $appsecret1 = '11b643393b1e54d6ef5eaa984ba4e545';//微信appsecret
private $appkey1 = 'wx9cfa880272f186bf';//微信开放平台appkey
private $appsecret1 = '11b643393b1e54d6ef5eaa984ba4e545';//微信开放平台appsecret
private $appkey2 = 'wx0bd7bc2aa0f332d6';//微信公众号appkey
private $appsecret2 = 'b62e49f48f48de7b7fff2ea0af3939de';//微信公众号appsecret
//登录页面
public function login(){
return $this->fetch();
... ... @@ -410,7 +413,10 @@ class LoginController extends HomeBaseController
//第三方微信移动端网页登录
public function wx_login_mobile(){
$url = 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid='.$this->appkey2.'&secret='.$this->appsecret2;
$res = $this->http_get($url);
$json_arr = json_decode($res,true);
var_dump($json_arr);exit;
}
//第三方微博登录
... ...
... ... @@ -44,7 +44,7 @@
<div class="index_tenth_seconds">
<div class="index_tenth_second">
<div class="index_tenth_second_one">
<div class="index_tenth_second_img" id="login">
<div class="index_tenth_second_img" id="wx_login">
<img src="__TMPL__/public/assets/images/cicon_71@2x.png" alt="" />
</div>
<div class="index_tenth_second_title">
... ...
... ... @@ -266,6 +266,11 @@ $(function() {
$('#wb_login').click(function(){
$('#wb_form').submit();
});
//微信登录
$('#wx_login').click(function(){
window.location.href = '/portal/login/wx_login_mobile';
});
});
//第三方分享
function thirdShare(url){
... ...