This commit is contained in:
2018-04-14 14:26:24 +08:00
parent a15bd605d2
commit 3607037970
7 changed files with 1714 additions and 124 deletions
+26 -3
View File
@@ -1,9 +1,9 @@
var ret = []
function loadMyCollectCity(){
function loadCurCity(city){
axios.get("/rest/quotations/userCollectCitys",{}).then(function (response) {
var curDatas = response.data.data
if(curDatas){
if(curDatas && curDatas.length>0){
if(IsInArray(curDatas, city)){
cityInfoVue.$data.collecd = true;
}else{
@@ -183,6 +183,7 @@ function loadUpOrDownChart(downRate, upRate){
dataUp = [cityObj1, cityObj2]
addUpChart(dataUp)
$("#up_chart").parent().parent().show();
}else{
$("#up_chart").parent().parent().hide()
}
@@ -198,6 +199,7 @@ function loadUpOrDownChart(downRate, upRate){
dataDown = [cityObj3, cityObj4]
addDownChart(dataDown)
$("#down_chart").parent().parent().show();
}else{
$("#down_chart").parent().parent().hide()
}
@@ -464,9 +466,29 @@ function docollectCity(city){
var msg = response.data.message;
if(msg){
if(msg == "取消关注成功"){
cityInfoVue.$data.collecd = false;
try{
cityInfoVue.$data.collecd = false;
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;
if(da.length>0){
$("a[href='#tabQuotation0']").click();
}
}
}
}catch(e){
}
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
}else if(msg == "关注成功"){
cityInfoVue.$data.collecd = true;
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
}else{
$.toast(msg);
}
@@ -478,3 +500,4 @@ function docollectCity(city){
});
}