diff --git a/fangija-zsyf/config.js b/fangija-zsyf/config.js index f20f0c4..4f3791c 100644 --- a/fangija-zsyf/config.js +++ b/fangija-zsyf/config.js @@ -1,8 +1,8 @@ /**服务端地址**/ //var BASE_PATH = "http://192.168.10.128:8084"; //var BASE_PATH = "http://192.168.10.47:8086"; -//var BASE_PATH = "http://192.168.10.161:8084"; +var BASE_PATH = "http://192.168.10.161:8084"; //var BASE_PATH = "http://192.168.10.53:8084"; -var BASE_PATH = "http://192.168.10.171:8084"; +//var BASE_PATH = "http://192.168.10.171:8084"; /**是否显示过启动页面**/ var lauchFlag = false; \ No newline at end of file diff --git a/fangija-zsyf/css/main.css b/fangija-zsyf/css/main.css index fec0efb..b75d3ca 100644 --- a/fangija-zsyf/css/main.css +++ b/fangija-zsyf/css/main.css @@ -365,21 +365,21 @@ input::-webkit-input-placeholder{ .list-block .item-title .info > span{color:#666;} .list-block .item-title .info > em{color:#EB5F34;display:block;} .list-block .item-title .info > em strong{font-size:1.2rem;font-weight:normal;} -.list-block .item-title span.c3{font-size:0.8rem;color:#333;margin-right:0.2rem;display:inline-block;vertical-align:top;} +.list-block .item-title span.c3{color:#333;font-size:0.8rem;margin-right:0.2rem;display:inline-block;vertical-align:top;} .list-block .item-title span.c3a{max-width:112px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;} -.list-block .item-title span.c6{font-size:0.65rem;color:#666;border-left:solid 1px #bfbfbf;margin-left:0.1rem;padding-left:0.3rem;display:inline-block;vertical-align:middle;} +.list-block .item-title span.c6{color:#666;font-size:0.65rem;border-left:solid 1px #bfbfbf;margin-left:0.1rem;padding-left:0.3rem;display:inline-block;vertical-align:middle;} .list-block .item-title span.c6a{max-width:90px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;} -.list-block .item-title span.c9{font-size:0.75rem;color:#999;} +.list-block .item-title span.c9{color:#999;font-size:0.75rem;} .info i.icon-warning{width:15px;height:15px;background:url(../images/icon-warning.png) no-repeat center center;background-size:100%;float:none;display:block;margin:0 auto;margin-top:0.2rem;} .small01{height:0.9rem;background:#eaf7ff;border-radius:2px;padding:0 5px;color:#2db0fc;font-size:0.65rem;line-height:1rem;float:left;margin:0.1rem 0;margin-right:0.2rem;} .small01:nth-of-type(1){background:#eaf7ff;color:#2db0fc;} .small01:nth-of-type(2){background:#fff7e7;color:#f5b715;} .small01:nth-of-type(3){background:#e9f8f0;color:#88D053;} .small02{height:0.9rem;background:none;border:solid 1px #2db0fc;border-radius:2px;padding:0 5px;color:#2db0fc;font-size:0.65rem;line-height:0.9rem;float:left;margin:0.1rem 0;margin-left:0.2rem;} -.small03{border:solid 1px #ccc;border-radius:2px;padding:0 5px;font-size:0.65rem;color:#999;line-height:1rem;display:inline-block;vertical-align:middle;margin-left:0.5rem;} -.small04{width:49px;height:1.1rem;background:#F18D00;border-radius:2px;padding:0 5px;font-size:0.65rem;color:#fff;line-height:1.2rem;display:block;margin:0 auto;margin-bottom:0.2rem;} -.list-block .item-title small.small01{font-size:0.65rem;color:#2db0fc;} -.list-block .item-title small.small02{font-size:0.65rem;color:#2db0fc;} +.small03{border:solid 1px #ccc;border-radius:2px;padding:0 5px;color:#999;font-size:0.65rem;line-height:1rem;display:inline-block;vertical-align:middle;margin-left:0.5rem;} +.small04{width:49px;height:1.1rem;background:#F18D00;border-radius:2px;padding:0 5px;color:#fff;font-size:0.65rem;line-height:1.2rem;display:block;margin:0 auto;margin-bottom:0.2rem;} +.list-block .item-title small.small01{color:#2db0fc;font-size:0.65rem;} +.list-block .item-title small.small02{color:#2db0fc;font-size:0.65rem;} .list-block .item-title .info02 small.small01{margin-top:0;margin-bottom:0;} .list-block .item-subtitle small.small01{color:#2db0fc;margin-top:0.3rem;} .list-block .item-subtitle small.small01:nth-of-type(1){background:#eaf7ff;color:#2db0fc;} @@ -738,7 +738,7 @@ input::-webkit-input-placeholder{ .topic .topicContent .topicContent_bottom p em{color:#F18D00;font-size:0.8rem;} .topic .topicContent .topicContent_bottom p a{float:right;color:#333;} .topic .topicContent .topicContent_bottom font{width:100%;height:16px;background:#eee;border-radius:50px;display:block;margin-top:-10px;} -.topic .topicContent .topicContent_bottom font i{display:block;height:10px;background:#F18D00;border:solid 1px #e7e7e7;border-radius:50px;} +.topic .topicContent .topicContent_bottom font i{display:block;height:16px;background:#45b9fc;border:solid 3px #eee;border-radius:50px;} .topic .topicContent .topicContent_bottom .rankingNote{overflow:hidden;display:block;height:26px;} .topic .topicContent .topicContent_bottom .rankingNote span{font-size:0.65rem;line-height:26px;color:#999;} .topic .topicContent .topicContent_bottom .rankingNote span.rankingNoteLeft{float:left;} @@ -786,7 +786,7 @@ input::-webkit-input-placeholder{ .topic .topicContent .topicContent_center.home div .icon.icon-evaluation02{background:url(../images/icon-evaluation02.png) no-repeat center center;background-size:100%;} .topic .topicContent .topicContent_center.home div .icon.icon-evaluation03{background:url(../images/icon-evaluation03.png) no-repeat center center;background-size:100%;} -.topic .topicContent .topicContent_center01 div{width:29.333333333333332%;background:#fff;border:solid 1px #eee;border-radius:0.4rem;padding:0.3rem 0;} +.topic .topicContent .topicContent_center01 div{width:29.333333333333332%;background:#fbfbfb;border:solid 1px #eee;border-radius:0.2rem;padding:0.3rem 0;} .topic .topicContent .topicContent_center01 div:first-child{border-left:solid 1px #eee;} .topic .topicContent .topicContent_center01 div em{display:block;color:#EB5F34;font-size:0.75rem;} .topic .topicContent .topicContent_center01 div em.riskScore01{color:#ff4500;} @@ -832,10 +832,7 @@ input::-webkit-input-placeholder{ /* 图表 */ .chart{width:100%;height:250px;} -.chart tspan{font-size:0.6rem;text-shadow:none;} -#tabChart{width:100%;height:360px;} -#tabChart1{width:100%;position:absolute;z-index:1;} -#tabChart2{width:100%;display:block;position:absolute;z-index:-1;} +.chart tspan{font-size:0.6rem;color:#999;text-shadow:none;} .scoreBox{height:130px;position:relative;} .score{width:250px;height:250px;margin:0 auto;margin-top:1rem;} .scoreText{width:250px;height:150px;position:absolute;top:0;left:50%;margin-left:-125px;} @@ -845,7 +842,7 @@ input::-webkit-input-placeholder{ .scoreText div:nth-child(3){top:80px;right:8px;} .priceBox{margin:0.75rem 0;overflow:hidden;} .priceBox div{float:left;width:50%;text-align:center;} -.priceBox div label{color:#999;font-size:0.7rem;margin-right:0.3rem;} +.priceBox div label{color:#666;font-size:0.7rem;margin-right:0.3rem;} .priceBox div font{color:#333;} .priceBox div em{color:#666;font-size:0.7rem;} .priceBox div em{color:#EB5F34;font-size:0.7rem;} @@ -863,7 +860,7 @@ input::-webkit-input-placeholder{ .buttons-row01a .button{width:22%;} .topic .topicTitle > div.content-block.content-block01{position:relative;float:none;} -.content-block01 .buttons-row.theme{width:100%;border-bottom:solid 1px #e7e7e7;} +.content-block01 .buttons-row.theme{width:100%;border-bottom:solid 1px #e5e5e5;} .content-block01 .buttons-row.theme .button{font-size:0.75rem;line-height:1rem;border:none;padding:0;} .content-block01 .buttons-row.theme .button.active{background:none;border-bottom:solid 2px #F18D00;color:#F18D00;} .content-block01 .buttons-row .button:first-child,.content-block01 .buttons-row .button:last-child{border-radius:0;} @@ -936,7 +933,7 @@ input::-webkit-input-placeholder{ .icon-city{width:12px;height:18px;background:url(../images/icon-city.png) no-repeat center center;background-size:100%;margin-left:0.3rem;margin-top:-3px;} .contentSuggest > p{font-size:0.65rem;color:#999;text-align:left;margin-left:0.75rem;} -.contentSuggest > p em{font-size:0.65rem;color:#F18D00;} +.contentSuggest > p em{font-size:0.65rem;color:#29a1f7;} .contentSuggest .selectContainer{position:relative;} .selectBox{background:#fff;border-top:solid 1px #e5e5e5;text-align:center;line-height:44px;} @@ -1015,7 +1012,7 @@ input::-webkit-input-placeholder{ .icon-house01{width:50px;height:80px;background:url(../images/icon-house01.png) no-repeat center center;background-size:100%;position:absolute;left:58%;bottom:50%;z-index:10500;} /* 我的 */ -.iconBox{width:100%;overflow:hidden;padding:0.5rem 0;} +/*.iconBox{width:100%;overflow:hidden;padding:0.5rem 0;} .iconBox a{float:right;margin-right:0.75rem;} .icon-message{width:20px;height:20px;background:url(../images/icon-message.png) no-repeat center center;background-size:100%;position:relative;} .icon-message-new{width:7px;height:7px;background:url(../images/icon-message-new.png) no-repeat center center;background-size:100%;position:absolute;top:1px;right:-3px;} @@ -1031,7 +1028,25 @@ input::-webkit-input-placeholder{ .topBg01 a{color:#fff;text-decoration:underline;} .topBg01 img{float:left;width:20%;margin-right:0.5rem;} .topBg01 p{float:left;margin:0;margin-top:0.2rem;} -.topBg01 .icon-right{position:absolute;right:0.6rem;top:2.1rem;} +.topBg01 .icon-right{position:absolute;right:0.6rem;top:2.1rem;}*/ + +/* 我的 */ +.icon-message{width:20px;height:20px;background:url(../images/icon-message.png) no-repeat center center;background-size:100%;position:relative;} +.icon-message-new{width:7px;height:7px;background:url(../images/icon-message-new.png) no-repeat center center;background-size:100%;position:absolute;top:1px;right:-3px;} +.icon-set{width:20px;height:20px;background:url(../images/icon-set.png) no-repeat center center;background-size:100%;} +.icon-message01{width:24px;height:24px;background:url(../images/icon-message01.png) no-repeat center center;background-size:85%;margin-top:-2.2rem;} +.message01-new .icon-message01{width:24px;height:16px;background:url(../images/icon-message01-new.png) no-repeat center center;background-size:100%;margin-top:-2.5rem;} +.list-block .message01 .item-title{white-space:normal;text-overflow:-o-ellipsis-lastline;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;color:#666;} +.list-block .message01-new .item-title{color:#333;font-weight:bold;} +.list-block .message01 .item-subtitle{margin-top:0.5rem;} +.contentText{background:#fff;} + +.topBg01{width:100%;background:url(../images/topBg.png) no-repeat center top;background-size:100%;border-bottom:solid 1px #e7e7e7;padding:1.2rem 0.75rem;padding-bottom:0;color:#fff;overflow:hidden;position:relative;} +.topBg01 img{width:3rem;height:3rem;margin:0 auto;margin-top:0.6rem;} +.topBg01 p{font-size:0.7rem;color:#333;text-align:center;margin-top:0.6rem;} +.topBg01 p .button{width:4rem;margin:0 auto;} + +.tabs .noData img{width:30%;margin:0 auto;margin-top:3rem;} /* 出错页面 */ .contentError{padding-top:30%;background:none;} diff --git a/fangija-zsyf/images/exchange-step01.png b/fangija-zsyf/images/exchange-step01.png index 8bec048..d095219 100644 Binary files a/fangija-zsyf/images/exchange-step01.png and b/fangija-zsyf/images/exchange-step01.png differ diff --git a/fangija-zsyf/images/exchange-step02.png b/fangija-zsyf/images/exchange-step02.png index 629cd73..c2c9885 100644 Binary files a/fangija-zsyf/images/exchange-step02.png and b/fangija-zsyf/images/exchange-step02.png differ diff --git a/fangija-zsyf/images/headPortrait.png b/fangija-zsyf/images/headPortrait.png index f1ce268..dc1ea89 100644 Binary files a/fangija-zsyf/images/headPortrait.png and b/fangija-zsyf/images/headPortrait.png differ diff --git a/fangija-zsyf/images/icon-houseLevel.png b/fangija-zsyf/images/icon-houseLevel.png new file mode 100644 index 0000000..8d3b802 Binary files /dev/null and b/fangija-zsyf/images/icon-houseLevel.png differ diff --git a/fangija-zsyf/images/icon-set.png b/fangija-zsyf/images/icon-set.png index 4e1d0c0..990a27a 100644 Binary files a/fangija-zsyf/images/icon-set.png and b/fangija-zsyf/images/icon-set.png differ diff --git a/fangija-zsyf/images/noData.png b/fangija-zsyf/images/noData.png index f7d9239..8a3b890 100644 Binary files a/fangija-zsyf/images/noData.png and b/fangija-zsyf/images/noData.png differ diff --git a/fangija-zsyf/images/rankingImg01.png b/fangija-zsyf/images/rankingImg01.png new file mode 100644 index 0000000..c2e766b Binary files /dev/null and b/fangija-zsyf/images/rankingImg01.png differ diff --git a/fangija-zsyf/images/rankingImg02.png b/fangija-zsyf/images/rankingImg02.png new file mode 100644 index 0000000..f54f39f Binary files /dev/null and b/fangija-zsyf/images/rankingImg02.png differ diff --git a/fangija-zsyf/images/rankingImg03.png b/fangija-zsyf/images/rankingImg03.png new file mode 100644 index 0000000..c1eb6f7 Binary files /dev/null and b/fangija-zsyf/images/rankingImg03.png differ diff --git a/fangija-zsyf/images/topBg.png b/fangija-zsyf/images/topBg.png index d561d06..c5a8a99 100644 Binary files a/fangija-zsyf/images/topBg.png and b/fangija-zsyf/images/topBg.png differ diff --git a/fangija-zsyf/js/login/codeSms.js b/fangija-zsyf/js/login/codeSms.js index 7fccf62..a658db0 100644 --- a/fangija-zsyf/js/login/codeSms.js +++ b/fangija-zsyf/js/login/codeSms.js @@ -75,10 +75,18 @@ $("#login_btn").on("click", function () { var resData = response.data; if (resData.status) { // 用户登录成功的TOKEN - var token = resData.data; - localStorage.setItem("user_token", token); + var data = resData.data; + localStorage.setItem("user_token", data.token); $.toast(resData.message); - back(); + if (data.firstLogin) { + // 显示设置密码页面 + clicked('../user/updatePass.html',true,false,{},{},function(){ + back(); + }) + } else { + back(); + } + } else { $.toast(resData.message); } diff --git a/fangija-zsyf/js/login/thirdLogin.js b/fangija-zsyf/js/login/thirdLogin.js index 9f94671..689d42b 100644 --- a/fangija-zsyf/js/login/thirdLogin.js +++ b/fangija-zsyf/js/login/thirdLogin.js @@ -48,74 +48,48 @@ function userinfo(a){ var accessToken = a.authResult.access_token; var unionid = a.userInfo.unionid; var headImg = a.userInfo.headimgurl; - wxLogin(openid,unionid,accessToken,nickname,headImg,"weixin") + login(openid, unionid, accessToken, nickname, headImg, "weixin", "/rest/user/wxLogin") }else if(a.id=='qq'){ - var nickname=a.userInfo.nickname; + var nickname= a.userInfo.nickname; var openid = a.authResult.openid; var accessToken = a.authResult.access_token; var headImg = a.userInfo.headimgurl; - qqLogin(openid,accessToken,nickname,headImg,"qq") + var unionid = ""; + login(openid, unionid, accessToken, nickname, headImg, "qq", "/rest/user/qqLogin") }else{ //微博信息获取 - var nickname=a.userInfo.name||a.userInfo.screen_name; - var openid = a.authResult.openid; + var nickname = a.userInfo.name||a.userInfo.screen_name; + var openid = a.authResult.uid; var accessToken = a.authResult.access_token; - var headImg = a.userInfo.profile_image_url; - var uid = a.authResult.uid - weiboLogin(openid,accessToken,nickname,headImg,"sinaweibo") + var headImg = a.userInfo.headimgurl; + var uid = a.authResult.uid; + var unionid = ""; + login(openid, unionid, accessToken, nickname, headImg, "sinaweibo", "/rest/user/sinaweiboLogin") } },function(e){ - $.toast("获取微信用户信息失败:["+e.code+"]:"+e.message); + $.toast("获取用户信息失败:["+e.code+"]:"+e.message); }); } -function wxLogin(openid, unionid, accessToken, nickname, headImg,loginFrom) { - axios.post("/rest/user/wxLogin", {loginFrom:loginFrom,openid:openid, unionid:unionid, accessToken: accessToken, nickname:nickname,headImg:headImg}) +function login(openid, unionid, accessToken, nickname, headImg, loginFrom, uri) { + axios.post(uri, {loginFrom:loginFrom,openid:openid, unionid:unionid, accessToken: accessToken, nickname:nickname,headImg:headImg}) .then(function (response) { $.hidePreloader(); - if(response.data.status){ - if("no"==response.data.message){ + var resData = response.data; + if(resData.status){ + if(resData.data == ""){ //跳转绑定手机号码页面 - console.log(response.data.message) + clicked('../user/bindingMobile.html',true,false,{},{loginFrom:loginFrom,openid:openid, unionid:unionid, accessToken: accessToken, nickname:nickname,headImg:headImg},function(){ + back(); + }) }else{ - + localStorage.setItem("user_token", resData.data); + back(); } }else{ //登录失败 - $.toast(response.data.data) - } - }) -} -function qqLogin(openid, accessToken, nickname, headImg,loginFrom) { - axios.post("/rest/user/qqLogin", {loginFrom:loginFrom,openid:openid, accessToken: accessToken, nickname:nickname,headImg:headImg}) - .then(function (response) { - $.hidePreloader(); - if(response.data.status){ - if("no"==response.data.message){ - //跳转绑定手机号码页面 - }else{ - - } - }else{ - //登录失败 - $.toast(response.data.data) - } - }) -} -function weiboLogin(openid, accessToken, nickname, headImg,loginFrom) { - axios.post("/rest/user/sinaweiboLogin", {loginFrom:loginFrom,openid:openid, accessToken: accessToken, nickname:nickname,headImg:headImg}) - .then(function (response) { - $.hidePreloader(); - if(response.data.status){ - if("no"==response.data.message){ - //跳转绑定手机号码页面 - }else{ - - } - }else{ - //登录失败 - $.toast(response.data.data) + $.toast(resData.message) } }) } diff --git a/fangija-zsyf/js/user/myCollect.js b/fangija-zsyf/js/user/myCollect.js new file mode 100644 index 0000000..3c69504 --- /dev/null +++ b/fangija-zsyf/js/user/myCollect.js @@ -0,0 +1,258 @@ +var mc_uid = "162167854504869888"; +// 加载flag +var mc_loading = false; +//空置第一次显示 +var mc_yesterDayDeployFlag = true; + +//分页部分参数定义 +var mc_page; +var mc_pageSize; +var mc_totalPages; +var mc_totalRecords; +// 上次加载的序号 +var mc_lastIndex; +// 每次加载添加多少条目 +var mc_itemsPerLoad; +// 最多可加载的条目 +var mc_maxItems = 100; + +//初始化init +$.init(); + +// 注册'infinite'事件处理函数 +//$(document).on('infinite', '.infinite-scroll-bottom', function() { +// // 如果正在加载,则退出 +// if(mc_loading) return; +// // 设置flag +// mc_loading = true; +// // 模拟1s的加载过程 +// setTimeout(function() { +// // 重置加载flag +// mc_loading = false; +// //如果当前页大于等于总页数 +// if(mc_page >= mc_totalPages) { +//// // 加载完毕,则注销无限加载事件,以防不必要的加载 +//// $.detachInfiniteScroll($('.infinite-scroll')); +// // 删除加载提示符 +// $('#loadTip3').remove(); +// return; +// } +// //控制查询下一页的数据 +// mc_page = mc_page + 1; +// selectNewsCollectList(); +// //容器发生改变,如果是js滚动,需要刷新滚动 +// //$.refreshScroller(); +// }, 1000); +//}); + +//我的收藏查询请求 +function selectNewsCollectList(){ + axios.get(BASE_PATH + "/rest/news/collectList", + { + params: { + uid: mc_uid, + page: mc_page, + pageSize: mc_pageSize + } + }).then(function (response) { + var resultList = response.data.data.list; + if(resultList != null && resultList.length == 0){ + // 删除加载提示符 + $('#loadTip3').remove(); + // 加载完毕,则注销无限加载事件,以防不必要的加载 + //$.detachInfiniteScroll($('.infinite-scroll')); + return; + } + if(response.data.data.currentPage == response.data.data.totalPages){ + //如果此次查询刚好是page = totalPages + // 删除加载提示符 + $('#loadTip3').remove(); + // 加载完毕,则注销无限加载事件,以防不必要的加载 + //$.detachInfiniteScroll($('.infinite-scroll')); + } + //封装list数据 + var dataObj = []; + for(var i in resultList){ + dataObj.push(resultList[i]) + } + // 上次加载的序号 + mc_lastIndex = $('.cardInfo').length; + //每次加载添加多少条目 + mc_itemsPerLoad = resultList.length; + //请求后对page进行赋值 + mc_page = response.data.data.currentPage; + mc_pageSize = response.data.data.limit; + mc_totalPages = response.data.data.totalPages; + mc_totalRecords = response.data.data.totalRecords; + tab.mc_num = mc_totalRecords; + addItems(mc_itemsPerLoad, mc_lastIndex, dataObj); + }).catch(function (error) { + console.log(error); + }); +} + +//界面加载 +$(document).ready(function () { + selectNewsCollectList(); +}); + +function openUrl(url){ + clicked(url, true); +} + +function openNewsView(newId) { + clicked('/fangija-zsyf/views/news/newsDetail.html',true,false,{},{newsId:newId},function(newId){ + axios.post(BASE_PATH + "/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+'人'); +} + +/* 分页构造数据 */ +function addItems(itemsPerLoad, lastIndex, dataObj) { + var html = ''; + for(var i in dataObj) { + /*if(dataObj[i].yesterDayDeploy && yesterDayDeployFlag) { + yesterDayDeployFlag = false; + html += '

您还没有关注小区