update
This commit is contained in:
@@ -15,11 +15,12 @@ function loadMyCollectCity(){
|
|||||||
if(positionCity){
|
if(positionCity){
|
||||||
cityDetaiVue.$data.citys.push(positionCity);
|
cityDetaiVue.$data.citys.push(positionCity);
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#cityInfo").hide()
|
|
||||||
}
|
}
|
||||||
|
$("#cityInfo").hide()
|
||||||
plus.nativeUI.closeWaiting();
|
plus.nativeUI.closeWaiting();
|
||||||
|
|
||||||
}).catch(function (error) {
|
}).catch(function (error) {
|
||||||
|
plus.nativeUI.closeWaiting();
|
||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -36,8 +37,10 @@ function loadCurCity(city){
|
|||||||
cityInfoVue.$data.collecd = false;
|
cityInfoVue.$data.collecd = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
plus.nativeUI.closeWaiting();
|
plus.nativeUI.closeWaiting();
|
||||||
}).catch(function (error) {
|
}).catch(function (error) {
|
||||||
|
plus.nativeUI.closeWaiting();
|
||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -62,6 +65,7 @@ function loadCityPriceInfo(city){
|
|||||||
cityObj.rangeLevel = data1.rangeLevel
|
cityObj.rangeLevel = data1.rangeLevel
|
||||||
cityObj.time = year + month
|
cityObj.time = year + month
|
||||||
cityInfoVue.$data.myCityMap = cityObj;
|
cityInfoVue.$data.myCityMap = cityObj;
|
||||||
|
$("#priceDiv").removeClass("dn");
|
||||||
}
|
}
|
||||||
}).catch(function (error) {
|
}).catch(function (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
|||||||
@@ -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" v-bind:class="{dn:ci.follow}" v-on:click="follow(ci.city,$event, 0)">关注</i>'+
|
'<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" v-bind:class="{dn:!ci.follow}" v-on:click="abolish(ci.city,$event, 1)">取消</i>'+
|
'<i class="button collection collection02 confirm-ok" v-bind:class="{dn:!ci.follow}" v-on:click="abolish(ci.city,$event, 1)">取消</i>'+
|
||||||
'</div>'+
|
'</div>'+
|
||||||
'</div>'+
|
'</div>'+
|
||||||
'</div>'+
|
'</div>'+
|
||||||
@@ -48,53 +48,39 @@ Vue.component('city_increase_ranking',{
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
follow:function(city,event, type){
|
follow:function(city,event, type){
|
||||||
|
|
||||||
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
||||||
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{
|
||||||
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");
|
|
||||||
reloadMyFocus()
|
|
||||||
reloadCityPotentialRanking()
|
|
||||||
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
|
|
||||||
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
|
|
||||||
plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
|
||||||
}
|
|
||||||
|
|
||||||
//cityDetaiVue.$data.citys.push(city);
|
|
||||||
}).catch(function(error){
|
|
||||||
console.log(error)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}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");
|
||||||
reloadCityPotentialRanking()
|
reloadMyFocus()
|
||||||
if(type == 0){
|
reloadCityPotentialRanking()
|
||||||
var curDatas = cityDetaiVue.$data.citys
|
if(type == 0){
|
||||||
if(curDatas && curDatas.length>0){
|
var curDatas = cityDetaiVue.$data.citys
|
||||||
if(!IsInArray(curDatas, city)){
|
if(curDatas && curDatas.length>0){
|
||||||
cityDetaiVue.$data.citys.push(city);
|
if(!IsInArray(curDatas, city)){
|
||||||
|
cityDetaiVue.$data.citys.push(city);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}).catch(function(error){
|
}).catch(function(error){
|
||||||
console.log(error)
|
console.log(error)
|
||||||
})
|
})
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -108,23 +94,26 @@ Vue.component('city_increase_ranking',{
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
|
|
||||||
$(event.target).parent().children().removeClass("dn");
|
$.confirm("您确定要取消关注?", function () {
|
||||||
$(event.target).addClass("dn");
|
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
|
||||||
reloadMyFocus();
|
$(event.target).parent().children().removeClass("dn");
|
||||||
reloadCityPotentialRanking()
|
$(event.target).addClass("dn");
|
||||||
//plus.webview.getWebviewById('views/user/userInfo.html').reload()
|
reloadMyFocus();
|
||||||
var da = cityDetaiVue.$data.citys
|
reloadCityPotentialRanking()
|
||||||
if(da && da.length>0){
|
//plus.webview.getWebviewById('views/user/userInfo.html').reload()
|
||||||
var index = da.indexOf(city)
|
var da = cityDetaiVue.$data.citys
|
||||||
if(index>0){
|
if(da && da.length>0){
|
||||||
da.splice(index, 1)
|
var index = da.indexOf(city)
|
||||||
cityDetaiVue.$data.citys = da;
|
if(index>0){
|
||||||
}
|
da.splice(index, 1)
|
||||||
}
|
cityDetaiVue.$data.citys = da;
|
||||||
}).catch(function(error){
|
}
|
||||||
console.log(error)
|
}
|
||||||
})
|
}).catch(function(error){
|
||||||
|
console.log(error)
|
||||||
|
})
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,24 +71,26 @@ Vue.component('city_potential_ranking',{
|
|||||||
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
|
$.confirm('您确定要关注'+city+"?", function () {
|
||||||
|
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
|
||||||
|
|
||||||
var msg = response.data.message;
|
var msg = response.data.message;
|
||||||
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");
|
||||||
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();
|
||||||
reloadMyFocus()
|
reloadMyFocus()
|
||||||
reloadCityIncreaseRanking()
|
reloadCityIncreaseRanking()
|
||||||
//cityDetaiVue.$data.citys.push(city);
|
//cityDetaiVue.$data.citys.push(city);
|
||||||
}
|
}
|
||||||
}).catch(function(error){
|
}).catch(function(error){
|
||||||
console.log(error)
|
console.log(error)
|
||||||
})
|
})
|
||||||
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="content" id="cityInfo" v-cloak>
|
<div class="content" id="cityInfo" v-cloak>
|
||||||
<div class="card cardPrice cardPrice01 cardCity01" v-bind:hrefid="myCityMap.hrefId">
|
<div class="card cardPrice cardPrice01 cardCity01 dn" id="priceDiv" v-bind:hrefid="myCityMap.hrefId">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<label>{{myCityMap.city}}</label>
|
<label>{{myCityMap.city}}</label>
|
||||||
<a v-if="collecd" class="button theme collection collection02 " @click="collectCity(myCityMap.city, 1)">取消关注</a>
|
<a v-if="collecd" class="button theme collection collection02 " @click="collectCity(myCityMap.city, 1)">取消关注</a>
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<span>当前参考均价</span>
|
<span>当前参考均价</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-content">
|
<div class="card-content" >
|
||||||
<div class="card-content-inner" v-if="myCityMap.cityTopMonthAvgPrice">{{myCityMap.cityTopMonthAvgPrice}}<span>元/㎡</span></div>
|
<div class="card-content-inner" v-if="myCityMap.cityTopMonthAvgPrice">{{myCityMap.cityTopMonthAvgPrice}}<span>元/㎡</span></div>
|
||||||
<div class="card-content-inner" v-else>暂无</div>
|
<div class="card-content-inner" v-else>暂无</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -151,8 +151,14 @@ $.config = {router: false}
|
|||||||
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+'月';
|
||||||
var city = "神农架"
|
var city = "普洱"
|
||||||
var cityInfoVue = new Vue({
|
var cityInfoVue;
|
||||||
|
|
||||||
|
document.addEventListener('plusready', onPlusReady, false);
|
||||||
|
function onPlusReady() {
|
||||||
|
var self = plus.webview.currentWebview();
|
||||||
|
city = self.city
|
||||||
|
cityInfoVue = new Vue({
|
||||||
el: '#cityInfo',
|
el: '#cityInfo',
|
||||||
data: {
|
data: {
|
||||||
city:"",
|
city:"",
|
||||||
@@ -162,12 +168,7 @@ var cityInfoVue = new Vue({
|
|||||||
myCityMap : []
|
myCityMap : []
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
cityInfoVue.$data.city = city;
|
||||||
document.addEventListener('plusready', onPlusReady, false);
|
|
||||||
function onPlusReady() {
|
|
||||||
var self = plus.webview.currentWebview();
|
|
||||||
var city = self.city
|
|
||||||
cityInfoVue.$data.city = city;
|
|
||||||
loadCurCity(city);
|
loadCurCity(city);
|
||||||
loadCityPriceInfo(city)
|
loadCityPriceInfo(city)
|
||||||
loadUpOrDown(city);
|
loadUpOrDown(city);
|
||||||
@@ -176,11 +177,6 @@ function onPlusReady() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//loadCurCity(city);
|
|
||||||
// loadCityPriceInfo(city)
|
|
||||||
// loadUpOrDown(city);
|
|
||||||
// loadHotDistrict(city)
|
|
||||||
// loadCityPricesAndCounts(city)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user