diff --git a/fangija-zsyf/error.html b/fangija-zsyf/error.html index 7d6f065..99284f4 100644 --- a/fangija-zsyf/error.html +++ b/fangija-zsyf/error.html @@ -11,33 +11,13 @@ - + @@ -46,9 +26,10 @@ header {
-
-
-

+
+
diff --git a/fangija-zsyf/js/axiosPlugin.js b/fangija-zsyf/js/axiosPlugin.js index 28ffc10..114b348 100644 --- a/fangija-zsyf/js/axiosPlugin.js +++ b/fangija-zsyf/js/axiosPlugin.js @@ -21,6 +21,8 @@ axios.interceptors.response.use(function (response) { window.location.reload(); }) }else{ + $(".loadingBg").hide(); + plus.nativeUI.closeWaiting(); plus.webview.getWebviewById("error.html").show(); } } diff --git a/fangija-zsyf/js/city-app.js b/fangija-zsyf/js/city-app.js index b0ff6e9..1061e47 100644 --- a/fangija-zsyf/js/city-app.js +++ b/fangija-zsyf/js/city-app.js @@ -21,7 +21,7 @@ $(document).on("click",".open-about01", function () { if(collects){ if(collects.indexOf(text)>-1){ $(this).addClass("collectionCity"); - $(this).find("i").addClass("icon-collection03"); + //$(this).find("i").addClass("icon-collection03"); } } diff --git a/fangija-zsyf/js/city.js b/fangija-zsyf/js/city.js new file mode 100644 index 0000000..dcfe49a --- /dev/null +++ b/fangija-zsyf/js/city.js @@ -0,0 +1,72 @@ +var renameCitys = [{"baiduCity": "阿克苏地区", "city": "阿克苏"}, + {"baiduCity": "阿勒泰地区", "city": "阿勒泰"}, + {"baiduCity": "阿里地区", "city": "阿里"}, + {"baiduCity": "博尔塔拉蒙古自治州", "city": "博尔塔拉"}, + {"baiduCity": "昌都地区", "city": "昌都"}, + {"baiduCity": "昌吉回族自治州", "city": "昌吉"}, + {"baiduCity": "白沙黎族自治县", "city": "白沙"}, + {"baiduCity": "保亭黎族苗族自治县", "city": "保亭"}, + {"baiduCity": "巴音郭楞蒙古自治州", "city": "巴音郭楞"}, + {"baiduCity": "毕节地区", "city": "毕节"}, + {"baiduCity": "昌都地区", "city": "昌都"}, + {"baiduCity": "昌江黎族自治县", "city": "昌江"}, + {"baiduCity": "楚雄彝族自治州", "city": "楚雄"}, + {"baiduCity": "澄迈县", "city": "澄迈"}, + {"baiduCity": "定安县", "city": "定安"}, + {"baiduCity": "大兴安岭地区", "city": "大兴安岭"}, + {"baiduCity": "迪庆藏族自治州", "city": "迪庆州"}, + {"baiduCity": "德宏傣族景颇族自治州", "city": "德宏州"}, + {"baiduCity": "恩施土家族苗族自治州", "city": "恩施"}, + {"baiduCity": "甘南藏族自治州", "city": "甘南"}, + {"baiduCity": "甘孜藏族自治州", "city": "甘孜州"}, + {"baiduCity": "果洛藏族自治州", "city": "果洛州"}, + {"baiduCity": "哈密地区", "city": "哈密"}, + {"baiduCity": "海北藏族自治州", "city": "海北州"}, + {"baiduCity": "海南藏族自治州", "city": "海南州"}, + {"baiduCity": "海西蒙古族藏族自治州", "city": "海西州"}, + {"baiduCity": "海东地区", "city": "海东"}, + {"baiduCity": "和田地区", "city": "和田"}, + {"baiduCity": "红河哈尼族彝族自治州", "city": "红河"}, + {"baiduCity": "黄南藏族自治州", "city": "黄南州"}, + {"baiduCity": "喀什地区", "city": "喀什"}, + {"baiduCity": "克孜勒苏柯尔克孜自治州", "city": "克孜勒苏"}, + {"baiduCity": "乐东黎族自治县", "city": "乐东"}, + {"baiduCity": "凉山彝族自治州", "city": "凉山州"}, + {"baiduCity": "临高县", "city": "临高"}, + {"baiduCity": "临夏回族自治州", "city": "临夏"}, + {"baiduCity": "陵水黎族自治县", "city": "陵水"}, + {"baiduCity": "林芝地区", "city": "林芝"}, + {"baiduCity": "那曲地区", "city": "那曲"}, + {"baiduCity": "怒江傈僳族自治州", "city": "怒江州"}, + {"baiduCity": "琼中黎族苗族自治县", "city": "琼中"}, + {"baiduCity": "黔东南苗族侗族自治州", "city": "黔东南"}, + {"baiduCity": "黔南布依族苗族自治州", "city": "黔南"}, + {"baiduCity": "黔西南布依族苗族自治州", "city": "黔西南"}, + {"baiduCity": "日喀则地区", "city": "日喀则"}, + {"baiduCity": "山南地区", "city": "山南"}, + {"baiduCity": "神农架林区", "city": "神农架"}, + {"baiduCity": "塔城地区", "city": "塔城"}, + {"baiduCity": "铜仁地区", "city": "铜仁"}, + {"baiduCity": "吐鲁番地区", "city": "吐鲁番"}, + {"baiduCity": "屯昌县", "city": "屯昌"}, + {"baiduCity": "文山壮族苗族自治州", "city": "文山州"}, + {"baiduCity": "西双版纳傣族自治州", "city": "西双版纳州"}, + {"baiduCity": "湘西土家族苗族自治州", "city": "湘西"}, + {"baiduCity": "延边朝鲜族自治州", "city": "延边"}, + {"baiduCity": "伊犁哈萨克自治州", "city": "伊犁"}, + {"baiduCity": "玉树藏族自治州", "city": "玉树州"}]; +/** + * 把百度的城市格式化成房价网的城市 + * @param baiduCity + * @returns {string} + */ +function formatBaiduCity(baiduCity) { + var newCity = ""; + for (var i = 0; i < renameCitys.length; i++) { + if (renameCitys[i].baiduCity == baiduCity) { + newCity = renameCitys[i].city; + break; + } + } + return newCity; +} diff --git a/fangija-zsyf/js/district/districtDetail.js b/fangija-zsyf/js/district/districtDetail.js index d625c0a..70c6ffc 100644 --- a/fangija-zsyf/js/district/districtDetail.js +++ b/fangija-zsyf/js/district/districtDetail.js @@ -334,194 +334,199 @@ function showTrends(v){ var option01 = { - animation: false, - color: colorList, - title: { - text: null, - left: 'center' - }, - legend: { - show: false, - top: 30, - data: ['均价'] - }, - tooltip: { - triggerOn: 'none', - transitionDuration: 0, - confine: true, - bordeRadius: 4, - borderWidth: 1, - borderColor: '#333', - backgroundColor: 'rgba(255,255,255,0.9)', - textStyle: { - fontSize: 12, - color: '#333' - }, - formatter: function (params) { - var res = params[0].seriesName + ' ' + params[0].name; - res += '
月初 : ' + params[0].value[1]; - res += '
月末 : ' + params[0].value[2]; - res += '
最低 : ' + params[0].value[3]; - res += '
最高 : ' + params[0].value[4]; - return res; - }, - position: function (pos, params, el, elRect, size) { - var obj = { - top: 60 - }; - obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 5; - return obj; + animation: false, + color: colorList, + title: { + text: null, + left: 'center' + }, + legend: { + show: false, + top: 30, + data: ['均价'] + }, + tooltip: { + triggerOn: 'none', + transitionDuration: 0, + confine: true, + bordeRadius: 4, + borderWidth: 1, + borderColor: '#333', + backgroundColor: 'rgba(255,255,255,0.9)', + textStyle: { + fontSize: 12, + color: '#333' + }, + formatter: function (params) { + var res = params[0].seriesName + ' ' + params[0].name; + res += '
月初 : ' + params[0].value[1]; + res += '
月末 : ' + params[0].value[2]; + res += '
最低 : ' + params[0].value[3]; + res += '
最高 : ' + params[0].value[4]; + return res; + }, + position: function (pos, params, el, elRect, size) { + var obj = { + top: 60 + }; + obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 5; + return obj; + } + }, + axisPointer: { + link: [{ + xAxisIndex: [0, 1] + }] + }, + dataZoom: [{ + type: 'slider', + xAxisIndex: [0, 1], + realtime: false, + start: 1, + end: 99, + top: 5, + height: 20, + handleIcon: 'M10.7,11.9H9.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z', + handleSize: '120%' + }, { + type: 'inside', + xAxisIndex: [0, 1], + start: 40, + end: 70, + top: 30, + height: 20 + }], + xAxis: [{ + type: 'category', + data: dates, + boundaryGap : false, + axisLine: { lineStyle: { color: '#666' } }, + axisLabel: { + formatter: function (value) { + return echarts.format.formatTime('MM-dd', value); } }, + min: 'dataMin', + max: 'dataMax', axisPointer: { - link: [{ - xAxisIndex: [0, 1] - }] - }, - dataZoom: [{ - type: 'slider', - xAxisIndex: [0, 1], - realtime: false, - start: 5, - end: 95, - top: 65, - height: 20, - handleIcon: 'M10.7,11.9H9.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z', - handleSize: '120%' - }, { - type: 'inside', - xAxisIndex: [0, 1], - start: 40, - end: 70, - top: 30, - height: 20 - }], - xAxis: [{ - type: 'category', - data: dates, - boundaryGap : false, - axisLine: { lineStyle: { color: '#666' } }, + show: true + } + }, { + type: 'category', + gridIndex: 1, + data: dates, + scale: false, + boundaryGap : false, + splitLine: {show: false}, + axisLabel: {show: false}, + axisTick: {show: false}, + axisLine: {lineStyle: { color: '#fff' } }, + splitNumber: 20, + min: 'dataMin', + max: 'dataMax', + axisPointer: { + type: 'line', + lineStyle: { + color: '#fff', + width: 1, + type: 'solid' + }, + label: {show: false}, + triggerTooltip: true, + handle: { + show: true, + margin: -70, + color: '#F18D00' + } + } + }], + yAxis: [{ + name: '均价(元/㎡)', + nameRotate: 90, + nameLocation: 'center', + nameGap: 5, + position: 'right', + nameTextStyle: { + color: '#999' + }, + scale: true, + splitNumber: 2, + axisLine: { lineStyle: { color: '#999' } }, + splitLine: { show: true }, + axisTick: { show: false }, axisLabel: { - formatter: function (value) { - return echarts.format.formatTime('MM-dd', value); - } - }, - min: 'dataMin', - max: 'dataMax', - axisPointer: { - show: true + inside: true, + formatter: '{value}\n' } }, { - type: 'category', + name: '', + nameRotate: 90, + nameLocation: 'center', + nameGap: 5, + position: 'right', + nameTextStyle: { + color: '#999' + }, + scale: true, gridIndex: 1, - data: dates, - scale: false, - boundaryGap : false, - splitLine: {show: false}, + splitNumber: 2, axisLabel: {show: false}, + axisLine: {show: false}, axisTick: {show: false}, - axisLine: {lineStyle: { color: '#fff' } }, - splitNumber: 20, - min: 'dataMin', - max: 'dataMax', - axisPointer: { - //type: 'shadow', - label: {show: false}, - triggerTooltip: true, - handle: { - show: true, - margin: -20, - color: '#F18D00' + splitLine: {show: false} + }], + grid: [{ + left: 20, + right: 20, + top: 60, + height: 120 + }, { + left: 20, + right: 20, + height: 40, + top: 260 + }], + graphic: [{ + type: 'group', + left: 'center', + top: 70, + width: 300, + bounding: 'raw' + }], + series: [/*{ + name: '成交量', + type: 'bar', + xAxisIndex: 1, + yAxisIndex: 1, + itemStyle: { + normal: { + color: '#87cefa' + }, + emphasis: { + color: 'black' + } + }, + data: volumes + }, */{ + type: 'candlestick', + name: '均价', + data: data, + itemStyle: { + normal: { + color: '#EB5F34', + color0: '#88D053', + borderColor: '#EB5F34', + borderColor0: '#88D053' + }, + emphasis: { + color: '#F18D00', + color0: '#666', + borderColor: '#F18D00', + borderColor0: '#666' } } - }], - yAxis: [{ - name: '均价(元/㎡)', - nameRotate: 90, - nameLocation: 'center', - nameGap: 5, - position: 'right', - nameTextStyle: { - color: '#999' - }, - scale: true, - splitNumber: 2, - axisLine: { lineStyle: { color: '#999' } }, - splitLine: { show: true }, - axisTick: { show: false }, - axisLabel: { - inside: true, - formatter: '{value}\n' - } - }, { - name: '', - nameRotate: 90, - nameLocation: 'center', - nameGap: 5, - position: 'right', - nameTextStyle: { - color: '#999' - }, - scale: true, - gridIndex: 1, - splitNumber: 2, - axisLabel: {show: false}, - axisLine: {show: false}, - axisTick: {show: false}, - splitLine: {show: false} - }], - grid: [{ - left: 20, - right: 20, - top: 110, - height: 120 - }, { - left: 20, - right: 20, - height: 40, - top: 260 - }], - graphic: [{ - type: 'group', - left: 'center', - top: 70, - width: 300, - bounding: 'raw' - }], - series: [/*{ - name: '成交量', - type: 'bar', - xAxisIndex: 1, - yAxisIndex: 1, - itemStyle: { - normal: { - color: '#87cefa' - }, - emphasis: { - color: 'black' - } - }, - data: volumes - }, */{ - type: 'candlestick', - name: '均价', - data: data, - itemStyle: { - normal: { - color: '#EB5F34', - color0: '#88D053', - borderColor: '#EB5F34', - borderColor0: '#88D053' - }, - emphasis: { - color: '#F18D00', - color0: '#666', - borderColor: '#F18D00', - borderColor0: '#666' - } - } - }] - }; + }] +}; /*$("#trendDiv2 a").click(function(){ diff --git a/fangija-zsyf/js/quotations/cityDetail.js b/fangija-zsyf/js/quotations/cityDetail.js index 8b85f5f..1dd4e75 100644 --- a/fangija-zsyf/js/quotations/cityDetail.js +++ b/fangija-zsyf/js/quotations/cityDetail.js @@ -15,11 +15,12 @@ function loadMyCollectCity(){ if(positionCity){ cityDetaiVue.$data.citys.push(positionCity); } - - $("#cityInfo").hide() } + $("#cityInfo").hide() plus.nativeUI.closeWaiting(); + }).catch(function (error) { + plus.nativeUI.closeWaiting(); console.log(error); }); } @@ -36,8 +37,10 @@ function loadCurCity(city){ cityInfoVue.$data.collecd = false; } } + plus.nativeUI.closeWaiting(); }).catch(function (error) { + plus.nativeUI.closeWaiting(); console.log(error); }); } @@ -50,6 +53,7 @@ function loadCityPriceInfo(city){ } }).then(function (response) { var data1 = response.data.data + if(data1){ var cityObj = new Object(); cityObj.city = data1.city @@ -62,7 +66,9 @@ function loadCityPriceInfo(city){ cityObj.rangeLevel = data1.rangeLevel cityObj.time = year + month cityInfoVue.$data.myCityMap = cityObj; + $("#priceDiv").removeClass("dn"); } + }).catch(function (error) { console.log(error); }); @@ -482,7 +488,18 @@ function collectCity(city, type){ }) return; } else { - docollectCity(city, type) + + var title = "" + if(type == 0){ + title = "您确定要添加关注?" + }else{ + title = "您确定要取消关注?" + } + + $.confirm(title, function () { + docollectCity(city, type) + }); + } } @@ -496,6 +513,7 @@ function docollectCity(city, type){ }).then(function (response) { var msg = response.data.message; if(msg){ + if(msg == "取消关注成功"){ try{ cityInfoVue.$data.collecd = false; @@ -503,7 +521,7 @@ function docollectCity(city, type){ var da = cityDetaiVue.$data.citys if(da && da.length>0){ var index = da.indexOf(city) - if(index>0){ + if(index>=0){ da.splice(index, 1) cityDetaiVue.$data.citys = da; if(da.length>0){ diff --git a/fangija-zsyf/manifest.json b/fangija-zsyf/manifest.json index f5d7e32..ecf4398 100644 --- a/fangija-zsyf/manifest.json +++ b/fangija-zsyf/manifest.json @@ -310,7 +310,7 @@ "description": "可选,微信分享", "appid": "wx734a9e3085abcd90", "appsecret": "47ce59f3c52984c4e193880fb09b12af" - } + },"qq":{"appid":"1106734669","description":"QQ分享"},"sina":{"appkey":"3194052034","appsecret":"e863ae4e4f14d41af3142e5ae06867dd","redirect_uri":"http://fangjia.com","description":"可选,新浪微博分享"} }, "payment": {}, "oauth": { @@ -1545,7 +1545,8 @@ "error.html", "views/rent/rent.html", "views/district/detail.html", - "views/house/houseList.html" + "views/house/houseList.html", + "views/house/cityDetail.html" ], "priority": 0 }, diff --git a/fangija-zsyf/views/component/cityIncreaseRankingComponent.js b/fangija-zsyf/views/component/cityIncreaseRankingComponent.js index c8a251a..e06f0e1 100644 --- a/fangija-zsyf/views/component/cityIncreaseRankingComponent.js +++ b/fangija-zsyf/views/component/cityIncreaseRankingComponent.js @@ -27,8 +27,8 @@ Vue.component('city_increase_ranking',{ '{{!ci.oneMonthUpDownRange||ci.oneMonthUpDownRange==""?"暂无":Math.abs(100*ci.oneMonthUpDownRange).toFixed(2)+"%"}}'+ '
'+ '
'+ - '关注'+ - '取消'+ + '关注'+ + '取消'+ '
'+ '
'+ '
'+ @@ -48,46 +48,39 @@ Vue.component('city_increase_ranking',{ }) }, follow:function(city,event, type){ + if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ clicked('/views/user/passLogin.html',true,false,{},{},function(){ if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ }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{ - 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() - cityDetaiVue.$data.citys.push(city); - } - - }).catch(function(error){ - console.log(error) - }) + $.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"); + reloadMyFocus() + reloadCityPotentialRanking() + 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) + }) + }); } }, @@ -101,23 +94,26 @@ Vue.component('city_increase_ranking',{ } }) }else{ - axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){ - $(event.target).parent().children().removeClass("dn"); - $(event.target).addClass("dn"); - reloadMyFocus(); - reloadCityPotentialRanking() - //plus.webview.getWebviewById('views/user/userInfo.html').reload() - 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; - } - } - }).catch(function(error){ - console.log(error) - }) + + $.confirm("您确定要取消关注?", function () { + axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){ + $(event.target).parent().children().removeClass("dn"); + $(event.target).addClass("dn"); + reloadMyFocus(); + reloadCityPotentialRanking() + //plus.webview.getWebviewById('views/user/userInfo.html').reload() + 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; + } + } + }).catch(function(error){ + console.log(error) + }) + }); } } diff --git a/fangija-zsyf/views/component/cityPotentialRankingComponent.js b/fangija-zsyf/views/component/cityPotentialRankingComponent.js index ac5339b..0c58bca 100644 --- a/fangija-zsyf/views/component/cityPotentialRankingComponent.js +++ b/fangija-zsyf/views/component/cityPotentialRankingComponent.js @@ -69,26 +69,28 @@ Vue.component('city_potential_ranking',{ if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ clicked('/views/user/passLogin.html',true,false,{},{},function(){ if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ - alert("rrrr") + }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"); - plus.webview.getWebviewById('views/house/houseDetail.html').reload(); - plus.webview.getWebviewById('views/house/houseManageList.html').reload(); - plus.webview.getWebviewById('views/user/userInfo.html').reload(); - reloadMyFocus() - reloadCityIncreaseRanking() - //cityDetaiVue.$data.citys.push(city); - } - }).catch(function(error){ - console.log(error) - }) + $.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"); + plus.webview.getWebviewById('views/house/houseDetail.html').reload(); + plus.webview.getWebviewById('views/house/houseManageList.html').reload(); + plus.webview.getWebviewById('views/user/userInfo.html').reload(); + reloadMyFocus() + reloadCityIncreaseRanking() + //cityDetaiVue.$data.citys.push(city); + } + }).catch(function(error){ + console.log(error) + }) + }); } }) }else{ @@ -101,7 +103,14 @@ Vue.component('city_potential_ranking',{ $(event.target).addClass("dn"); reloadMyFocus() reloadCityIncreaseRanking() - cityDetaiVue.$data.citys.push(city); + 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(); } }).catch(function(error){ diff --git a/fangija-zsyf/views/district/detail.html b/fangija-zsyf/views/district/detail.html index 8008351..56c906e 100644 --- a/fangija-zsyf/views/district/detail.html +++ b/fangija-zsyf/views/district/detail.html @@ -118,7 +118,7 @@ -
+
租金
diff --git a/fangija-zsyf/views/evaluate/evaluateReport.html b/fangija-zsyf/views/evaluate/evaluateReport.html index 9b38627..8b096f2 100644 --- a/fangija-zsyf/views/evaluate/evaluateReport.html +++ b/fangija-zsyf/views/evaluate/evaluateReport.html @@ -34,7 +34,7 @@

评估报告

-
+
  • @@ -51,7 +51,7 @@
-
+
评估总价 均价:{{avg_price}} diff --git a/fangija-zsyf/views/house/cityDetail.html b/fangija-zsyf/views/house/cityDetail.html index cbd552b..08fadcc 100644 --- a/fangija-zsyf/views/house/cityDetail.html +++ b/fangija-zsyf/views/house/cityDetail.html @@ -28,24 +28,24 @@
-
+
-
-
+
+
- 取消关注 + 取消关注 关注
当前参考均价
-
+
{{myCityMap.cityTopMonthAvgPrice}}元/㎡
暂无
@@ -151,8 +151,14 @@ $.config = {router: false} var date = new Date(); var year = date.getFullYear()+'年'; var month = date.getMonth()+1+'月'; -var city = "神农架" -var cityInfoVue = new Vue({ +var city = "普洱" +var cityInfoVue; + +document.addEventListener('plusready', onPlusReady, false); +function onPlusReady() { + var self = plus.webview.currentWebview(); + city = self.city + cityInfoVue = new Vue({ el: '#cityInfo', data: { city:"", @@ -162,12 +168,7 @@ var cityInfoVue = new Vue({ myCityMap : [] } }); - -document.addEventListener('plusready', onPlusReady, false); -function onPlusReady() { - var self = plus.webview.currentWebview(); - var city = self.city - cityInfoVue.$data.city = city; + cityInfoVue.$data.city = city; loadCurCity(city); loadCityPriceInfo(city) loadUpOrDown(city); @@ -176,11 +177,6 @@ function onPlusReady() { } -//loadCurCity(city); -// loadCityPriceInfo(city) -// loadUpOrDown(city); -// loadHotDistrict(city) -// loadCityPricesAndCounts(city) diff --git a/fangija-zsyf/views/house/detail.html b/fangija-zsyf/views/house/detail.html index dbf255e..33ff91f 100644 --- a/fangija-zsyf/views/house/detail.html +++ b/fangija-zsyf/views/house/detail.html @@ -228,34 +228,26 @@
小区走势分析
-
-
-
- 均价 - 租金 -
-
-
-
-
-
- 半年 - 一年 - 三年 -
-
-
-
-
-
-
- 半年 - 一年 -
-
+
+
均价 +
+
+
+
租金 +
+
+ 半年 + 一年 +
+
+
+
diff --git a/fangija-zsyf/views/house/houseDetail.html b/fangija-zsyf/views/house/houseDetail.html index d692f08..009d2e7 100644 --- a/fangija-zsyf/views/house/houseDetail.html +++ b/fangija-zsyf/views/house/houseDetail.html @@ -172,7 +172,7 @@
- 取消关注 + 取消关注 关注
@@ -1565,7 +1565,14 @@ function addFocus(city){ plus.webview.getWebviewById('views/house/houseDetail.html').reload(); plus.webview.getWebviewById('views/house/houseManageList.html').reload(); plus.webview.getWebviewById('views/user/userInfo.html').reload(); - createData(city, myDatasVue.$data.cityDatas.length); + + var curDatas = response.data.data + if(curDatas && curDatas.length>0){ + if(!IsInArray(curDatas, city)){ + cityDetaiVue.$data.citys.push(city); + } + } + }).catch(function(error){ console.log(error) }) @@ -1577,7 +1584,15 @@ function addFocus(city){ reloadMyFocus() reloadCityIncreaseRanking() reloadCityPotentialRanking() - cityDetaiVue.$data.citys.push(city); + + var curDatas = cityDetaiVue.$data.citys + if(curDatas && curDatas.length>0){ + + if(!IsInArray(curDatas, city)){ + cityDetaiVue.$data.citys.push(city); + } + } + } else { $.toast(response.data.message); } diff --git a/fangija-zsyf/views/house/houseList.html b/fangija-zsyf/views/house/houseList.html index 02a1b16..8a12187 100644 --- a/fangija-zsyf/views/house/houseList.html +++ b/fangija-zsyf/views/house/houseList.html @@ -57,7 +57,7 @@

我的房产

-
+
房产总值 添加房产 diff --git a/fangija-zsyf/views/house/houseManageList.html b/fangija-zsyf/views/house/houseManageList.html index 7b08e84..40b3e28 100644 --- a/fangija-zsyf/views/house/houseManageList.html +++ b/fangija-zsyf/views/house/houseManageList.html @@ -156,7 +156,7 @@ function addManagement(id, houseStatus, liveStatus){ $('.loadingBgDiv').show(); checkIsLogin(); plus.webview.getWebviewById('views/user/userInfo.html').reload(); - plus.webview.getWebviewById('yfindex.html').reload(); + //plus.webview.getWebviewById('yfindex.html').reload(); }else{ $.toast(response.data.message); } diff --git a/fangija-zsyf/views/setting/setting.html b/fangija-zsyf/views/setting/setting.html index 9492d3f..d0fad15 100644 --- a/fangija-zsyf/views/setting/setting.html +++ b/fangija-zsyf/views/setting/setting.html @@ -106,7 +106,7 @@ mui.init({ }); function logout() { - plus.webview.getWebviewById('yfindex.html').reload(); + //plus.webview.getWebviewById('yfindex.html').reload(); localStorage.removeItem("user_token"); localStorage.removeItem("user_token_add_time"); //退出登录之前loading下个人中心 diff --git a/fangija-zsyf/views/user/userInfo.html b/fangija-zsyf/views/user/userInfo.html index dd9f42a..14426db 100644 --- a/fangija-zsyf/views/user/userInfo.html +++ b/fangija-zsyf/views/user/userInfo.html @@ -142,7 +142,7 @@
-
+
房产({{mh_num}}) 关注({{mf_num}}) 收藏({{mc_num}}) @@ -290,7 +290,7 @@ function checkIsLogin(){ function gotoLogin(){ clicked('/views/user/codeSms.html',true,false,{},{},function(){ plus.webview.getWebviewById('views/house/houseManageList.html').reload(); - plus.webview.getWebviewById('yfindex.html').reload(); + //plus.webview.getWebviewById('yfindex.html').reload(); plus.webview.getWebviewById('views/house/houseDetail.html').reload(); checkIsLogin(); }) diff --git a/fangija-zsyf/yfindex.html b/fangija-zsyf/yfindex.html index b5103c9..e1d94b6 100644 --- a/fangija-zsyf/yfindex.html +++ b/fangija-zsyf/yfindex.html @@ -43,7 +43,7 @@
-
+
{{topMonth}}月份均价 @@ -87,10 +87,10 @@ 房产管理
-
+
智能选房 @@ -713,8 +713,8 @@
一线城市
-

北京

-

上海

+

北京

+

上海

广州

深圳

@@ -1203,6 +1203,7 @@ var oriCity = ""; var oriLat = 0; var oriLng = 0; var region = ""; +var oriRegion = ""; var scoreCount = 0; var lat = 0; var lng = 0; @@ -1214,7 +1215,8 @@ document.addEventListener('plusready', onPlusReady, false); function onPlusReady(){ getPosition(); versionUpdate(); -} +} + // 获取当前用户位置 function getPosition(){ plus.geolocation.getCurrentPosition(function(p){ @@ -1237,6 +1239,7 @@ function getPosition(){ if(region.endWith("区")){ region = region.substring(0, region.length-1); } + oriRegion = region; oriCity = city; $("#input_city").text(city); } @@ -1353,14 +1356,14 @@ function initBaseInfo(city,region,address,lat,lng){ } baseInfo.isLogin = response.data.data.isLogin; - if(response.data.data.isLogin){ + /*if(response.data.data.isLogin){ $("#addHouseDiv").hide(); $("#detailHouseDiv").show(); }else{ $("#addHouseDiv").show(); $("#detailHouseDiv").hide(); } - + localStorage.setItem("isLogin", response.data.data.isLogin);*/ if(response.data.data.momRateType>0){ $("#momRateTypeClass").removeClass("icon-arrow-green"); $("#momRateTypeClass").addClass("icon-arrow-red"); @@ -2127,6 +2130,9 @@ function changeCity(cityStr){ var sort = 1; city = cityStr if(oriCity== cityStr){ + if(oriRegion!=""){ + $("#region").text(oriRegion); + } lat = oriLat; lng = oriLng; if(cityStr=="上海"){ @@ -2654,6 +2660,7 @@ $("body").delegate("#hotList ul li", "click", function () { //var url = '../district/details?city='+select_city+"®ion="+select_region+"&name="+select_name; //clicked(url, true); }); +