Merge branch 'YOUFANGAPP1.1' of 192.168.0.27:dev0/youfang-app into xh-youfangApp1.1
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
/**服务端地址**/
|
/**服务端地址**/
|
||||||
//var BASE_PATH = "http://192.168.10.128:8084";
|
//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.47:8086";
|
//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.47:8086";
|
||||||
|
//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.53:8084";
|
||||||
//var BASE_PATH = "http://192.168.10.171:8084";
|
//var BASE_PATH = "http://192.168.10.171:8084";
|
||||||
/**是否显示过启动页面**/
|
/**是否显示过启动页面**/
|
||||||
|
|||||||
@@ -312,7 +312,7 @@ em.down{color:#88D053;}
|
|||||||
.newCss ul{padding:0.75rem;padding-top:0;padding-left:0.25rem;overflow:hidden;}
|
.newCss ul{padding:0.75rem;padding-top:0;padding-left:0.25rem;overflow:hidden;}
|
||||||
.newCss ul li{background:#F4F4F4;border-radius:0.16rem;display:inline-block;margin-left:0.5rem;margin-bottom:0.5rem;padding:0 0.5rem;line-height:1.5rem;font-size:0.65rem;color:#333;}
|
.newCss ul li{background:#F4F4F4;border-radius:0.16rem;display:inline-block;margin-left:0.5rem;margin-bottom:0.5rem;padding:0 0.5rem;line-height:1.5rem;font-size:0.65rem;color:#333;}
|
||||||
.newCss ul li span{font-size:0.65rem;color:#333;}
|
.newCss ul li span{font-size:0.65rem;color:#333;}
|
||||||
.newCss ul li a{font-size:0.65rem;color:#333;}
|
.newCss ul li a{font-size:0.65rem;color:#333;display:block;}
|
||||||
.newCss ul:before,.popup-about02 .list-block.newCss ul:after{height:0;}
|
.newCss ul:before,.popup-about02 .list-block.newCss ul:after{height:0;}
|
||||||
.content-padded + .newCss ul{padding-bottom:0;}
|
.content-padded + .newCss ul{padding-bottom:0;}
|
||||||
|
|
||||||
@@ -478,13 +478,12 @@ input::-webkit-input-placeholder{
|
|||||||
.recommend + .cardInfo{border-top:none;}
|
.recommend + .cardInfo{border-top:none;}
|
||||||
|
|
||||||
.cardInfo01{color:#333;}
|
.cardInfo01{color:#333;}
|
||||||
.cardInfo01 > img{width:100%;height:180px;}
|
.cardInfo01 > img{width:100%;}
|
||||||
.cardInfo01 span{font-size:0.6rem;color:#666;}
|
.cardInfo01 span{font-size:0.6rem;color:#666;}
|
||||||
.cardInfo01 .card-header{padding:0;font-size:0.85rem;}
|
.cardInfo01 .card-header{padding:0;font-size:0.85rem;}
|
||||||
.cardInfo01 .card-content-inner{padding:0;}
|
.cardInfo01 .card-content-inner{padding:0;}
|
||||||
.cardInfo01 .card-footer{padding:0;}
|
.cardInfo01 .card-footer{padding:0;}
|
||||||
|
|
||||||
.cardInfo01a > img{height:142px;}
|
|
||||||
.cardInfo01a .card-content-inner .tag{display:block;margin-bottom:0.5rem;}
|
.cardInfo01a .card-content-inner .tag{display:block;margin-bottom:0.5rem;}
|
||||||
.cardInfo01a .card-content-inner .tag small{margin-left:0;margin-right:0.2rem;}
|
.cardInfo01a .card-content-inner .tag small{margin-left:0;margin-right:0.2rem;}
|
||||||
.cardInfo01a .card-footer span{font-size:0.7rem;color:#999;text-align:left;width:50%;}
|
.cardInfo01a .card-footer span{font-size:0.7rem;color:#999;text-align:left;width:50%;}
|
||||||
@@ -505,9 +504,9 @@ input::-webkit-input-placeholder{
|
|||||||
.cardInfo02{padding:0.25rem 0;}
|
.cardInfo02{padding:0.25rem 0;}
|
||||||
.cardInfo02 img{width:6.5rem;height:5.2rem;}
|
.cardInfo02 img{width:6.5rem;height:5.2rem;}
|
||||||
.cardInfo02 .item-content{padding:0;}
|
.cardInfo02 .item-content{padding:0;}
|
||||||
.cardInfo02 .item-title{font-size:0.85rem;}
|
.cardInfo02 .item-title{font-size:0.85rem;white-space:normal;-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;}
|
||||||
.cardInfo02 .item-title span{text-align: right}
|
.cardInfo02 .item-title span{text-align:right;}
|
||||||
.cardInfo02 .item-subtitle font{font-size:0.7rem;white-space:normal;text-align:justify;display:block;margin:0.3rem 0;}
|
.cardInfo02 .item-subtitle font{font-size:0.7rem;white-space:normal;-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;margin:0.3rem 0;}
|
||||||
.cardInfo02 .item-subtitle span{font-size:0.6rem;color:#666;max-width:100%;}
|
.cardInfo02 .item-subtitle span{font-size:0.6rem;color:#666;max-width:100%;}
|
||||||
.cardInfo02 .item-subtitle small{font-size:0.7rem;color:#999;}
|
.cardInfo02 .item-subtitle small{font-size:0.7rem;color:#999;}
|
||||||
.cardInfo02 .item-subtitle em{font-size:0.7rem;color:#EB5F34;}
|
.cardInfo02 .item-subtitle em{font-size:0.7rem;color:#EB5F34;}
|
||||||
@@ -557,7 +556,7 @@ input::-webkit-input-placeholder{
|
|||||||
.list-block.commentList .item-media{padding-top:0;margin-top:-1rem;}
|
.list-block.commentList .item-media{padding-top:0;margin-top:-1rem;}
|
||||||
.list-block.commentList .item-media img{width:2.3rem;height:2.3rem;}
|
.list-block.commentList .item-media img{width:2.3rem;height:2.3rem;}
|
||||||
.list-block.commentList .item-after font{color:#999;}
|
.list-block.commentList .item-after font{color:#999;}
|
||||||
.list-block.commentList .item-text{height:auto;min-height:1.5rem;}
|
.list-block.commentList .item-text{height:auto;min-height:1.5rem;color:#333;}
|
||||||
|
|
||||||
.commentBox{height:66px;background:#fff;position:absolute;right:0;left:0;bottom:0;z-index:10;}
|
.commentBox{height:66px;background:#fff;position:absolute;right:0;left:0;bottom:0;z-index:10;}
|
||||||
.commentBox .searchbar{padding:0.75rem 0.5rem;padding-left:0;margin:0;height:66px;background:#fff;border-top:solid 1px #e7e7e7;position:absolute;right:0;left:0;bottom:0;z-index:10;}
|
.commentBox .searchbar{padding:0.75rem 0.5rem;padding-left:0;margin:0;height:66px;background:#fff;border-top:solid 1px #e7e7e7;position:absolute;right:0;left:0;bottom:0;z-index:10;}
|
||||||
@@ -1064,8 +1063,8 @@ input::-webkit-input-placeholder{
|
|||||||
.topBg02 p a{font-size:0.75rem;}
|
.topBg02 p a{font-size:0.75rem;}
|
||||||
|
|
||||||
.collection{position:absolute;right:0.75rem;top:0.4rem;text-align:center;color:#666;font-size:0.7rem;}
|
.collection{position:absolute;right:0.75rem;top:0.4rem;text-align:center;color:#666;font-size:0.7rem;}
|
||||||
.collection02{border:solid 1px #C3C0BC;color:#999;}
|
.button.collection02{border:solid 1px #C3C0BC;color:#999;}
|
||||||
.collection02:active{border:solid 1px #C3C0BC;color:#999;}
|
.button.collection02:active{border:solid 1px #C3C0BC;color:#999;}
|
||||||
.icon-collection01{width:16px;height:16px;background:url(../images/icon-collection01.png) no-repeat center center;background-size:100%;display:block;margin:0 auto;margin-bottom:0.1rem;}
|
.icon-collection01{width:16px;height:16px;background:url(../images/icon-collection01.png) no-repeat center center;background-size:100%;display:block;margin:0 auto;margin-bottom:0.1rem;}
|
||||||
.icon-collection02{width:16px;height:16px;background:url(../images/icon-collection02.png) no-repeat center center;background-size:100%;display:block;margin:0 auto;margin-bottom:0.1rem;}
|
.icon-collection02{width:16px;height:16px;background:url(../images/icon-collection02.png) no-repeat center center;background-size:100%;display:block;margin:0 auto;margin-bottom:0.1rem;}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -11,29 +11,27 @@ axios.interceptors.request.use(function (config) {
|
|||||||
return Promise.reject(error);
|
return Promise.reject(error);
|
||||||
});
|
});
|
||||||
|
|
||||||
var showTimeOutTime = 0;
|
|
||||||
// 添加响应拦截器
|
// 添加响应拦截器
|
||||||
axios.interceptors.response.use(function (response) {
|
axios.interceptors.response.use(function (response) {
|
||||||
plus.nativeUI.closeWaiting();
|
try {
|
||||||
|
plus.nativeUI.closeWaiting();
|
||||||
|
}catch(e){
|
||||||
|
|
||||||
|
}
|
||||||
return response;
|
return response;
|
||||||
}, function (error) {
|
}, function (error) {
|
||||||
if (error.toString().indexOf('timeout') > -1) {
|
try {
|
||||||
var curTime = new Date();
|
if(error=="Error: Network Error" || error.toString().indexOf('timeout') > -1){
|
||||||
if (curTime - showTimeOutTime > 5000) {
|
if(plus.webview.getWebviewById('error.html')==null){
|
||||||
plus.nativeUI.alert("请求超时");
|
clicked('error.html',true,false,{},{},function(){
|
||||||
showTimeOutTime = new Date();
|
window.location.reload();
|
||||||
}
|
})
|
||||||
plus.nativeUI.closeWaiting();
|
}else{
|
||||||
}else if(error=="Error: Network Error"){
|
$(".loadingBg").hide();
|
||||||
if(plus.webview.getWebviewById('error.html')==null){
|
plus.nativeUI.closeWaiting();
|
||||||
clicked('error.html',true,false,{},{},function(){
|
plus.webview.getWebviewById("error.html").show();
|
||||||
window.location.reload();
|
}
|
||||||
})
|
}
|
||||||
}else{
|
}catch(e){}
|
||||||
$(".loadingBg").hide();
|
|
||||||
plus.nativeUI.closeWaiting();
|
|
||||||
plus.webview.getWebviewById("error.html").show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return Promise.reject(error);
|
return Promise.reject(error);
|
||||||
});
|
});
|
||||||
@@ -55,6 +55,15 @@ var renameCitys = [{"baiduCity": "阿克苏地区", "city": "阿克苏"},
|
|||||||
{"baiduCity": "延边朝鲜族自治州", "city": "延边"},
|
{"baiduCity": "延边朝鲜族自治州", "city": "延边"},
|
||||||
{"baiduCity": "伊犁哈萨克自治州", "city": "伊犁"},
|
{"baiduCity": "伊犁哈萨克自治州", "city": "伊犁"},
|
||||||
{"baiduCity": "玉树藏族自治州", "city": "玉树州"}];
|
{"baiduCity": "玉树藏族自治州", "city": "玉树州"}];
|
||||||
|
String.prototype.startWith=function(str){
|
||||||
|
var reg=new RegExp("^"+str);
|
||||||
|
return reg.test(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
String.prototype.endWith=function(str){
|
||||||
|
var reg=new RegExp(str+"$");
|
||||||
|
return reg.test(this);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 把百度的城市格式化成房价网的城市
|
* 把百度的城市格式化成房价网的城市
|
||||||
* @param baiduCity
|
* @param baiduCity
|
||||||
@@ -68,5 +77,8 @@ function formatBaiduCity(baiduCity) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (newCity == "" && baiduCity.endWith("市")) {
|
||||||
|
newCity = baiduCity.substring(0,baiduCity.length-1);
|
||||||
|
}
|
||||||
return newCity;
|
return newCity;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -588,7 +588,9 @@ function loadRentTrends(city, region, name, type){
|
|||||||
}else{
|
}else{
|
||||||
//没数据
|
//没数据
|
||||||
//$("#tabChart2").hide();
|
//$("#tabChart2").hide();
|
||||||
$("#tabRentDiv").addClass("dn")
|
$("#trendDiv2").parent().parent().addClass("dn")
|
||||||
|
$("#chart02").addClass("dn")
|
||||||
|
$("#rentTrendDiv").addClass("dn")
|
||||||
}
|
}
|
||||||
}).catch(function (error) {
|
}).catch(function (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
|||||||
@@ -383,10 +383,7 @@ function nameConver(textName){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function IsInArray(arr, val){
|
|
||||||
var testStr=','+arr.join(",")+",";
|
|
||||||
return testStr.indexOf(","+val+",")!=-1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function addUpChart(dataUp, num){
|
function addUpChart(dataUp, num){
|
||||||
/* 小区上涨 */
|
/* 小区上涨 */
|
||||||
@@ -524,7 +521,7 @@ function docollectCity(city, type){
|
|||||||
if(index>=0){
|
if(index>=0){
|
||||||
da.splice(index, 1)
|
da.splice(index, 1)
|
||||||
cityDetaiVue.$data.citys = da;
|
cityDetaiVue.$data.citys = da;
|
||||||
if(da.length>0){
|
if(da.length==0){
|
||||||
$("a[href='#tabQuotation0']").click();
|
$("a[href='#tabQuotation0']").click();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ $("body").delegate(".open-about02", "click", function () {
|
|||||||
addHotDistricts($("#input_city").val());
|
addHotDistricts($("#input_city").val());
|
||||||
addHistory();
|
addHistory();
|
||||||
$.popup(".popup-about02")
|
$.popup(".popup-about02")
|
||||||
$("input").blur()
|
// $("input").blur()
|
||||||
});
|
});
|
||||||
var hotVue = new Vue({
|
var hotVue = new Vue({
|
||||||
el: '#hotList',
|
el: '#hotList',
|
||||||
@@ -117,8 +117,8 @@ var hotVue = new Vue({
|
|||||||
$("[name=region]").val(this.hotDists[index].region);
|
$("[name=region]").val(this.hotDists[index].region);
|
||||||
$("[name=name]").val(this.hotDists[index].name);
|
$("[name=name]").val(this.hotDists[index].name);
|
||||||
$("[name=cityAddress]").val(this.hotDists[index].city);
|
$("[name=cityAddress]").val(this.hotDists[index].city);
|
||||||
$.closeModal(".popup-about02");
|
// $.closeModal(".popup-about02");
|
||||||
$("input").blur();
|
// $("input").blur();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -158,7 +158,7 @@ var historyVue = new Vue({
|
|||||||
$("[name=name]").val(this.histories[index].name);
|
$("[name=name]").val(this.histories[index].name);
|
||||||
$("[name=cityAddress]").val(this.histories[index].city);
|
$("[name=cityAddress]").val(this.histories[index].city);
|
||||||
$.closeModal(".popup-about02");
|
$.closeModal(".popup-about02");
|
||||||
$("input").blur();
|
// $("input").blur();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -128,12 +128,12 @@ function mhAddItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap,
|
|||||||
}else{
|
}else{
|
||||||
html += "<a class='add alert-text-title'><i class='icon icon-houseLevel'></i>其它</a>";
|
html += "<a class='add alert-text-title'><i class='icon icon-houseLevel'></i>其它</a>";
|
||||||
}
|
}
|
||||||
html += '<a class="button theme add add01 add01a" href="#" onclick="gotoLoanApply(\''+result.id+'\', \''+result.city+'\')">立即申请</a></li>';
|
//控制贷款按钮是否可以显示,便于ios版本审核
|
||||||
|
if(localStorage.getItem("showLoanMenu")!=null && localStorage.getItem("showLoanMenu")=="true"){
|
||||||
|
html += '<a class="button theme add add01 add01a" href="#" onclick="gotoLoanApply(\''+result.id+'\', \''+result.city+'\')">立即申请</a></li>';
|
||||||
|
}else{
|
||||||
|
html += '</li>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$('#myhouse').append(html);
|
$('#myhouse').append(html);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 说明-房产等级 */
|
|
||||||
$(document).on('click','.alert-text-title', function () {
|
|
||||||
$.alert('房产等级是房屋在城市中的综合评级,由高至低分别为 豪宅、公寓、平房、草屋、山洞共5个级别。', '房产等级');
|
|
||||||
});
|
|
||||||
+27
-3
@@ -1,6 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Hello MUI</title>
|
<title>Hello MUI</title>
|
||||||
@@ -46,6 +45,14 @@
|
|||||||
<script src="config.js"></script>
|
<script src="config.js"></script>
|
||||||
<script src="js/common.js"></script>
|
<script src="js/common.js"></script>
|
||||||
<script src="js/push-common.js"></script>
|
<script src="js/push-common.js"></script>
|
||||||
|
<script type="text/javascript" src="js/zepto.js" charset="utf-8"></script>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
/* 关闭路由,以实现不同页面之间的相互跳转(仅开发环境需要) */
|
||||||
|
Zepto = $
|
||||||
|
$.config = {router: false}
|
||||||
|
|
||||||
|
</script>
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
// 清空过期的Token
|
// 清空过期的Token
|
||||||
var token_add_time = localStorage.getItem("user_token_add_time");
|
var token_add_time = localStorage.getItem("user_token_add_time");
|
||||||
@@ -58,7 +65,7 @@
|
|||||||
}
|
}
|
||||||
//document.getElementById("quotations").setAttribute("href", BASE_PATH + '/quotations/index');
|
//document.getElementById("quotations").setAttribute("href", BASE_PATH + '/quotations/index');
|
||||||
//document.getElementById("selfInfo").setAttribute("href", BASE_PATH + '/selfInfo/index');
|
//document.getElementById("selfInfo").setAttribute("href", BASE_PATH + '/selfInfo/index');
|
||||||
//mui初始化
|
//mui初始化
|
||||||
mui.init();
|
mui.init();
|
||||||
var subpages = ['yfindex.html', 'views/house/houseDetail.html', 'views/house/houseManageList.html', 'views/user/userInfo.html'];
|
var subpages = ['yfindex.html', 'views/house/houseDetail.html', 'views/house/houseManageList.html', 'views/user/userInfo.html'];
|
||||||
var subpage_style = {
|
var subpage_style = {
|
||||||
@@ -96,7 +103,24 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// 加载菜单信息,控制是否显示贷款菜单
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
url:BASE_PATH+"/rest/version/info",
|
||||||
|
dataType:'json',
|
||||||
|
async : false,
|
||||||
|
success: function(data) {
|
||||||
|
if(data.status){
|
||||||
|
//存入localStorage Boolean类型变成String
|
||||||
|
localStorage.setItem("showLoanMenu", data.data.showLoanMenu);
|
||||||
|
}else{
|
||||||
|
localStorage.setItem("showLoanMenu", false);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(err) {
|
||||||
|
localStorage.setItem("showLoanMenu", false);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
var self = plus.webview.currentWebview();
|
var self = plus.webview.currentWebview();
|
||||||
for (var i = 0; i < 4; i++) {
|
for (var i = 0; i < 4; i++) {
|
||||||
|
|||||||
@@ -1646,7 +1646,9 @@
|
|||||||
"images/start.png",
|
"images/start.png",
|
||||||
"css/theme-blue.css"
|
"css/theme-blue.css"
|
||||||
],
|
],
|
||||||
"refer": [],
|
"refer": [
|
||||||
|
"views/house/add.html"
|
||||||
|
],
|
||||||
"priority": 0
|
"priority": 0
|
||||||
},
|
},
|
||||||
"views/user/passLogin.html": {
|
"views/user/passLogin.html": {
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ Vue.component('city_increase_ranking',{
|
|||||||
'<em class="up">{{!ci.oneMonthUpDownRange||ci.oneMonthUpDownRange==""?"暂无":Math.abs(100*ci.oneMonthUpDownRange).toFixed(2)+"%"}}<i class="icon" v-bind:class="[ci.oneMonthUpDownRange>0?"icon-arrow-red":"",ci.oneMonthUpDownRange<0?"icon-arrow-green":""]"></i></em>'+
|
'<em class="up">{{!ci.oneMonthUpDownRange||ci.oneMonthUpDownRange==""?"暂无":Math.abs(100*ci.oneMonthUpDownRange).toFixed(2)+"%"}}<i class="icon" v-bind:class="[ci.oneMonthUpDownRange>0?"icon-arrow-red":"",ci.oneMonthUpDownRange<0?"icon-arrow-green":""]"></i></em>'+
|
||||||
'</div>'+
|
'</div>'+
|
||||||
'<div class="col-20">'+
|
'<div class="col-20">'+
|
||||||
'<i class="button theme collection collection01 confirm-ok" v-bind:class="{dn:ci.follow}" v-on:click="follow(ci.city,$event, 0)" >关注</i>'+
|
'<i class="button collection collection02 confirm-ok" v-on:click="abolish(ci.city,$event, 1)" v-if="ci.follow">取消</i>'+
|
||||||
'<i class="button collection collection02 confirm-ok" v-bind:class="{dn:!ci.follow}" v-on:click="abolish(ci.city,$event, 1)">取消</i>'+
|
'<i class="button theme collection collection01 confirm-ok" v-on:click="follow(ci.city,$event, 0)" v-else>关注</i>'+
|
||||||
'</div>'+
|
'</div>'+
|
||||||
'</div>'+
|
'</div>'+
|
||||||
'</div>'+
|
'</div>'+
|
||||||
@@ -53,7 +53,52 @@ Vue.component('city_increase_ranking',{
|
|||||||
clicked('/views/user/passLogin.html',true,false,{},{},function(){
|
clicked('/views/user/passLogin.html',true,false,{},{},function(){
|
||||||
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
||||||
}else{
|
}else{
|
||||||
|
$.confirm('您确定要关注'+city+"?", function () {
|
||||||
|
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
|
||||||
|
var msg = response.data.message;
|
||||||
|
if(msg != "取消关注成功" && msg != "关注成功"){
|
||||||
|
$.toast(msg);
|
||||||
|
}else{
|
||||||
|
//$(event.target).parent().children().removeClass("dn");
|
||||||
|
//$(event.target).addClass("dn");
|
||||||
|
|
||||||
|
var increaseList = cityIncreaseRankingData.cityIncreaseRankingList
|
||||||
|
|
||||||
|
if(increaseList && increaseList.length>0){
|
||||||
|
for(var i in increaseList){
|
||||||
|
var dd = increaseList[i];
|
||||||
|
if(dd.city == city){
|
||||||
|
if(type == 0){
|
||||||
|
dd.follow = true;
|
||||||
|
}else{
|
||||||
|
dd.follow = false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// reloadMyFocus()
|
||||||
|
// reloadCityPotentialRanking()
|
||||||
|
// reloadCityIncreaseRanking()
|
||||||
|
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
|
||||||
|
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
|
||||||
|
plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
||||||
|
// loadMyCollectCity()
|
||||||
|
if(type == 0){
|
||||||
|
var curDatas = cityDetaiVue.$data.citys
|
||||||
|
if(curDatas && curDatas.length>=0){
|
||||||
|
if(!IsInArray(curDatas, city)){
|
||||||
|
cityDetaiVue.$data.citys.push(city);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch(function(error){
|
||||||
|
console.log(error)
|
||||||
|
})
|
||||||
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
@@ -63,13 +108,30 @@ Vue.component('city_increase_ranking',{
|
|||||||
if(msg != "取消关注成功" && msg != "关注成功"){
|
if(msg != "取消关注成功" && msg != "关注成功"){
|
||||||
$.toast(msg);
|
$.toast(msg);
|
||||||
}else{
|
}else{
|
||||||
$(event.target).parent().children().removeClass("dn");
|
//$(event.target).parent().children().removeClass("dn");
|
||||||
$(event.target).addClass("dn");
|
//$(event.target).addClass("dn");
|
||||||
|
|
||||||
|
var increaseList = cityIncreaseRankingData.cityIncreaseRankingList
|
||||||
|
|
||||||
|
if(increaseList && increaseList.length>0){
|
||||||
|
for(var i in increaseList){
|
||||||
|
var dd = increaseList[i];
|
||||||
|
if(dd.city == city){
|
||||||
|
if(type == 0){
|
||||||
|
dd.follow = true;
|
||||||
|
}else{
|
||||||
|
dd.follow = false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
reloadMyFocus()
|
reloadMyFocus()
|
||||||
reloadCityPotentialRanking()
|
reloadCityPotentialRanking()
|
||||||
if(type == 0){
|
if(type == 0){
|
||||||
var curDatas = cityDetaiVue.$data.citys
|
var curDatas = cityDetaiVue.$data.citys
|
||||||
if(curDatas && curDatas.length>0){
|
if(curDatas && curDatas.length>=0){
|
||||||
if(!IsInArray(curDatas, city)){
|
if(!IsInArray(curDatas, city)){
|
||||||
cityDetaiVue.$data.citys.push(city);
|
cityDetaiVue.$data.citys.push(city);
|
||||||
}
|
}
|
||||||
@@ -97,8 +159,25 @@ Vue.component('city_increase_ranking',{
|
|||||||
|
|
||||||
$.confirm("您确定要取消关注?", function () {
|
$.confirm("您确定要取消关注?", function () {
|
||||||
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
|
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
|
||||||
$(event.target).parent().children().removeClass("dn");
|
//$(event.target).parent().children().removeClass("dn");
|
||||||
$(event.target).addClass("dn");
|
//$(event.target).addClass("dn");
|
||||||
|
|
||||||
|
var increaseList = cityIncreaseRankingData.cityIncreaseRankingList
|
||||||
|
|
||||||
|
if(increaseList && increaseList.length>0){
|
||||||
|
for(var i in increaseList){
|
||||||
|
var dd = increaseList[i];
|
||||||
|
if(dd.city == city){
|
||||||
|
if(type == 0){
|
||||||
|
dd.follow = true;
|
||||||
|
}else{
|
||||||
|
dd.follow = false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
reloadMyFocus();
|
reloadMyFocus();
|
||||||
reloadCityPotentialRanking()
|
reloadCityPotentialRanking()
|
||||||
//plus.webview.getWebviewById('views/user/userInfo.html').reload()
|
//plus.webview.getWebviewById('views/user/userInfo.html').reload()
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ Vue.component('city_potential_ranking',{
|
|||||||
'</span>'+
|
'</span>'+
|
||||||
'</div>'+
|
'</div>'+
|
||||||
'<div class="col-20">'+
|
'<div class="col-20">'+
|
||||||
'<i class="button theme collection collection01" v-bind:class="{dn:cp.follow}" v-on:click="follow(cp.city,$event,0)">关注</i>'+
|
'<i class="button collection collection02 confirm-ok" v-on:click="abolish(cp.city,$event,1)" v-if="cp.follow" >取消</i>'+
|
||||||
'<i class="button collection collection02" v-bind:class="{dn:!cp.follow}" v-on:click="abolish(cp.city,$event,1)">取消</i>'+
|
'<i class="button theme collection collection01 confirm-ok" v-on:click="follow(cp.city,$event,0)" v-else>关注</i>'+
|
||||||
'</div>'+
|
'</div>'+
|
||||||
'</div>'+
|
'</div>'+
|
||||||
'</div>'+
|
'</div>'+
|
||||||
@@ -78,8 +78,23 @@ Vue.component('city_potential_ranking',{
|
|||||||
if(msg != "取消关注成功" && msg != "关注成功"){
|
if(msg != "取消关注成功" && msg != "关注成功"){
|
||||||
$.toast(msg);
|
$.toast(msg);
|
||||||
}else{
|
}else{
|
||||||
$(event.target).parent().children().removeClass("dn");
|
//$(event.target).parent().children().removeClass("dn");
|
||||||
$(event.target).addClass("dn");
|
//$(event.target).addClass("dn");
|
||||||
|
var rankList = cityPotentialRankingData.cityPotentialRankingList
|
||||||
|
|
||||||
|
if(rankList && rankList.length>0){
|
||||||
|
for(var i in rankList){
|
||||||
|
var dd = rankList[i];
|
||||||
|
if(dd.city == city){
|
||||||
|
if(type == 0){
|
||||||
|
dd.follow = true;
|
||||||
|
}else{
|
||||||
|
dd.follow = false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
|
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
|
||||||
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
|
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
|
||||||
plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
||||||
@@ -94,49 +109,88 @@ Vue.component('city_potential_ranking',{
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
|
$.confirm('您确定要关注'+city+"?", function () {
|
||||||
var msg = response.data.message;
|
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
|
||||||
if(msg != "取消关注成功" && msg != "关注成功"){
|
var msg = response.data.message;
|
||||||
$.toast(msg);
|
if(msg != "取消关注成功" && msg != "关注成功"){
|
||||||
}else{
|
$.toast(msg);
|
||||||
$(event.target).parent().children().removeClass("dn");
|
}else{
|
||||||
$(event.target).addClass("dn");
|
//$(event.target).parent().children().removeClass("dn");
|
||||||
reloadMyFocus()
|
//$(event.target).addClass("dn");
|
||||||
reloadCityIncreaseRanking()
|
|
||||||
if(type == 0){
|
|
||||||
var curDatas = cityDetaiVue.$data.citys
|
var rankList = cityPotentialRankingData.cityPotentialRankingList
|
||||||
if(curDatas && curDatas.length>0){
|
|
||||||
if(!IsInArray(curDatas, city)){
|
if(rankList && rankList.length>0){
|
||||||
cityDetaiVue.$data.citys.push(city);
|
for(var i in rankList){
|
||||||
|
var dd = rankList[i];
|
||||||
|
if(dd.city == city){
|
||||||
|
if(type == 0){
|
||||||
|
dd.follow = true;
|
||||||
|
}else{
|
||||||
|
dd.follow = false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reloadMyFocus()
|
||||||
|
reloadCityIncreaseRanking()
|
||||||
|
if(type == 0){
|
||||||
|
var curDatas = cityDetaiVue.$data.citys
|
||||||
|
if(curDatas && curDatas.length>=0){
|
||||||
|
if(!IsInArray(curDatas, city)){
|
||||||
|
cityDetaiVue.$data.citys.push(city);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
||||||
}
|
}
|
||||||
//plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
}).catch(function(error){
|
||||||
}
|
console.log(error)
|
||||||
}).catch(function(error){
|
})
|
||||||
console.log(error)
|
});
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
abolish:function(city,event,type){
|
abolish:function(city,event,type){
|
||||||
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
|
$.confirm("您确定要取消关注?", function () {
|
||||||
$(event.target).parent().children().removeClass("dn");
|
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
|
||||||
$(event.target).addClass("dn");
|
// $(event.target).parent().children().removeClass("dn");
|
||||||
reloadMyFocus()
|
// $(event.target).addClass("dn");
|
||||||
reloadCityIncreaseRanking()
|
|
||||||
var da = cityDetaiVue.$data.citys
|
var rankList = cityPotentialRankingData.cityPotentialRankingList
|
||||||
if(da && da.length>0){
|
|
||||||
var index = da.indexOf(city)
|
if(rankList && rankList.length>0){
|
||||||
if(index>0){
|
for(var i in rankList){
|
||||||
da.splice(index, 1)
|
var dd = rankList[i];
|
||||||
cityDetaiVue.$data.citys = da;
|
if(dd.city == city){
|
||||||
|
if(type == 0){
|
||||||
|
dd.follow = true;
|
||||||
|
}else{
|
||||||
|
dd.follow = false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
//plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
reloadMyFocus()
|
||||||
}).catch(function(error){
|
reloadCityIncreaseRanking()
|
||||||
console.log(error)
|
var da = cityDetaiVue.$data.citys
|
||||||
})
|
if(da && da.length>0){
|
||||||
|
var index = da.indexOf(city)
|
||||||
|
if(index>0){
|
||||||
|
da.splice(index, 1)
|
||||||
|
cityDetaiVue.$data.citys = da;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
||||||
|
}).catch(function(error){
|
||||||
|
console.log(error)
|
||||||
|
})
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted:function(){
|
mounted:function(){
|
||||||
@@ -159,7 +213,10 @@ function reloadCityPotentialRanking(){
|
|||||||
})
|
})
|
||||||
cityPotentialRankingData.cityPotentialRankingList = response.data.data;
|
cityPotentialRankingData.cityPotentialRankingList = response.data.data;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}).catch(function(error){
|
}).catch(function(error){
|
||||||
console.log(error)
|
console.log(error)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,8 +75,8 @@ function reloadMyFocus(){
|
|||||||
$("#myFocusFirstPage").hide();
|
$("#myFocusFirstPage").hide();
|
||||||
$("#myFocus").hide();
|
$("#myFocus").hide();
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
myFocusDatas.myFocusList = response.data.data;
|
myFocusDatas.myFocusList = response.data.data;
|
||||||
|
$("#myFocus").show()
|
||||||
}
|
}
|
||||||
}).catch(function(error){
|
}).catch(function(error){
|
||||||
console.log(error)
|
console.log(error)
|
||||||
|
|||||||
@@ -119,6 +119,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="chart" id="chart01" style="height:270px;"></div>
|
<div class="chart" id="chart01" style="height:270px;"></div>
|
||||||
|
|
||||||
<div class="topicTitle topicTitle01" style="position:relative;border-top:solid 1px #e7e7e7;">租金
|
<div class="topicTitle topicTitle01" style="position:relative;border-top:solid 1px #e7e7e7;">租金
|
||||||
<div class="content-block">
|
<div class="content-block">
|
||||||
<div class="buttons-row theme" id="trendDiv2">
|
<div class="buttons-row theme" id="trendDiv2">
|
||||||
@@ -226,9 +227,9 @@ $.config = {router: false}
|
|||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var city = "上海"
|
var city = "北京"
|
||||||
var region = "黄浦"
|
var region = "朝阳"
|
||||||
var name = "花园公寓 "
|
var name = "姜庄湖园林一期"
|
||||||
//var lat = 31.292437
|
//var lat = 31.292437
|
||||||
//var lng = 121.48703
|
//var lng = 121.48703
|
||||||
|
|
||||||
|
|||||||
@@ -276,9 +276,12 @@ $.config = {router: false}
|
|||||||
// evaluate_msg.msg=h.evaluateMsg
|
// evaluate_msg.msg=h.evaluateMsg
|
||||||
if(typeof(h.imgId)!="undefined"&&h.imgId!=null&&$.trim(h.imgId)!=""){
|
if(typeof(h.imgId)!="undefined"&&h.imgId!=null&&$.trim(h.imgId)!=""){
|
||||||
$("#img").attr("src",BASE_PATH+"/img/"+h.imgId);
|
$("#img").attr("src",BASE_PATH+"/img/"+h.imgId);
|
||||||
$("#img").click(function(){
|
//控制贷款按钮是否可以显示,便于ios版本审核
|
||||||
clicked('/views/loan/loanInfo.html',true,false,{},{houseId: hid, city: h.city, mobile: ""},function(){})
|
if(localStorage.getItem("showLoanMenu")!=null && localStorage.getItem("showLoanMenu")=="true"){
|
||||||
})
|
$("#img").click(function(){
|
||||||
|
clicked('/views/loan/loanInfo.html',true,false,{},{houseId: hid, city: h.city, mobile: ""},function(){})
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
loadingChart(h.city,h.region,h.name,2)
|
loadingChart(h.city,h.region,h.name,2)
|
||||||
//按照时间范围加载数据
|
//按照时间范围加载数据
|
||||||
|
|||||||
@@ -15,11 +15,9 @@
|
|||||||
<link rel="stylesheet" href="../../css/theme-orange.css">
|
<link rel="stylesheet" href="../../css/theme-orange.css">
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.popup-about03 ul,.popup-about04 ul{margin:0 0.5rem;border:solid 1px #e6e6ea;border-radius:6px;}
|
.list-block ul:before{height:0;}
|
||||||
.popup-about03 .list-block.list-block01,.popup-about04 .list-block.list-block01{margin-top:0;}
|
.list-block.mb05 ul:before{height:1px;}
|
||||||
.popup-about03 .list-block ul:before,.popup-about04 .list-block ul:before{height:0;}
|
.list-block.mb05 ul:after{height:0;}
|
||||||
.popup-about03 .list-block ul:after,.popup-about04 .list-block ul:after{height:0;}
|
|
||||||
.picker-item{padding:0 1rem;font-size:18px;}
|
|
||||||
.info-container input{float:none;width:100%;}
|
.info-container input{float:none;width:100%;}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@@ -38,8 +36,8 @@
|
|||||||
</button>-->
|
</button>-->
|
||||||
<h1 class="title">房产评估</h1>
|
<h1 class="title">房产评估</h1>
|
||||||
</header>
|
</header>
|
||||||
<div class="content">
|
<div class="content f3">
|
||||||
<div class="list-block media-list">
|
<div class="list-block media-list mb05">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a class="item-link item-content">
|
<a class="item-link item-content">
|
||||||
@@ -119,7 +117,7 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="list-block media-list" id="liveStatusDiv" style="display: none;">
|
<div class="list-block media-list" id="liveStatusDiv" style="display:none;">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a class="item-link item-content">
|
<a class="item-link item-content">
|
||||||
|
|||||||
@@ -102,7 +102,7 @@
|
|||||||
<i class="icon icon-evaluation03"></i>
|
<i class="icon icon-evaluation03"></i>
|
||||||
<span>我要置换</span>
|
<span>我要置换</span>
|
||||||
</div>-->
|
</div>-->
|
||||||
<div onclick="gotoLoanApply()">
|
<div onclick="gotoLoanApply()" id="gotoLoanApply" style="display: none;">
|
||||||
<i class="icon icon-personal03"></i>
|
<i class="icon icon-personal03"></i>
|
||||||
<span>我要贷款</span>
|
<span>我要贷款</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -333,7 +333,12 @@ var oriName;
|
|||||||
function onPlusReady(){
|
function onPlusReady(){
|
||||||
var self = plus.webview.currentWebview();
|
var self = plus.webview.currentWebview();
|
||||||
houseId = self.houseId; //type为1时是我的房产
|
houseId = self.houseId; //type为1时是我的房产
|
||||||
//houseId="106777351102136320";
|
//控制贷款按钮是否可以显示,便于ios版本审核
|
||||||
|
if(localStorage.getItem("showLoanMenu")!=null && localStorage.getItem("showLoanMenu")=="true"){
|
||||||
|
$('#gotoLoanApply').show();
|
||||||
|
}else{
|
||||||
|
$('#gotoLoanApply').hide();
|
||||||
|
}
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
var baseInfo = new Vue({
|
var baseInfo = new Vue({
|
||||||
|
|||||||
@@ -45,8 +45,8 @@
|
|||||||
<a href="#tabQuotation0" class="tab-link button">添加</a>
|
<a href="#tabQuotation0" class="tab-link button">添加</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tabs">
|
<div class="tabs" >
|
||||||
<div id="tabQuotation1" class="tab active" >
|
<div id="tabQuotation1" class="tab active" v-cloak>
|
||||||
<div class="card cardPrice cardPrice01 cardCity" id="countryInfo" v-cloak>
|
<div class="card cardPrice cardPrice01 cardCity" id="countryInfo" v-cloak>
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<label>全国</label>
|
<label>全国</label>
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="myFocusFirstPage">
|
<div id="myFocusFirstPage" v-cloak>
|
||||||
<my_focus></my_focus>
|
<my_focus></my_focus>
|
||||||
</div>
|
</div>
|
||||||
<div class="cardNearbyBox cardNearbyBox01 cardRankingBox cardRankingBox01" id="countryRank" v-cloak>
|
<div class="cardNearbyBox cardNearbyBox01 cardRankingBox cardRankingBox01" id="countryRank" v-cloak>
|
||||||
@@ -1211,6 +1211,7 @@ $.config = {router: false}
|
|||||||
<script type='text/javascript' src='../../js/common.js' charset='utf-8'></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/axios.min.js"></script>
|
||||||
<script type="text/javascript" src="../../js/axiosPlugin.js"></script>
|
<script type="text/javascript" src="../../js/axiosPlugin.js"></script>
|
||||||
|
<script type="text/javascript" src="../../js/quotations/cityDetail.js" ></script>
|
||||||
<script type="text/javascript" src="../component/myFocusComponent.js"></script>
|
<script type="text/javascript" src="../component/myFocusComponent.js"></script>
|
||||||
<script type="text/javascript" src="../component/cityIncreaseRankingComponent.js"></script>
|
<script type="text/javascript" src="../component/cityIncreaseRankingComponent.js"></script>
|
||||||
<script type="text/javascript" src="../component/cityPotentialRankingComponent.js"></script>
|
<script type="text/javascript" src="../component/cityPotentialRankingComponent.js"></script>
|
||||||
@@ -1218,7 +1219,9 @@ $.config = {router: false}
|
|||||||
<script type="text/javascript" src="../component/cityChooseComponent.js"></script>
|
<script type="text/javascript" src="../component/cityChooseComponent.js"></script>
|
||||||
<script type="text/javascript" src="../../js/echarts.js" charset="utf-8"></script>
|
<script type="text/javascript" src="../../js/echarts.js" charset="utf-8"></script>
|
||||||
<script type="text/javascript" src="../../js/highcharts-4.2.3.js" charset="utf-8"></script>
|
<script type="text/javascript" src="../../js/highcharts-4.2.3.js" charset="utf-8"></script>
|
||||||
<script type="text/javascript" src="../../js/quotations/cityDetail.js" ></script>
|
|
||||||
|
<script type="text/javascript" src="../../js/city.js" ></script>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var date = new Date();
|
var date = new Date();
|
||||||
@@ -1236,6 +1239,18 @@ $.config = {router: false}
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var allCityVue = new Vue({
|
||||||
|
el: '#countryInfo',
|
||||||
|
data: {
|
||||||
|
nowYear : "",
|
||||||
|
nowMonth : "",
|
||||||
|
cityCount : "",
|
||||||
|
upRate : "",
|
||||||
|
downRate : "",
|
||||||
|
avgUpRate :"",
|
||||||
|
avgUownRate : ""
|
||||||
|
}
|
||||||
|
})
|
||||||
var cityDetaiVue = new Vue({
|
var cityDetaiVue = new Vue({
|
||||||
el: '#tabCityDiv',
|
el: '#tabCityDiv',
|
||||||
data: {
|
data: {
|
||||||
@@ -1243,18 +1258,28 @@ $.config = {router: false}
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
var cityRankVue = new Vue({
|
||||||
|
el: '#countryRank',
|
||||||
|
data: {
|
||||||
|
datas : ""
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
document.addEventListener('plusready', onPlusReady, false);
|
document.addEventListener('plusready', onPlusReady, false);
|
||||||
function onPlusReady(){
|
function onPlusReady(){
|
||||||
var city = "";
|
var city = "";
|
||||||
plus.geolocation.getCurrentPosition(function(p){
|
plus.geolocation.getCurrentPosition(function(p){
|
||||||
//province = p.address.province;
|
|
||||||
city = p.address.city;
|
city = p.address.city;
|
||||||
//region = p.address.district;
|
|
||||||
if(city && city.endsWith("市")){
|
if(city && city.endsWith("市")){
|
||||||
positionCity = city.substring(0, city.length-1)
|
|
||||||
|
var formatCity = formatBaiduCity(city);
|
||||||
|
positionCity = formatCity
|
||||||
|
city = formatCity;
|
||||||
|
$(".nowCity").html(city);
|
||||||
|
|
||||||
|
loadAllCityData();
|
||||||
}
|
}
|
||||||
//lng = p.coords.longitude;//获取到当前位置的经度
|
|
||||||
//lat = p.coords.latitude;//获取到当前位置的纬度;
|
|
||||||
|
|
||||||
}, function(e){
|
}, function(e){
|
||||||
},
|
},
|
||||||
@@ -1273,27 +1298,7 @@ $.config = {router: false}
|
|||||||
var cityPotentialRanking = new Vue({
|
var cityPotentialRanking = new Vue({
|
||||||
el:"#cityPotentialRanking"
|
el:"#cityPotentialRanking"
|
||||||
})
|
})
|
||||||
// var cityChoose = new Vue({
|
|
||||||
// el:"#cityChoose",
|
|
||||||
// data:{
|
|
||||||
// city:''
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
plus.geolocation.getCurrentPosition(function(p){
|
|
||||||
//province = p.address.province;
|
|
||||||
var cityStr = p.address.city;
|
|
||||||
if(cityStr){
|
|
||||||
$(".nowCity").html(cityStr.endsWith("市")?cityStr.substring(0,cityStr.length-1):cityStr);
|
|
||||||
}
|
|
||||||
//region = p.address.district;
|
|
||||||
}, function(e){
|
|
||||||
},
|
|
||||||
{
|
|
||||||
provider:'baidu',
|
|
||||||
enableHighAccuracy:true,
|
|
||||||
coordsType:'bd09ll'
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
/* button状态切换 */
|
/* button状态切换 */
|
||||||
@@ -1388,7 +1393,7 @@ $.config = {router: false}
|
|||||||
}
|
}
|
||||||
|
|
||||||
//加载首页全国数据
|
//加载首页全国数据
|
||||||
$(function() {
|
function loadAllCityData(){
|
||||||
var date=new Date;
|
var date=new Date;
|
||||||
var year=date.getFullYear();
|
var year=date.getFullYear();
|
||||||
var month=date.getMonth()+1;
|
var month=date.getMonth()+1;
|
||||||
@@ -1398,19 +1403,14 @@ $.config = {router: false}
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
new Vue({
|
|
||||||
el: '#countryInfo',
|
|
||||||
data: {
|
|
||||||
nowYear : year,
|
|
||||||
nowMonth : month,
|
|
||||||
cityCount : response.data.data.cityCount,
|
|
||||||
upRate : response.data.data.upRate,
|
|
||||||
downRate : response.data.data.downRate,
|
|
||||||
avgUpRate : response.data.data.avgUpRate,
|
|
||||||
avgUownRate : response.data.data.avgUownRate
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
allCityVue.nowYear = year;
|
||||||
|
allCityVue.nowMonth = month;
|
||||||
|
allCityVue.cityCount = response.data.data.cityCount;
|
||||||
|
allCityVue.upRate = response.data.data.upRate;
|
||||||
|
allCityVue.downRate = response.data.data.downRate;
|
||||||
|
allCityVue.avgUpRate = response.data.data.avgUpRate;
|
||||||
|
allCityVue.avgUownRate = response.data.data.avgUownRate;
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
@@ -1423,19 +1423,15 @@ $.config = {router: false}
|
|||||||
})
|
})
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
//0:涨幅排行 1:潜力排行 2:均价排行
|
//0:涨幅排行 1:潜力排行 2:均价排行
|
||||||
new Vue({
|
|
||||||
el: '#countryRank',
|
cityRankVue.datas = response.data.data
|
||||||
data: {
|
|
||||||
datas : response.data.data
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
}
|
||||||
|
|
||||||
function addCityFocus(city){
|
function addCityFocus(city){
|
||||||
//city=city.replace("<i></i>","")
|
//city=city.replace("<i></i>","")
|
||||||
@@ -1567,7 +1563,7 @@ function addFocus(city){
|
|||||||
plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
||||||
|
|
||||||
var curDatas = response.data.data
|
var curDatas = response.data.data
|
||||||
if(curDatas && curDatas.length>0){
|
if(curDatas && curDatas.length>=0){
|
||||||
if(!IsInArray(curDatas, city)){
|
if(!IsInArray(curDatas, city)){
|
||||||
cityDetaiVue.$data.citys.push(city);
|
cityDetaiVue.$data.citys.push(city);
|
||||||
}
|
}
|
||||||
@@ -1605,12 +1601,14 @@ function addFocus(city){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function hotCity(city){
|
function hotCity(city){
|
||||||
clicked('../house/cityDetail.html',true,false,{},{city:city},function(){
|
clicked('../house/cityDetail.html',true,false,{},{city:city},function(){
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function IsInArray(arr, val){
|
||||||
|
var testStr=','+arr.join(",")+",";
|
||||||
|
return testStr.indexOf(","+val+",")!=-1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ $.config = {router: false}
|
|||||||
<script type="text/javascript" src="../../js/shara/sharaMine.js" ></script>
|
<script type="text/javascript" src="../../js/shara/sharaMine.js" ></script>
|
||||||
<script type="text/javascript" src="../../js/log/log_stat.js" ></script>
|
<script type="text/javascript" src="../../js/log/log_stat.js" ></script>
|
||||||
<script>
|
<script>
|
||||||
//初始化init
|
//初始化init(init方法必须调用,屏蔽后,无线下拉刷新无效果)
|
||||||
$.init();
|
$.init();
|
||||||
|
|
||||||
//定义对象
|
//定义对象
|
||||||
@@ -282,11 +282,6 @@ function gotoLoanApply(houseId, city){
|
|||||||
clicked('/views/loan/loanInfo.html',true,false,{},{houseId: houseId, city: city, mobile: ""},function(){})
|
clicked('/views/loan/loanInfo.html',true,false,{},{houseId: houseId, city: city, mobile: ""},function(){})
|
||||||
}
|
}
|
||||||
|
|
||||||
//界面加载
|
|
||||||
$(document).ready(function () {
|
|
||||||
checkIsLogin();
|
|
||||||
});
|
|
||||||
|
|
||||||
/* 分页构造数据 */
|
/* 分页构造数据 */
|
||||||
function addItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, xqPotentialIndexMap, houseInfoTotalMap) {
|
function addItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, xqPotentialIndexMap, houseInfoTotalMap) {
|
||||||
var html = '';
|
var html = '';
|
||||||
@@ -371,7 +366,12 @@ function addItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, xq
|
|||||||
}else{
|
}else{
|
||||||
html += "<a class='add alert-text-title'><i class='icon icon-houseLevel'></i>其它</a>";
|
html += "<a class='add alert-text-title'><i class='icon icon-houseLevel'></i>其它</a>";
|
||||||
}
|
}
|
||||||
html += '<a class="button theme add add01 add01a" href="#" onclick="gotoLoanApply(\''+result.id+'\', \''+result.city+'\')">立即申请</a></li>';
|
//控制贷款按钮是否可以显示,便于ios版本审核
|
||||||
|
if(localStorage.getItem("showLoanMenu")!=null && localStorage.getItem("showLoanMenu")=="true"){
|
||||||
|
html += '<a class="button theme add add01 add01a" href="#" onclick="gotoLoanApply(\''+result.id+'\', \''+result.city+'\')">立即申请</a></li>';
|
||||||
|
}else{
|
||||||
|
html += '</li>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$('.infinite-scroll-bottom .list-container').append(html);
|
$('.infinite-scroll-bottom .list-container').append(html);
|
||||||
}
|
}
|
||||||
@@ -381,6 +381,12 @@ $(document).on('click','.alert-text-title', function () {
|
|||||||
$.alert('房产等级是房屋在城市中的综合评级,由高至低分别为 豪宅、公寓、平房、草屋、山洞共5个级别。', '房产等级');
|
$.alert('房产等级是房屋在城市中的综合评级,由高至低分别为 豪宅、公寓、平房、草屋、山洞共5个级别。', '房产等级');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
document.addEventListener('plusready', onPlusReady, false);
|
||||||
|
|
||||||
|
function onPlusReady(){
|
||||||
|
checkIsLogin();
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ $.config = {router: false}
|
|||||||
<script type="text/javascript" src="../../js/shara/sharaMine.js" ></script>
|
<script type="text/javascript" src="../../js/shara/sharaMine.js" ></script>
|
||||||
<script type="text/javascript" src="../../js/log/log_stat.js" ></script>
|
<script type="text/javascript" src="../../js/log/log_stat.js" ></script>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
//调用mui.init方法
|
//调用mui.init方法
|
||||||
$.init()
|
$.init()
|
||||||
|
|
||||||
@@ -164,6 +164,7 @@ function addManagement(id, houseStatus, liveStatus){
|
|||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//查询房产评估列表AJAX请求
|
//查询房产评估列表AJAX请求
|
||||||
function selectEvaluateList(){
|
function selectEvaluateList(){
|
||||||
//先清空列表
|
//先清空列表
|
||||||
@@ -268,10 +269,13 @@ function constructHtmlContent(results, xqOneMonthUpDownRangeMap, cityAvgPriceMap
|
|||||||
return htmlContent;
|
return htmlContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//立即评估
|
||||||
function openaddWindow(){
|
function openaddWindow(){
|
||||||
clicked('/views/house/add.html',true,false,{},{type:1},function(){
|
clicked('/views/house/add.html',true,false,{},{type:1},function(){
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//评估报告详情
|
||||||
function openReportWindow(id){
|
function openReportWindow(id){
|
||||||
clicked('/views/evaluate/evaluateReport.html',true,false,{},{hid:id})
|
clicked('/views/evaluate/evaluateReport.html',true,false,{},{hid:id})
|
||||||
}
|
}
|
||||||
@@ -286,7 +290,13 @@ function checkIsLogin(){
|
|||||||
selectEvaluateList();
|
selectEvaluateList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
checkIsLogin()
|
|
||||||
|
document.addEventListener('plusready', onPlusReady, false);
|
||||||
|
|
||||||
|
function onPlusReady(){
|
||||||
|
checkIsLogin();
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -124,6 +124,8 @@ $.config = {router: false}
|
|||||||
|
|
||||||
<script type="text/javascript" src="../../js/shara/sharaMine.js" ></script>
|
<script type="text/javascript" src="../../js/shara/sharaMine.js" ></script>
|
||||||
<script type="text/javascript" src="../../js/log/log_stat.js" ></script>
|
<script type="text/javascript" src="../../js/log/log_stat.js" ></script>
|
||||||
|
<script type="text/javascript" src="../../js/city.js" ></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener('plusready', onPlusReady, false);
|
document.addEventListener('plusready', onPlusReady, false);
|
||||||
var id; //= "186182250936643584";
|
var id; //= "186182250936643584";
|
||||||
@@ -238,6 +240,10 @@ function getPosition(){
|
|||||||
province = p.address.province;
|
province = p.address.province;
|
||||||
city = p.address.city;
|
city = p.address.city;
|
||||||
region = p.address.district;
|
region = p.address.district;
|
||||||
|
if(city){
|
||||||
|
city = formatBaiduCity(city);
|
||||||
|
|
||||||
|
}
|
||||||
}, function(e){
|
}, function(e){
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -102,8 +102,6 @@
|
|||||||
<div class="topicContent" style="padding:0;padding-bottom:0.75rem;" id="rentTrendDiv">
|
<div class="topicContent" style="padding:0;padding-bottom:0.75rem;" id="rentTrendDiv">
|
||||||
<div class="chart" id="chart02" style="margin-top:0.75rem;"></div>
|
<div class="chart" id="chart02" style="margin-top:0.75rem;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="topic dn" id="mapDiv">
|
<div class="topic dn" id="mapDiv">
|
||||||
@@ -176,9 +174,9 @@ $.config = {router: false}
|
|||||||
<script type='text/javascript' src='../../js/common.js' charset='utf-8'></script>
|
<script type='text/javascript' src='../../js/common.js' charset='utf-8'></script>
|
||||||
<script type="text/javascript" src="../../js/log/log_stat.js" ></script>
|
<script type="text/javascript" src="../../js/log/log_stat.js" ></script>
|
||||||
<script>
|
<script>
|
||||||
var city = "上海"
|
var city = "北京"
|
||||||
var region = "黄浦"
|
var region = "朝阳"
|
||||||
var name = "花园公寓"
|
var name = "姜庄湖园林一期"
|
||||||
|
|
||||||
var lat;
|
var lat;
|
||||||
var lng;
|
var lng;
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ $(document).on('click','.alert-text-title', function () {
|
|||||||
$.alert('房产等级是房屋在城市中的综合评级,由高至低分别为 豪宅、公寓、平房、草屋、山洞共5个级别。', '房产等级');
|
$.alert('房产等级是房屋在城市中的综合评级,由高至低分别为 豪宅、公寓、平房、草屋、山洞共5个级别。', '房产等级');
|
||||||
});
|
});
|
||||||
|
|
||||||
//初始化init
|
//初始化init(init方法必须调用,屏蔽后,无线下拉刷新无效果)
|
||||||
$.init();
|
$.init();
|
||||||
|
|
||||||
//定义个人手机号,贷款页面需要传参数
|
//定义个人手机号,贷款页面需要传参数
|
||||||
@@ -416,9 +416,11 @@ function openSettingPage() {
|
|||||||
clicked('../setting/setting.html',true,false,{},{},function(){})
|
clicked('../setting/setting.html',true,false,{},{},function(){})
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function () {
|
document.addEventListener('plusready', onPlusReady, false);
|
||||||
checkIsLogin();
|
|
||||||
});
|
function onPlusReady(){
|
||||||
|
checkIsLogin();
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
+110
-31
@@ -19,6 +19,8 @@
|
|||||||
.cardInfo:first-child{border-top:none;}
|
.cardInfo:first-child{border-top:none;}
|
||||||
.info-container input{float:none;width:100%;}
|
.info-container input{float:none;width:100%;}
|
||||||
.picker-item{padding:0 5rem;font-size:18px;}
|
.picker-item{padding:0 5rem;font-size:18px;}
|
||||||
|
.pull-to-refresh-layer .preloader{visibility: visible; }
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
@@ -42,7 +44,13 @@
|
|||||||
<input id="address" name = "address" type="hidden"/>
|
<input id="address" name = "address" type="hidden"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content infinite-scroll infinite-scroll-bottom pstion" data-distance="50">
|
<div class="content infinite-scroll infinite-scroll-bottom pstion pull-to-refresh-content" data-distance="50" data-ptr-distance="30">
|
||||||
|
<!-- 默认的下拉刷新层 -->
|
||||||
|
<div class="pull-to-refresh-layer dn">
|
||||||
|
<div class="preloader"></div>
|
||||||
|
<!--<div class="pull-to-refresh-arrow"></div>-->
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="card cardPrice" id="baseInfo" v-cloak>
|
<div class="card cardPrice" id="baseInfo" v-cloak>
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<span>{{topMonth}}月份均价</span>
|
<span>{{topMonth}}月份均价</span>
|
||||||
@@ -114,6 +122,8 @@
|
|||||||
<div id="newsList">
|
<div id="newsList">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="infinite-scroll-preloader">
|
<div class="infinite-scroll-preloader">
|
||||||
<div class="preloader"></div>
|
<div class="preloader"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1182,6 +1192,8 @@ $.config = {router: false}
|
|||||||
</script>
|
</script>
|
||||||
<script type='text/javascript' src='js/jquery.cookie.js?version=${version!}' charset='utf-8'></script>
|
<script type='text/javascript' src='js/jquery.cookie.js?version=${version!}' charset='utf-8'></script>
|
||||||
<script type="text/javascript" src="js/updateVersion/updateVersion.js" charset='utf-8'></script>
|
<script type="text/javascript" src="js/updateVersion/updateVersion.js" charset='utf-8'></script>
|
||||||
|
<script type="text/javascript" src="js/city.js" ></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function openHangQing(city){
|
function openHangQing(city){
|
||||||
clicked('views/house/cityDetail.html',true,false,{},{city:city},function(){
|
clicked('views/house/cityDetail.html',true,false,{},{city:city},function(){
|
||||||
@@ -1233,9 +1245,10 @@ function getPosition(){
|
|||||||
oriLng = p.coords.longitude;
|
oriLng = p.coords.longitude;
|
||||||
oriLat = p.coords.latitude;
|
oriLat = p.coords.latitude;
|
||||||
//alert("4"+oriLng);
|
//alert("4"+oriLng);
|
||||||
if(city.endWith("市")){
|
|
||||||
city = city.substring(0, city.length-1);
|
if(city){
|
||||||
}
|
city = formatBaiduCity(city);
|
||||||
|
}
|
||||||
if(region.endWith("区")){
|
if(region.endWith("区")){
|
||||||
region = region.substring(0, region.length-1);
|
region = region.substring(0, region.length-1);
|
||||||
}
|
}
|
||||||
@@ -1525,7 +1538,8 @@ function initNews(page){
|
|||||||
axios.get("/rest/news/list", {
|
axios.get("/rest/news/list", {
|
||||||
params: {
|
params: {
|
||||||
city: $("#input_city").text(),
|
city: $("#input_city").text(),
|
||||||
page:page
|
page:page,
|
||||||
|
deviceId:plus.device.uuid
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
@@ -1547,6 +1561,9 @@ function initNews(page){
|
|||||||
lastIndex = $('.cardInfo').length;
|
lastIndex = $('.cardInfo').length;
|
||||||
itemsPerLoad = response.data.data.list.length;
|
itemsPerLoad = response.data.data.list.length;
|
||||||
addItems(itemsPerLoad, lastIndex);
|
addItems(itemsPerLoad, lastIndex);
|
||||||
|
|
||||||
|
|
||||||
|
$(".pull-to-refresh-layer").addClass("dn");
|
||||||
/*if(dataObj.length>5){
|
/*if(dataObj.length>5){
|
||||||
$(".infinite-scroll-preloader").show();
|
$(".infinite-scroll-preloader").show();
|
||||||
}else{
|
}else{
|
||||||
@@ -1575,44 +1592,85 @@ $("#region").click(function(e){
|
|||||||
})*/
|
})*/
|
||||||
|
|
||||||
$("body").delegate(".vote01 .icon-light-grey", "click", function () {
|
$("body").delegate(".vote01 .icon-light-grey", "click", function () {
|
||||||
|
if($(".vote01 .icon-light-grey").attr("class").indexOf("red") > 0){
|
||||||
|
$.toast("已投票");
|
||||||
|
return;
|
||||||
|
}
|
||||||
var id = $(this).attr("data-val");
|
var id = $(this).attr("data-val");
|
||||||
var voteFavorCount = parseInt($("#voteFavorCount_"+id).text().split(" ")[0].replace("票",""))+1;
|
var voteFavorCount = parseInt($("#voteFavorCount_"+id).text().split(" ")[0].replace("票",""))+1;
|
||||||
var voteNoFavorCount = parseInt($("#voteNoFavorCount_"+id).text().split(" ")[0].replace("票",""));
|
var voteNoFavorCount = parseInt($("#voteNoFavorCount_"+id).text().split(" ")[0].replace("票",""));
|
||||||
var voteFavorCountRate = Math.round((voteFavorCount*100)/(voteFavorCount+voteNoFavorCount));
|
var voteFavorCountRate = Math.round((voteFavorCount*100)/(voteFavorCount+voteNoFavorCount));
|
||||||
var voteNoFavorCountRate = 100-voteFavorCountRate;
|
var voteNoFavorCountRate = 100-voteFavorCountRate;
|
||||||
$("#voteFavorCount_"+id).text(voteFavorCount+'票 '+voteFavorCountRate+'%');
|
axios.get("/rest/news/vote", {
|
||||||
$("#voteFavorCountRate_"+id).css("width",voteFavorCountRate+'%');
|
params: {
|
||||||
$("#voteNoFavorCount_"+id).text(voteNoFavorCount+'票 '+voteNoFavorCountRate+'%');
|
newsId: id,
|
||||||
$("#voteNoFavorCountRate_"+id).css("width",voteNoFavorCountRate+'%');
|
type:0,
|
||||||
doVote(id,0);
|
deviceId:plus.device.uuid
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(function (response) {
|
||||||
|
if(!response.data.status){
|
||||||
|
$.toast(response.data.message);
|
||||||
|
} else {
|
||||||
|
if (!response.data.data){
|
||||||
|
$(".vote01 .icon-light-grey").addClass("icon-light-red");
|
||||||
|
$(".vote02 .icon-light-grey").removeClass("icon-light-blue");
|
||||||
|
$("#voteFavorCount_"+id).text(voteFavorCount+'票 '+voteFavorCountRate+'%');
|
||||||
|
$("#voteFavorCountRate_"+id).css("width",voteFavorCountRate+'%');
|
||||||
|
$("#voteNoFavorCount_"+id).text(voteNoFavorCount+'票 '+voteNoFavorCountRate+'%');
|
||||||
|
$("#voteNoFavorCountRate_"+id).css("width",voteNoFavorCountRate+'%');
|
||||||
|
} else {
|
||||||
|
$.toast("已投票");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
console.log(error);
|
||||||
|
$.toast("投票失败,请重试");
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("body").delegate(".vote02 .icon-light-grey", "click", function () {
|
$("body").delegate(".vote02 .icon-light-grey", "click", function () {
|
||||||
|
if($(".vote01 .icon-light-grey").attr("class").indexOf("blue") > 0){
|
||||||
|
$.toast("已投票");
|
||||||
|
return;
|
||||||
|
}
|
||||||
var id = $(this).attr("data-val");
|
var id = $(this).attr("data-val");
|
||||||
var voteFavorCount = parseInt($("#voteFavorCount_"+id).text().split(" ")[0].replace("票",""));
|
var voteFavorCount = parseInt($("#voteFavorCount_"+id).text().split(" ")[0].replace("票",""));
|
||||||
var voteNoFavorCount = parseInt($("#voteNoFavorCount_"+id).text().split(" ")[0].replace("票",""))+1;
|
var voteNoFavorCount = parseInt($("#voteNoFavorCount_"+id).text().split(" ")[0].replace("票",""))+1;
|
||||||
var voteFavorCountRate = Math.round((voteFavorCount*100)/(voteFavorCount+voteNoFavorCount));
|
var voteFavorCountRate = Math.round((voteFavorCount*100)/(voteFavorCount+voteNoFavorCount));
|
||||||
var voteNoFavorCountRate = 100-voteFavorCountRate;
|
var voteNoFavorCountRate = 100-voteFavorCountRate;
|
||||||
$("#voteFavorCount_"+id).text(voteFavorCount+'票 '+voteFavorCountRate+'%');
|
|
||||||
$("#voteFavorCountRate_"+id).css("width",voteFavorCountRate+'%');
|
|
||||||
$("#voteNoFavorCount_"+id).text(voteNoFavorCount+'票 '+voteNoFavorCountRate+'%');
|
|
||||||
$("#voteNoFavorCountRate_"+id).css("width",voteNoFavorCountRate+'%');
|
|
||||||
doVote(id,1);
|
|
||||||
});
|
|
||||||
|
|
||||||
function doVote(id,flag){
|
|
||||||
axios.get("/rest/news/vote", {
|
axios.get("/rest/news/vote", {
|
||||||
params: {
|
params: {
|
||||||
newsId: id,
|
newsId: id,
|
||||||
type:flag
|
type:1,
|
||||||
|
deviceId:plus.device.uuid
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
|
if(!response.data.status){
|
||||||
|
$.toast(response.data.message);
|
||||||
|
} else {
|
||||||
|
if (!response.data.data){
|
||||||
|
$("#voteFavorCount_"+id).text(voteFavorCount+'票 '+voteFavorCountRate+'%');
|
||||||
|
$("#voteFavorCountRate_"+id).css("width",voteFavorCountRate+'%');
|
||||||
|
$("#voteNoFavorCount_"+id).text(voteNoFavorCount+'票 '+voteNoFavorCountRate+'%');
|
||||||
|
$("#voteNoFavorCountRate_"+id).css("width",voteNoFavorCountRate+'%');
|
||||||
|
$(".vote01 .icon-light-grey").removeClass("icon-light-red");
|
||||||
|
$(".vote02 .icon-light-grey").addClass("icon-light-blue");
|
||||||
|
} else {
|
||||||
|
$.toast("已投票");
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
$.toast("投票失败,请重试");
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
function changeRegion(){
|
function changeRegion(){
|
||||||
axios.get("/rest/index/home", {
|
axios.get("/rest/index/home", {
|
||||||
@@ -1847,11 +1905,20 @@ function addItems(number, lastIndex) {
|
|||||||
voteNoFavorCountRate = 100-voteFavorCountRate;
|
voteNoFavorCountRate = 100-voteFavorCountRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var colorClass = "icon-light-grey";
|
||||||
|
var colorClass2 = "icon-light-grey";
|
||||||
|
if (dataObj[i].vote) {
|
||||||
|
if (dataObj[i].voteType == 0) {
|
||||||
|
colorClass = "icon-light-grey icon-light-red";
|
||||||
|
} else {
|
||||||
|
colorClass2 = "icon-light-grey icon-light-blue";
|
||||||
|
}
|
||||||
|
}
|
||||||
html += '<div class="card cardInfo cardInfo03"><div class="card-header">'+dataObj[i].title+
|
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">'+
|
'</div><div class="card-content"><div class="card-content-inner row"><div class="vote01 col-50">'+
|
||||||
'<i class="icon icon-light-grey" data-val="'+dataObj[i].id+'"></i><span>'+dataObj[i].voteFavorText+'</span>'+
|
'<i class="icon '+colorClass+'" 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>'+
|
'<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>'+
|
'<div class="vote02 col-50"><i class="icon '+colorClass2+'" 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>';
|
'<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>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1998,6 +2065,23 @@ $(document).on('infinite', '.infinite-scroll-bottom',function() {
|
|||||||
}, 500);
|
}, 500);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 添加'refresh'监听器
|
||||||
|
$(document).on('refresh', '.pull-to-refresh-content',function(e) {
|
||||||
|
if($("#input_city").text()=="上海"){
|
||||||
|
$(".pull-to-refresh-layer").removeClass("dn");
|
||||||
|
page = 1;
|
||||||
|
dataObj = [];
|
||||||
|
$("#newsList").html("");
|
||||||
|
initNews(page);
|
||||||
|
// 加载完毕需要重置
|
||||||
|
$.pullToRefreshDone('.pull-to-refresh-content');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function regionChange(region){
|
function regionChange(region){
|
||||||
var text = region;
|
var text = region;
|
||||||
var length = region.length;
|
var length = region.length;
|
||||||
@@ -2635,15 +2719,7 @@ function openDistWindow(city, region, name){
|
|||||||
}
|
}
|
||||||
});*/
|
});*/
|
||||||
|
|
||||||
/* 投票 */
|
|
||||||
$("body").delegate(".vote01 .icon-light-grey", "click", function () {
|
|
||||||
$(".vote01 .icon-light-grey").addClass("icon-light-red");
|
|
||||||
$(".vote02 .icon-light-grey").removeClass("icon-light-blue");
|
|
||||||
});
|
|
||||||
$("body").delegate(".vote02 .icon-light-grey", "click", function () {
|
|
||||||
$(".vote01 .icon-light-grey").removeClass("icon-light-red");
|
|
||||||
$(".vote02 .icon-light-grey").addClass("icon-light-blue");
|
|
||||||
});
|
|
||||||
|
|
||||||
$("body").delegate("#hotList ul li", "click", function () {
|
$("body").delegate("#hotList ul li", "click", function () {
|
||||||
var select_city = $(this).find("a").attr("data-city");
|
var select_city = $(this).find("a").attr("data-city");
|
||||||
@@ -2661,6 +2737,9 @@ $("body").delegate("#hotList ul li", "click", function () {
|
|||||||
//clicked(url, true);
|
//clicked(url, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user