update
This commit is contained in:
@@ -1,4 +1,62 @@
|
|||||||
var ret = []
|
var ret = []
|
||||||
|
var myFocusDatas = {myFocusList: []};
|
||||||
|
var cityIncreaseRankingData = {cityIncreaseRankingList:[],test:"ttt"};
|
||||||
|
var cityPotentialRankingData = {cityPotentialRankingList:[]};
|
||||||
|
|
||||||
|
function reloadMyFocus(){
|
||||||
|
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
||||||
|
$("#myFocusFirstPage").hide()
|
||||||
|
$("#myFocus").hide();
|
||||||
|
}else{
|
||||||
|
axios.get("/rest/quotations/userCollectCityInfo").then(function(response){
|
||||||
|
if(response.data.data.length==0){
|
||||||
|
$("#myFocusFirstPage").hide();
|
||||||
|
$("#myFocus").hide();
|
||||||
|
}else{
|
||||||
|
myFocusDatas.myFocusList = response.data.data;
|
||||||
|
$("#myFocus").show()
|
||||||
|
}
|
||||||
|
}).catch(function(error){
|
||||||
|
console.log(error)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function reloadCityIncreaseRanking(){
|
||||||
|
axios.get("/rest/quotations/markUpTopInfos").then(function(response){
|
||||||
|
cityIncreaseRankingData.cityIncreaseRankingList = response.data.data;
|
||||||
|
}).catch(function(error){
|
||||||
|
console.log(error)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function reloadCityPotentialRanking(){
|
||||||
|
axios.get("/rest/quotations/potentialUpTopInfos").then(function(response){
|
||||||
|
list = response.data.data;
|
||||||
|
$(list).each(function(i){
|
||||||
|
var index = this.index;
|
||||||
|
var totalHalfStar = Math.round(Math.round(index/5)/2) //总半星
|
||||||
|
var starNum = Math.floor(totalHalfStar/2) //全星
|
||||||
|
var halfStarNum = totalHalfStar%2 //半星
|
||||||
|
var noneStarNum = 5-starNum-halfStarNum //空星
|
||||||
|
this.starNum = starNum;
|
||||||
|
this.halfStarNum = halfStarNum;
|
||||||
|
this.noneStarNum = noneStarNum;
|
||||||
|
})
|
||||||
|
cityPotentialRankingData.cityPotentialRankingList = response.data.data;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}).catch(function(error){
|
||||||
|
console.log(error)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function IsInArray(arr, val){
|
||||||
|
var testStr=','+arr.join(",")+",";
|
||||||
|
return testStr.indexOf(","+val+",")!=-1;
|
||||||
|
}
|
||||||
|
|
||||||
function loadMyCollectCity(){
|
function loadMyCollectCity(){
|
||||||
plus.nativeUI.showWaiting();
|
plus.nativeUI.showWaiting();
|
||||||
@@ -497,7 +555,8 @@ function collectCity(city, type){
|
|||||||
|
|
||||||
$.confirm(title, function () {
|
$.confirm(title, function () {
|
||||||
docollectCity(city, type)
|
docollectCity(city, type)
|
||||||
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
|
// plus.webview.getWebviewById('views/house/houseDetail.html').reload();
|
||||||
|
|
||||||
},function(){
|
},function(){
|
||||||
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
|
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
|
||||||
//loadMyCollectCity();
|
//loadMyCollectCity();
|
||||||
@@ -518,7 +577,6 @@ function docollectCity(city, type){
|
|||||||
}).then(function (response) {
|
}).then(function (response) {
|
||||||
var msg = response.data.message;
|
var msg = response.data.message;
|
||||||
if(msg){
|
if(msg){
|
||||||
|
|
||||||
if(msg == "取消关注成功"){
|
if(msg == "取消关注成功"){
|
||||||
try{
|
try{
|
||||||
cityInfoVue.$data.collecd = false;
|
cityInfoVue.$data.collecd = false;
|
||||||
@@ -540,16 +598,16 @@ function docollectCity(city, type){
|
|||||||
|
|
||||||
//loadMyCollectCity();
|
//loadMyCollectCity();
|
||||||
$("a[href='#tabQuotation1']").click();
|
$("a[href='#tabQuotation1']").click();
|
||||||
//plus.webview.getWebviewById('views/house/houseDetail.html').reload();
|
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
|
||||||
reloadMyFocus();
|
//reloadMyFocus();
|
||||||
reloadCityPotentialRanking()
|
//reloadCityPotentialRanking()
|
||||||
reloadCityIncreaseRanking()
|
//reloadCityIncreaseRanking()
|
||||||
}else if(msg == "关注成功"){
|
}else if(msg == "关注成功"){
|
||||||
cityInfoVue.$data.collecd = true;
|
cityInfoVue.$data.collecd = true;
|
||||||
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
|
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
|
||||||
reloadMyFocus();
|
//reloadMyFocus();
|
||||||
reloadCityPotentialRanking()
|
//reloadCityPotentialRanking()
|
||||||
reloadCityIncreaseRanking()
|
//reloadCityIncreaseRanking()
|
||||||
}else{
|
}else{
|
||||||
$.toast(msg);
|
$.toast(msg);
|
||||||
}
|
}
|
||||||
@@ -562,3 +620,5 @@ function docollectCity(city, type){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
var cityIncreaseRankingData = {cityIncreaseRankingList:[],test:"ttt"};
|
|
||||||
|
|
||||||
Vue.component('city_increase_ranking',{
|
Vue.component('city_increase_ranking',{
|
||||||
template:'<div class="list-block media-list cityList">'+
|
template:'<div class="list-block media-list cityList">'+
|
||||||
@@ -204,10 +204,3 @@ Vue.component('city_increase_ranking',{
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
function reloadCityIncreaseRanking(){
|
|
||||||
axios.get("/rest/quotations/markUpTopInfos").then(function(response){
|
|
||||||
cityIncreaseRankingData.cityIncreaseRankingList = response.data.data;
|
|
||||||
}).catch(function(error){
|
|
||||||
console.log(error)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
var cityPotentialRankingData = {cityPotentialRankingList:[]};
|
|
||||||
|
|
||||||
Vue.component('city_potential_ranking',{
|
Vue.component('city_potential_ranking',{
|
||||||
template:'<div class="list-block media-list cityList">'+
|
template:'<div class="list-block media-list cityList">'+
|
||||||
@@ -203,25 +203,3 @@ Vue.component('city_potential_ranking',{
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
function reloadCityPotentialRanking(){
|
|
||||||
axios.get("/rest/quotations/potentialUpTopInfos").then(function(response){
|
|
||||||
list = response.data.data;
|
|
||||||
$(list).each(function(i){
|
|
||||||
var index = this.index;
|
|
||||||
var totalHalfStar = Math.round(Math.round(index/5)/2) //总半星
|
|
||||||
var starNum = Math.floor(totalHalfStar/2) //全星
|
|
||||||
var halfStarNum = totalHalfStar%2 //半星
|
|
||||||
var noneStarNum = 5-starNum-halfStarNum //空星
|
|
||||||
this.starNum = starNum;
|
|
||||||
this.halfStarNum = halfStarNum;
|
|
||||||
this.noneStarNum = noneStarNum;
|
|
||||||
})
|
|
||||||
cityPotentialRankingData.cityPotentialRankingList = response.data.data;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}).catch(function(error){
|
|
||||||
console.log(error)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -65,22 +65,3 @@ Vue.component('my_focus',{
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
function reloadMyFocus(){
|
|
||||||
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
|
||||||
$("#myFocusFirstPage").hide()
|
|
||||||
$("#myFocus").hide();
|
|
||||||
}else{
|
|
||||||
axios.get("/rest/quotations/userCollectCityInfo").then(function(response){
|
|
||||||
if(response.data.data.length==0){
|
|
||||||
$("#myFocusFirstPage").hide();
|
|
||||||
$("#myFocus").hide();
|
|
||||||
}else{
|
|
||||||
myFocusDatas.myFocusList = response.data.data;
|
|
||||||
$("#myFocus").show()
|
|
||||||
}
|
|
||||||
}).catch(function(error){
|
|
||||||
console.log(error)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@@ -153,6 +153,7 @@ var year = date.getFullYear()+'年';
|
|||||||
var month = date.getMonth()+1+'月';
|
var month = date.getMonth()+1+'月';
|
||||||
var city = "普洱"
|
var city = "普洱"
|
||||||
var cityInfoVue;
|
var cityInfoVue;
|
||||||
|
|
||||||
|
|
||||||
document.addEventListener('plusready', onPlusReady, false);
|
document.addEventListener('plusready', onPlusReady, false);
|
||||||
function onPlusReady() {
|
function onPlusReady() {
|
||||||
|
|||||||
@@ -1397,7 +1397,6 @@ $.config = {router: false}
|
|||||||
|
|
||||||
//加载首页全国数据
|
//加载首页全国数据
|
||||||
function loadAllCityData(){
|
function loadAllCityData(){
|
||||||
alert("全国");
|
|
||||||
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;
|
||||||
@@ -1416,7 +1415,6 @@ function loadAllCityData(){
|
|||||||
allCityVue.avgUownRate = response.data.data.avgUownRate;
|
allCityVue.avgUownRate = response.data.data.avgUownRate;
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
alert("error:"+error)
|
|
||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1609,10 +1607,6 @@ function hotCity(city){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function IsInArray(arr, val){
|
|
||||||
var testStr=','+arr.join(",")+",";
|
|
||||||
return testStr.indexOf(","+val+",")!=-1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user