diff --git a/fangija-zsyf/js/login/wxLogin.js b/fangija-zsyf/js/login/wxLogin.js index bcf9faa..1b144a1 100644 --- a/fangija-zsyf/js/login/wxLogin.js +++ b/fangija-zsyf/js/login/wxLogin.js @@ -1,8 +1,39 @@ +var auths = {} +function plusReady() { + plus.oauth.getServices(function(services) { + alert("111111111111111111111111") + auths = services; + }, function(e) { + alert("获取登录服务列表失败:" + e.message + " - " + e.code); + }); +} +document.addEventListener('plusready',plusReady,false); +// 登录认证 +function webChatLogin(){ + var auth=auths['weixin']; + if(auth){ + var w=null; + if(plus.os.name=="Android"){ + w=plus.nativeUI.showWaiting(); + } + document.addEventListener("pause",function(){ + setTimeout(function(){ + w&&w.close();w=null; + },2000); + }, false ); + auth.login(function(){ + w&&w.close();w=null; + userinfo(auth); + },function(e){ + w&&w.close();w=null; + $.toast("登录认证失败:["+e.code+"]:"+e.message); + }); + }else{ + $.toast("无效的登录认证通道!"); + $.toast("无效的登录认证通道!",null,"登录"); + } +} -$("#wxLogin").addEventListener('tap',function() { - console.log("微信"); - authLogin('weixin'); -}) function authLogin(type) { console.log("hhhhhhhhhhhhhhhhhhh") } diff --git a/fangija-zsyf/views/news/newsDetail.html b/fangija-zsyf/views/news/newsDetail.html index 5e65366..d1fdc8c 100644 --- a/fangija-zsyf/views/news/newsDetail.html +++ b/fangija-zsyf/views/news/newsDetail.html @@ -16,6 +16,7 @@ @@ -81,7 +82,7 @@ @@ -116,7 +117,7 @@ $.config = {router: false} \ No newline at end of file diff --git a/fangija-zsyf/views/user/codeSms.html b/fangija-zsyf/views/user/codeSms.html index 162b884..dd132a4 100644 --- a/fangija-zsyf/views/user/codeSms.html +++ b/fangija-zsyf/views/user/codeSms.html @@ -71,7 +71,7 @@ 第三方登录

- +

@@ -101,14 +101,6 @@ $.config = {router: false}