From 60999a8d9449d496dc4800ca6e4475826cb3fc9f Mon Sep 17 00:00:00 2001 From: hubingliang Date: Fri, 30 Mar 2018 14:59:33 +0800 Subject: [PATCH 1/4] =?UTF-8?q?3=E6=96=B9=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/js/login/wxLogin.js | 39 +++++++++++++++++++++++++--- fangija-zsyf/views/user/codeSms.html | 10 +------ 2 files changed, 36 insertions(+), 13 deletions(-) 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/user/codeSms.html b/fangija-zsyf/views/user/codeSms.html index 9427781..85e71d4 100644 --- a/fangija-zsyf/views/user/codeSms.html +++ b/fangija-zsyf/views/user/codeSms.html @@ -72,7 +72,7 @@ 第三方登录

- +

@@ -101,14 +101,6 @@ $.config = {router: false} \ No newline at end of file diff --git a/fangija-zsyf/yfindex.html b/fangija-zsyf/yfindex.html index 6c6500d..020b223 100644 --- a/fangija-zsyf/yfindex.html +++ b/fangija-zsyf/yfindex.html @@ -1253,7 +1253,6 @@ function getPosition(){ $("#input_city").text("北京"); getDistrictList($("#input_city").text(),0,0,"",6,0,0,"");*/ - initBaseInfo(city,region,address,lat,lng); if(city!="上海"){ initRegionSelect(city); @@ -1269,7 +1268,9 @@ function getPosition(){ initRegionSelect(city); localStorage.setItem("init_city", city); addLocation(lat,lng); - initBaseInfo(city,"","",0,0); + initBaseInfo(city,"","",0,0); + $("#ShangHaiDiv").show(); + $("#otherCityDiv").hide(); }, { provider:'baidu', @@ -1703,7 +1704,7 @@ function addItems(number, lastIndex) { ''+ ''; @@ -1803,7 +1804,7 @@ function addItems(number, lastIndex) { dataObj[i].title+''+ '
'+dataObj[i].introduction+'
'+ '
'+ - '
'+ + ''+ '
'+ ''; } @@ -2250,7 +2251,7 @@ $("body").delegate("#select_region .button", "click", function () { var minPrice = 0; var maxPrice = 0; if(select_price.indexOf("以上")!=-1){ - select_price = select_price.replaceAll("以上",""); + select_price = select_price.replace("以上",""); minPrice = parseInt(select_price); maxPrice = 0; }else if(select_price.indexOf("不限")!=-1){ @@ -2325,7 +2326,7 @@ $(".confirm_btn").on("click", function () { var minPrice = 0; var maxPrice = 0; if(select_price.indexOf("以上")!=-1){ - select_price = select_price.replaceAll("以上",""); + select_price = select_price.replace("以上",""); minPrice = parseInt(select_price); maxPrice = 0; }else if(select_price.indexOf("不限")!=-1){ @@ -2378,7 +2379,7 @@ $("#select_order li").on("click", function () { var minPrice = 0; var maxPrice = 0; if(select_price.indexOf("以上")!=-1){ - select_price = select_price.replaceAll("以上",""); + select_price = select_price.replace("以上",""); minPrice = parseInt(select_price); maxPrice = 0; }else if(select_price.indexOf("不限")!=-1){ @@ -2448,7 +2449,7 @@ function getCityPriceLevel(cityParam){ var minPrice = 0; var maxPrice = 0; if(select_price.indexOf("以上")!=-1){ - select_price = select_price.replaceAll("以上",""); + select_price = select_price.replace("以上",""); minPrice = parseInt(select_price); maxPrice = 0; }else if(select_price.indexOf("不限")!=-1){ @@ -2531,16 +2532,20 @@ function openNewsView(newId) { // } // }); clicked('views/news/newsDetail.html',true,false,{},{newsId:newId},function(newId){ - alert(newId); + axios.post("/rest/comment/getCommentCount",{commentObjId : newId}).then(function (response) { + var msg = response.data.message + if(response.data.status){ + $("#visitComment_"+newId).text(response.data.data+"条"); + } + }) + .catch(function (error) { + console.log(error); + }); },newId); var count = parseInt($("#visitCount_"+newId).text().replace("人",""))+1; $("#visitCount_"+newId).text(count+'人'); } -window.addEventListener('refresh', function(e){//执行刷新 - alert("aa"); -}); -