Merge branch 'YOUFANGAPP1.1' of 192.168.0.27:dev0/youfang-app into xh-youfangApp1.1
This commit is contained in:
@@ -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.170:8084";
|
||||
var BASE_PATH = "http://192.168.10.171:8084";
|
||||
/**是否显示过启动页面**/
|
||||
var lauchFlag = false;
|
||||
@@ -0,0 +1,121 @@
|
||||
var auths = {}
|
||||
function plusReady() {
|
||||
plus.oauth.getServices(function(services) {
|
||||
for(var i in services){
|
||||
var service=services[i];
|
||||
auths[service.id]=service;
|
||||
}
|
||||
}, function(e) {
|
||||
alert("获取登录服务列表失败:" + e.message + " - " + e.code);
|
||||
});
|
||||
}
|
||||
document.addEventListener('plusready',plusReady,false);
|
||||
// 登录认证
|
||||
function loginInfo(dest){
|
||||
var auth=auths[dest];
|
||||
console.log(JSON.stringify(auth))
|
||||
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,"登录");
|
||||
}
|
||||
}
|
||||
|
||||
//wx获取用户信息
|
||||
function userinfo(a){
|
||||
a.getUserInfo(function(){
|
||||
console.log(JSON.stringify(a))
|
||||
$.showPreloader();
|
||||
if(a.id=='weixin'){
|
||||
var nickname=a.userInfo.nickname||a.userInfo.name||a.userInfo.miliaoNick;
|
||||
var openid = a.authResult.openid;
|
||||
var accessToken = a.authResult.access_token;
|
||||
var unionid = a.userInfo.unionid;
|
||||
var headImg = a.userInfo.headimgurl;
|
||||
wxLogin(openid,unionid,accessToken,nickname,headImg,"weixin")
|
||||
}else if(a.id=='qq'){
|
||||
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")
|
||||
}else{
|
||||
//微博信息获取
|
||||
var nickname=a.userInfo.name||a.userInfo.screen_name;
|
||||
var openid = a.authResult.openid;
|
||||
var accessToken = a.authResult.access_token;
|
||||
var headImg = a.userInfo.profile_image_url;
|
||||
var uid = a.authResult.uid
|
||||
weiboLogin(openid,accessToken,nickname,headImg,"sinaweibo")
|
||||
}
|
||||
|
||||
},function(e){
|
||||
$.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})
|
||||
.then(function (response) {
|
||||
$.hidePreloader();
|
||||
if(response.data.status){
|
||||
if("no"==response.data.message){
|
||||
//跳转绑定手机号码页面
|
||||
console.log(response.data.message)
|
||||
}else{
|
||||
|
||||
}
|
||||
}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)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
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,"登录");
|
||||
}
|
||||
}
|
||||
|
||||
function authLogin(type) {
|
||||
console.log("hhhhhhhhhhhhhhhhhhh")
|
||||
}
|
||||
+17
-11
@@ -14,7 +14,7 @@
|
||||
"icons": {
|
||||
"144": "icon.png"
|
||||
},
|
||||
"launch_path": "main.html",/*应用的入口页面,默认为根目录下的index.html;支持网络地址,必须以http://或https://开头*/
|
||||
"launch_path": "/views/user/bindingMobile.html",/*应用的入口页面,默认为根目录下的index.html;支持网络地址,必须以http://或https://开头*/
|
||||
"developer": {
|
||||
"name": "",/*开发者名称*/
|
||||
"email": "",/*开发者邮箱地址*/
|
||||
@@ -101,9 +101,7 @@
|
||||
"Maps": {
|
||||
"description": "地图"
|
||||
},
|
||||
"OAuth": {
|
||||
"description": "登录授权"
|
||||
},
|
||||
"OAuth": {},
|
||||
|
||||
"Push": {
|
||||
"description": "消息推送"
|
||||
@@ -312,12 +310,6 @@
|
||||
"description": "可选,微信分享",
|
||||
"appid": "wx734a9e3085abcd90",
|
||||
"appsecret": "47ce59f3c52984c4e193880fb09b12af"
|
||||
},
|
||||
"sina": {
|
||||
"appkey": "3194052034",
|
||||
"appsecret": "e863ae4e4f14d41af3142e5ae06867dd",
|
||||
"redirect_uri": "http://sh.fangjia.com/",
|
||||
"description": "可选,新浪微博分享"
|
||||
}
|
||||
},
|
||||
"payment": {},
|
||||
@@ -325,7 +317,7 @@
|
||||
"weixin": {
|
||||
"appid": "wx734a9e3085abcd90",
|
||||
"appsecret": "47ce59f3c52984c4e193880fb09b12af"
|
||||
}
|
||||
},"qq":{"appid":"1106734669"},"sina":{"appkey":"3194052034","appsecret":"e863ae4e4f14d41af3142e5ae06867dd","redirect_uri":"http://fangjia.com"}
|
||||
}
|
||||
},
|
||||
"debug": true
|
||||
@@ -1519,6 +1511,20 @@
|
||||
],
|
||||
"refer": [],
|
||||
"priority": 0
|
||||
},
|
||||
"/views/user/bindingMobile.html": {
|
||||
"resources": [],
|
||||
"refer": [
|
||||
"error.html"
|
||||
],
|
||||
"priority": 0
|
||||
},
|
||||
"views/user/codeSms.html": {
|
||||
"resources": [
|
||||
"/views/user/bindingMobile.html"
|
||||
],
|
||||
"refer": [],
|
||||
"priority": 0
|
||||
}
|
||||
},
|
||||
"idle": {
|
||||
|
||||
@@ -73,9 +73,11 @@ $.config = {router: false}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="../../js/beacon_release.js"></script>
|
||||
<script type="text/javascript" src="../../js/vue.js"></script>
|
||||
<script type="text/javascript" src="../../js/light7.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../js/cn.js" charset="utf-8"></script>
|
||||
<script src="../../config.js"></script>
|
||||
<script type="text/javascript" src="../../js/mui.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../config.js"></script>
|
||||
<script type="text/javascript" src="../../js/common.js" ></script>
|
||||
<script type="text/javascript" src="../../js/axios.min.js"></script>
|
||||
<script type="text/javascript" src="../../js/axiosPlugin.js"></script>
|
||||
@@ -83,6 +85,8 @@ $.config = {router: false}
|
||||
|
||||
<script>
|
||||
var uid = "162167854504869888";
|
||||
//调用mui.init方法
|
||||
$.init()
|
||||
|
||||
/* 房产用途 */
|
||||
$(document).on('click','.open-vertical-modal', function () {
|
||||
@@ -120,7 +124,7 @@ $(document).on('click','.open-vertical-modal', function () {
|
||||
|
||||
//添加管理AJAX请求
|
||||
function addManagement(id, houseStatus, liveStatus){
|
||||
axios.post("/rest/evaluate/addManagement",
|
||||
axios.post(BASE_PATH + "/rest/evaluate/addManagement",
|
||||
{
|
||||
id: id,
|
||||
houseStatus: houseStatus,
|
||||
@@ -143,7 +147,7 @@ function selectEvaluateList(){
|
||||
//先清空列表
|
||||
$('.list-block ul').html("");
|
||||
var htmlContent = '';
|
||||
axios.get("/rest/evaluate/houseinfolist",
|
||||
axios.get(BASE_PATH + "/rest/evaluate/houseinfolist",
|
||||
{
|
||||
params: {
|
||||
uid: uid
|
||||
|
||||
@@ -0,0 +1,337 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>我的收藏</title>
|
||||
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<link rel="stylesheet" href="../../css/sm.css">
|
||||
<link rel="stylesheet" href="../../css/main.css">
|
||||
<link rel="stylesheet" href="../../css/mui.min.css">
|
||||
<link rel="stylesheet" href="../../css/theme-orange.css">
|
||||
|
||||
<style>
|
||||
.bar{background:#fff;}
|
||||
.selectBox{border-top:solid 0.5rem #f3f3f3;border-bottom:solid 1px #e5e5e5;}
|
||||
.selectContent .topic{border-bottom:solid 1px #e5e5e5;}
|
||||
.selectContent .list-block .item-title{font-size:0.7rem;}
|
||||
.buttons-row.theme .button{border:solid 1px #D7D7D7;color:#333;}
|
||||
.buttons-row.theme .button.active{background:none;color:#F18D00;}
|
||||
.content-block01 .row{margin-left:0;}
|
||||
.content-block01 .row .col-50 .button.button-fill{height:2rem;line-height:2rem;}
|
||||
.content-block01 .row .col-50 .button.button-fill.reset_btn{background:#fff;border:none;border-top:solid 1px #e5e5e5;}
|
||||
.content-block01 .row .col-50 .button.button-fill.confirm_btn{background:#F18D00;border:solid 1px #F18D00;}
|
||||
.info-container input{float:none;width:100%;}
|
||||
.picker-item{padding:0 5rem;font-size:18px;}
|
||||
.loadingBg{width:100%;height:100%;background:#fff;overflow:hidden;position:absolute;top:71px;left:0;z-index:100;}
|
||||
.loadingBg .infinite-scroll-preloader{margin-top:60%;}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="page-group">
|
||||
<div class="page page-current">
|
||||
<header class="bar bar-nav">
|
||||
<button class="button button-link button-nav pull-left" onclick="back(),plus.nativeUI.closeWaiting();">
|
||||
<span class="icon icon-left"></span>
|
||||
</button>
|
||||
<h1 class="title">我的收藏</h1>
|
||||
</header>
|
||||
<div class="content infinite-scroll infinite-scroll-bottom" data-distance="50">
|
||||
<div class="list-block">
|
||||
<ul class="list-container">
|
||||
<!-- 动态拼接内容 -->
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 分页加载效果, 默认不显示, 和 加载loading页区分开-->
|
||||
<div class="infinite-scroll-preloader">
|
||||
<div class="preloader"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="../../js/zepto.js" charset="utf-8"></script>
|
||||
<script>
|
||||
|
||||
/* 关闭路由,以实现不同页面之间的相互跳转(仅开发环境需要) */
|
||||
Zepto = $
|
||||
$.config = {router: false}
|
||||
|
||||
</script>
|
||||
<script type="text/javascript" src="../../js/beacon_release.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../js/vue.js"></script>
|
||||
<script type="text/javascript" src="../../js/light7-2.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../js/cn.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../js/mui.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../config.js"></script>
|
||||
<script type='text/javascript' src='../../js/common.js' charset='utf-8'></script>
|
||||
<script type="text/javascript" src="../../js/axios.min.js"></script>
|
||||
<script type="text/javascript" src="../../js/axiosPlugin.js"></script>
|
||||
<script type="text/javascript" src="../../js/shara/sharaMine.js" ></script>
|
||||
|
||||
<script>
|
||||
var uid = "162167854504869888";
|
||||
// 加载flag
|
||||
var loading = false;
|
||||
//空置第一次显示
|
||||
var yesterDayDeployFlag = true;
|
||||
|
||||
//分页部分参数定义
|
||||
var page;
|
||||
var pageSize;
|
||||
var totalPages;
|
||||
|
||||
// 上次加载的序号
|
||||
var lastIndex;
|
||||
// 每次加载添加多少条目
|
||||
var itemsPerLoad;
|
||||
// 最多可加载的条目
|
||||
var maxItems = 100;
|
||||
|
||||
//初始化init
|
||||
$.init();
|
||||
|
||||
// 注册'infinite'事件处理函数
|
||||
$(document).on('infinite', '.infinite-scroll-bottom', function() {
|
||||
// 如果正在加载,则退出
|
||||
if(loading) return;
|
||||
// 设置flag
|
||||
loading = true;
|
||||
// 模拟1s的加载过程
|
||||
setTimeout(function() {
|
||||
// 重置加载flag
|
||||
loading = false;
|
||||
//如果当前页大于等于总页数
|
||||
if(page >= totalPages) {
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
// 删除加载提示符
|
||||
$('.infinite-scroll-preloader').remove();
|
||||
return;
|
||||
}
|
||||
//控制查询下一页的数据
|
||||
page = page + 1;
|
||||
selectNewsCollectList();
|
||||
//容器发生改变,如果是js滚动,需要刷新滚动
|
||||
//$.refreshScroller();
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
//我的收藏查询请求
|
||||
function selectNewsCollectList(){
|
||||
axios.get(BASE_PATH + "/rest/news/collectList",
|
||||
{
|
||||
params: {
|
||||
uid: uid,
|
||||
page: page,
|
||||
pageSize: pageSize
|
||||
}
|
||||
}).then(function (response) {
|
||||
var resultList = response.data.data.list;
|
||||
if(resultList != null && resultList.length == 0){
|
||||
// 删除加载提示符
|
||||
$('.infinite-scroll-preloader').remove();
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
return;
|
||||
}
|
||||
if(response.data.data.currentPage == response.data.data.totalPages){
|
||||
//如果此次查询刚好是page = totalPages
|
||||
// 删除加载提示符
|
||||
$('.infinite-scroll-preloader').remove();
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
}
|
||||
//封装list数据
|
||||
var dataObj = [];
|
||||
for(var i in resultList){
|
||||
dataObj.push(resultList[i])
|
||||
}
|
||||
// 上次加载的序号
|
||||
lastIndex = $('.cardInfo').length;
|
||||
//每次加载添加多少条目
|
||||
itemsPerLoad = resultList.length;
|
||||
//请求后对page进行赋值
|
||||
page = response.data.data.currentPage;
|
||||
pageSize = response.data.data.limit;
|
||||
totalPages = response.data.data.totalPages;
|
||||
addItems(itemsPerLoad, 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 += '<div class="content-block-title recommend" style="border-top:solid 0.5rem #f3f3f3;">历史推荐</div>';
|
||||
}*/
|
||||
if(dataObj[i].type == "专题") {
|
||||
html += '<div class="card cardInfo cardInfo01" onclick="openNewsView(\'' + dataObj[i].id + '\')">' +
|
||||
'<div class="card-header">' + dataObj[i].title + '</div>' +
|
||||
'<img src=' + dataObj[i].coverImg + '>' +
|
||||
'<div class="card-footer">' +
|
||||
'<span>' +
|
||||
'<i class="icon icon-eye-orange"></i><label id="visitCount_' + dataObj[i].id + '">' + dataObj[i].visitCount + '人</label>' +
|
||||
'<i class="icon icon-comments-orange"></i><label id="visitComment_' + dataObj[i].id + '">' + dataObj[i].recommendCommentCount + '条</label>' +
|
||||
'</span>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
}
|
||||
if(dataObj[i].type == "推荐小区") {
|
||||
html += '<div class="card cardInfo cardInfo02" onclick="openUrl(\'' + BASE_PATH + '/district/details?city=' + dataObj[i].recommendDistrictCity + '®ion=' + dataObj[i].recommendDistrictRegion + '&name=' + dataObj[i].recommendDistrictName + '\')">' +
|
||||
'<div class="card-content">' +
|
||||
'<div class="list-block media-list"><ul><li class="item-content">' +
|
||||
'<div class="item-media"><img src=' + dataObj[i].coverImg + '></div>' +
|
||||
'<div class="item-inner" style="padding-right:0;">' +
|
||||
'<div class="item-title-row"><div class="item-title">' + dataObj[i].recommendDistrictName + '</div>' +
|
||||
'<div class="item-after"><span>' + dataObj[i].recommendDistrictCity + '-' + dataObj[i].recommendDistrictRegion +
|
||||
'</span></div></div>';
|
||||
if(dataObj[i].recommendDistrictTags != "" && dataObj[i].recommendDistrictTags != null) {
|
||||
var arry = dataObj[i].recommendDistrictTags.split("_");
|
||||
html += '<div class="item-subtitle"><span class="tag">';
|
||||
for(var j in arry) {
|
||||
html += '<small>' + arry[j] + '</small>';
|
||||
}
|
||||
html += '</span></div>';
|
||||
}
|
||||
html += '<div class="item-subtitle"><span class="star">推荐指数:<i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i></span></div>';
|
||||
if(dataObj[i].recommendDistrictPrice) {
|
||||
html += '<div class="item-subtitle"><em><strong>' + dataObj[i].recommendDistrictPrice + '</strong>元/㎡</em></div>';
|
||||
}
|
||||
html += '</div></li></ul></div></div></div>';
|
||||
}
|
||||
if(dataObj[i].type == "活动") {
|
||||
html += '<div class="card cardInfo cardInfo01 cardInfo01b" onclick="openNewsView(\'' + dataObj[i].id + '\')">' +
|
||||
'<div class="card-header">' + dataObj[i].title + '</div>' +
|
||||
'<img src=' + dataObj[i].coverImg + '>' +
|
||||
'<div class="card-footer"><span>' + dataObj[i].introduction + '</span></div></div>';
|
||||
}
|
||||
if(dataObj[i].type == "推荐城市") {
|
||||
html += '<div class="card cardInfo cardInfo01 cardInfo01a" onclick="openUrl(\'' + BASE_PATH + '/quotations/building?cityName=' + dataObj[i].recommendCity + '\')">' +
|
||||
'<div class="card-header">推荐城市——' + dataObj[i].recommendCity + '</div>';
|
||||
if(dataObj[i].recommendCityTags != "" && dataObj[i].recommendCityTags != null) {
|
||||
var arry = dataObj[i].recommendCityTags.split("_");
|
||||
html += '<div class="card-content"><div class="card-content-inner"><span class="tag">';
|
||||
for(var j in arry) {
|
||||
html += '<small>' + arry[j] + '</small>';
|
||||
}
|
||||
html += '</span></div></div>';
|
||||
}
|
||||
html += '<img src=' + dataObj[i].coverImg + '>' +
|
||||
'<div class="card-footer"><span>均价:<em>' + dataObj[i].recommendCityAvgPrice + '元/㎡</em></span>' +
|
||||
'<span class="star">潜力指数:';
|
||||
if(dataObj[i].recommendCityIndex < 4) {
|
||||
html += '<i class="icon icon-star"></i><i class="icon icon-star"></i><i class="icon icon-star"></i><i class="icon icon-star"></i><i class="icon icon-star"></i>';
|
||||
} else if(dataObj[i].recommendCityIndex >= 5 && dataObj[i].recommendCityIndex < 15) {
|
||||
html += '<i class="icon icon-star02"></i><i class="icon icon-star"></i><i class="icon icon-star"></i><i class="icon icon-star"></i><i class="icon icon-star"></i>';
|
||||
} else if(dataObj[i].recommendCityIndex >= 15 && dataObj[i].recommendCityIndex < 25) {
|
||||
html += '<i class="icon icon-star01"></i><i class="icon icon-star"></i><i class="icon icon-star"></i><i class="icon icon-star"></i><i class="icon icon-star"></i>';
|
||||
} else if(dataObj[i].recommendCityIndex >= 25 && dataObj[i].recommendCityIndex < 35) {
|
||||
html += '<i class="icon icon-star01"></i><i class="icon icon-star02"></i><i class="icon icon-star"></i><i class="icon icon-star"></i><i class="icon icon-star"></i>';
|
||||
} else if(dataObj[i].recommendCityIndex >= 35 && dataObj[i].recommendCityIndex < 45) {
|
||||
html += '<i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star"></i><i class="icon icon-star"></i><i class="icon icon-star"></i>';
|
||||
} else if(dataObj[i].recommendCityIndex >= 45 && dataObj[i].recommendCityIndex < 55) {
|
||||
html += '<i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star02"></i><i class="icon icon-star"></i><i class="icon icon-star"></i>';
|
||||
} else if(dataObj[i].recommendCityIndex >= 55 && dataObj[i].recommendCityIndex < 65) {
|
||||
html += '<i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star"></i><i class="icon icon-star"></i>';
|
||||
} else if(dataObj[i].recommendCityIndex >= 65 && dataObj[i].recommendCityIndex < 75) {
|
||||
html += '<i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star02"></i><i class="icon icon-star"></i>';
|
||||
} else if(dataObj[i].recommendCityIndex >= 75 && dataObj[i].recommendCityIndex < 85) {
|
||||
html += '<i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star"></i>';
|
||||
} else if(dataObj[i].recommendCityIndex >= 85 && dataObj[i].recommendCityIndex < 95) {
|
||||
html += '<i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star02"></i>';
|
||||
} else {
|
||||
html += '<i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i>';
|
||||
}
|
||||
html += '</span></div><div class="card-footer" style="margin-top:-0.75rem;">';
|
||||
if(dataObj[i].recommendCityYoy) {
|
||||
html += '<span>近1年涨跌幅:';
|
||||
if(dataObj[i].recommendCityYoy > 0) {
|
||||
html += '<strong>' + (dataObj[i].recommendCityYoy * 100).toFixed(2) + '%</strong><i class="icon icon-arrow-red"></i>';
|
||||
} else {
|
||||
html += '<strong>' + (dataObj[i].recommendCityYoy * 100).toFixed(2) + '%</strong><i class="icon icon-arrow-green"></i>';
|
||||
}
|
||||
html += '</span>';
|
||||
}
|
||||
if(dataObj[i].recommendCityIndexTrend) {
|
||||
html += '<span>';
|
||||
if(dataObj[i].recommendCityIndexTrend >= 0) {
|
||||
html += '上涨概率:<strong>' + dataObj[i].recommendCityIndexTrend + '%</strong><i class="icon icon-arrow-red"></i>';
|
||||
} else {
|
||||
html += '下跌概率:<strong>' + dataObj[i].recommendCityYoy * (-1) + '%</strong><i class="icon icon-arrow-green"></i>';
|
||||
}
|
||||
html += '</span>';
|
||||
}
|
||||
html += '</div></div>';
|
||||
}
|
||||
if(dataObj[i].type == "新闻") {
|
||||
html += '<div class="card cardInfo cardInfo02" onclick="openNewsView(\'' + dataObj[i].id + '\')"><div class="card-content"><div class="list-block media-list">' +
|
||||
'<ul><li class="item-content">' +
|
||||
'<div class="item-inner"><div class="item-title-row"><div class="item-title">' +
|
||||
dataObj[i].title + '</div></div>' +
|
||||
'<div class="item-subtitle"><font>' + dataObj[i].introduction + '</font></div>' +
|
||||
'<div class="item-subtitle"><span><i class="icon icon-eye-orange"></i><label id="visitCount_' + dataObj[i].id + '">' + dataObj[i].visitCount + '人</label>' +
|
||||
'<i class="icon icon-comments-orange"></i><label id="visitComment_' + dataObj[i].id + '">' + dataObj[i].recommendCommentCount + '条</label></span></div></div>' +
|
||||
'<div class="item-media"><img src=' + dataObj[i].coverImg + '></div>' +
|
||||
'</li></ul></div></div></div>';
|
||||
}
|
||||
if(dataObj[i].type == "投票") {
|
||||
var voteFavorCount = dataObj[i].voteFavorCount;
|
||||
var voteNoFavorCount = dataObj[i].voteNoFavorCount;
|
||||
var voteFavorCountRate = 50
|
||||
var voteNoFavorCountRate = 50
|
||||
if(voteFavorCount == 0 && voteNoFavorCount == 0) {
|
||||
|
||||
} else {
|
||||
voteFavorCountRate = Math.round((voteFavorCount * 100) / (voteFavorCount + voteNoFavorCount));
|
||||
voteNoFavorCountRate = 100 - voteFavorCountRate;
|
||||
}
|
||||
|
||||
html += '<div class="card cardInfo cardInfo03"><div class="card-header">' + dataObj[i].title +
|
||||
'</div><div class="card-content"><div class="card-content-inner row"><div class="vote01 col-50">' +
|
||||
'<i class="icon icon-light-red" data-val="' + dataObj[i].id + '"></i><span>' + dataObj[i].voteFavorText + '</span>' +
|
||||
'<font style="width:' + voteFavorCountRate + '%;" id="voteFavorCountRate_' + dataObj[i].id + '"></font><label id="voteFavorCount_' + dataObj[i].id + '">' + voteFavorCount + '票 ' + voteFavorCountRate + '%</label></div>' +
|
||||
'<div class="vote02 col-50"><i class="icon icon-light-grey" data-val="' + dataObj[i].id + '"></i><span>' + dataObj[i].voteNoFavorText + '</span>' +
|
||||
'<font style="width:' + voteNoFavorCountRate + '%;" id="voteNoFavorCountRate' + dataObj[i].id + '"></font><label id="voteNoFavorCount_' + dataObj[i].id + '">' + voteNoFavorCount + '票 ' + voteNoFavorCountRate + '%</label></div><em>V.S</em></div></div></div>';
|
||||
}
|
||||
}
|
||||
$('.infinite-scroll-bottom .list-container').append(html);
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -71,9 +71,9 @@
|
||||
<span>第三方登录</span>
|
||||
</p>
|
||||
<p>
|
||||
<a class="icon icon-loginMode01" id="wxLogin" onclick="webChatLogin()"></a>
|
||||
<a href="05_mine00_login04_set.html" class="icon icon-loginMode02"></a>
|
||||
<a href="05_mine00_login04_set.html" class="icon icon-loginMode03" id="qqLogin"></a>
|
||||
<a class="icon icon-loginMode01" id="wxLogin" onclick="loginInfo('weixin')"></a>
|
||||
<a class="icon icon-loginMode02" id="qqLogin" onclick="loginInfo('sinaweibo')"></a>
|
||||
<a class="icon icon-loginMode03" id="qqLogin" onclick="loginInfo('qq')"></a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -97,7 +97,7 @@ $.config = {router: false}
|
||||
<script type="text/javascript" src="../../js/axios.min.js"></script>
|
||||
<script type="text/javascript" src="../../js/axiosPlugin.js"></script>
|
||||
<script type="text/javascript" src="../../js/login/codeSms.js" ></script>
|
||||
<script type="text/javascript" src="../../js/login/wxLogin.js" ></script>
|
||||
<script type="text/javascript" src="../../js/login/thirdLogin.js" ></script>
|
||||
<script type="text/javascript" src="../../js/common.js" ></script>
|
||||
|
||||
<script>
|
||||
|
||||
Reference in New Issue
Block a user